对compatible参数的理解
分类:Oracle数据库基本管理oracle安装与卸载oracle体系架构2014-01-15 11:597人阅读评论(0)收藏编辑删除
compatible也能降
compatible也能由高变低,不过是在9i。
今天在看oracle 10g的文档,注意到Irreversible Compatibility这个说法。
Starting with Oracle Database 10g, theCOMPATIBLE initialization parameter becomes irreversible; that is, it cannot beset to a value that is less than a previous value. Therefore, the compatibilityof the database can go only forward and never backward.
For example, suppose that you set COMPATIBLE to 10.0.0 and start up thedatabase, 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 cannotbe reversed.
If you do advance the compatibility(的值) of yourdatabase with the COMPATIBLE initialization parameter, there is no way to startthe database using a lower compatibility level setting,except by doing a point-in-time recoveryto a time before compatibility was advanced.(so)Any changes since, are lost.
Consequently,the ALTER DATABASE RESET COMPATIBILITY command is now obsolete.
注释:
看来,有时候还得看点老版本oracle文档上的东西,即新版本和老版本都有的知识点。我在11gR2上貌似没看到上面的解释。
对except by doinga point-in-time recovery to a time before compatibility was advanced.的解释:
你要使用这个参数来保持升级(oracle软件系统和数据库都升级了)前的功能,必须在升级数据文件时就指定你想要的compatiable参数值。否则开始设定一个比较高(的版本号)来升级(oracle软件系统和数据库都升级了,此时compatiable参数值也变为升级后的版本号值),升级后想让compatiable参数值revert到以前来避免使用(oracle软件系统)新功能是不可能的。除非你用以前低版本(数据文件)备份来做一次point-in-time的恢复。
好了,开始正文。
从10g开始COMPATIBLE不能由高降低,难道9I可以?将compatiable从9.2.0.5改为9.2.0.1?我测试后果然可以。
以前我一直以为COMPATIBLE在所有版本(包括patch set)都不能修改为更小的值,以为每次修改compatiable都会去修改所有的datafile header(格式上的compatiable(或是叫 version,版本)这