是否可以在 SQL 数据库中激活 Oracle 的兼容模式?

Is it possible to activate the compatibility mode for Oracle in SQL Database?

在 Bluemix 中 SQL 数据库 (DB2) 的任何现有计划中,是否有任何方法可以激活 Oracle 的兼容模式?好像默认是没有激活的。谢谢!

Oracle 兼容性是数据库级别的功能,如果在禁用该功能的情况下创建数据库,则无法启用。

您可以在 db2 中使用以下命令在数据库级别实现 oracle 兼容性:

在 DB2 命令 window 中,通过发出以下命令启动 DB2 数据库管理器:

db2 启动

将 DB2_COMPATIBILITY_VECTOR 注册表变量设置为以下值之一:

The hexadecimal value that enables the specific compatibility feature that you want to use.
To take advantage of all the DB2 compatibility features, ORA, as shown in the following command. This is the recommended setting.

db2set DB2_COMPATIBILITY_VECTOR=ORA

通过将 DB2_DEFERRED_PREPARE_SEMANTICS 注册表变量设置为 YES 来启用延迟准备支持,如图所示:

db2set DB2_DEFERRED_PREPARE_SEMANTICS=是

如果将 DB2_COMPATIBILITY_VECTOR 注册表变量设置为 ORA 而未设置 DB2_DEFERRED_PREPARE_SEMANTICS 注册表变量,则使用默认值 YES。但是,建议您将 DB2_DEFERRED_PREPARE_SEMANTICS 注册表变量显式设置为 YES。 通过发出 db2stop 命令停止数据库管理器:

db2stop

通过发出 db2start 命令启动数据库管理器:

db2 启动

更多详情如下:

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.apdv.porting.doc/doc/t0054729.html

http://www.ibm.com/developerworks/data/library/dmmag/DMMag_2009_Issue2/InTrans/