Oracle数据库中有个参数COMPATIBLE,我们有时候会叫它为编译版本。
对于该参数的含义,官方文档的解释是:
COMPATIBLE allows you to use a new release of Oracle, while at the same time guaranteeing backward compatibility with an earlier release. This is helpful if it becomes necessary to revert to the earlier release.
COMPATIBLE允许您使用新的Oracle版本,同时保证与早期版本的向后兼容性。 如果有必要恢复到以前的版本,这是有帮助的
This parameter specifies the release with which Oracle must maintain compatibility. It allows you to take advantage of the maintenance improvements of a new release immediately in your production systems without testing the new functionality in your environment. Some features of the release may be restricted.
此参数指定Oracle必须保持兼容性的版本。 它使您可以立即在生产系统中利用新版本的维护改进功能,而无需测试环境中的新功能。 该版本的某些功能可能受到限制
When using a standby database, this parameter must have the same value on both the primary and standby databases.
使用备用数据库时,此参数在主数据库和备用数据库上必须具有相同的值
About The COMPATIBLE Initialization Parameter:关于COMPATIBLE初始化参数
The COMPATIBLE initialization parameter enables or disables the use of features in the database that affect file format on disk. For example, if you create an Oracle Database 11g Release 2 (11.2) database, but specify COMPATIBLE=10.0.0 in the initialization parameter file, then features that require 11.2 compatibility generate an error if you try to use them. Such a database is said to be at the 10.0.0 compatibility level.
COMPATIBLE初始化参数启用或禁用数据库中影响磁盘上文件格式的功能。 例如,如果创建Oracle数据库11g第2版(11.2)数据库,但在初始化参数文件中指定COMPATIBLE = 10.0.0,那么如果您尝试使用它们,那么需要兼容11.2的功能部件将生成错误。 据说这样的数据库处于10.0.0兼容级别。
You can advance the compatibility level of your database by changing the COMPATIBLE initialization parameter. If you do, there is no way to start the database using a lower compatibility level setting, except by doing a point-in-time recovery to a time before the compatibility was advanced.
您可以通过更改COMPATIBLE初始化参数来提高数据库的兼容级别。 如果这样做,则无法使用较低的兼容级别设置启动数据库,除非在兼容性提前之前进行时间点恢复。
The default value for the COMPATIBLE parameter is the release number of the most recent major release.
COMPATIBLE参数的默认值是最新主版本的版本号。
参数设置限制(更多参数介绍请参照Oracle Database Upgrade Guide 11g Release 2 (11.2) E23633-09 文中Compatibility and Interoperability Between Oracle Database Releases)
需要注意,这个参数在Oracle 9i的时候,可以将版本往低调,但是到10g之后,只能往高调整,不能往低调。
Starting with Oracle Database 10g, the COMPATIBLE initialization parameter becomes irreversible; that is, it cannot be set to a value that is less than a previous value. Therefore, the compatibility of the database can go only forward and never backward.
For example, suppose that you set COMPATIBLE to 10.0.0 and start up the database, then shut down the database to restart with COMPATIBLE set to 9.2.0. During startup, you get an error indicating that the compatible setting cannot be reversed.
If you do advance the compatibility of your database with the COMPATIBLE initialization parameter, there is no way to start the database using a lower compatibility level setting,except by doing a point-in-time recovery to a time before compatibility was advanced. (so)Any changes since, are lost.
Consequently, the ALTER DATABASE RESET COMPATIBILITY command is now obsolete.
因此,ALTER DATABASE RESET COMPATIBILITY命令现在已经过时。
有时候,我们在Oracle 10.2.0.4版本的数据库中,会看到编译版本为10.2.0.1。这种情况可能是因为,该数据库是在10.2.0.1的数据库软件版本上创建的,而后数据库软件做了升级,升级之后继承了之前的编译版本。如果是在10.2.0.4数据库版本上新建的数据库,则默认其编译版本为10.2.0.3
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31397003/viewspace-2149313/
,如需转载,请注明出处,否则将追究法律责任。