SQL> SELECT name, value FROM v$parameter WHERE name = 'compatible';
NAME VALUE
------------------------------------------- -------------------------------------
compatible 11.2.0.0.0
提前修改参数的话报错:
SQL> alter system set compatible='12.2.0.1.0' scope=spfile;
System altered.
SQL> startup force;
ORACLE instance started.
Total System Global Area 4375998464 bytes
Fixed Size 2296864 bytes
Variable Size 956302304 bytes
Database Buffers 3405774848 bytes
Redo Buffers 11624448 bytes
ORA-38880: Cannot advance compatibility from 11.2.0.0.0 to 12.2.0.1.0 due to
guaranteed restore points
在进行11.2到12.2的升级过程中,对于12.2环境下采用startup upgrade方式打开数据库中,如果参数文件中compatible参数设置为12.2.0.1, 则控制文件变成12.2.0.1,原来的11G home将无法打开。
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
spfile string /oracle/app/oracle/product/12.2.0/db_1/dbs/spfileorcl.ora
SQL> create pfile from spfile;
File created.
编辑pfile文件,修改compatible参数为11.2.0.0.0 。
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 4375998464 bytes
Fixed Size 2296864 bytes
Variable Size 956302304 bytes
Database Buffers 3405774848 bytes
Redo Buffers 11624448 bytes
Database mounted.
Database opened.
删除restore point
SQL> select name from v$restore_point;
NAME
--------------------------------------------------------------------------------
GRP_1537019022141
SQL> drop restore point GRP_1537019022141;
Restore point dropped.
这里需要注意,只是在控制文件中删除,操作系统上仍然存在。
SQL> select name from v$restore_point;
no rows selected
SQL> alter system set compatible='12.2.0.1.0' scope=spfile;
System altered.
SQL> startup force;
ORACLE instance started.
Total System Global Area 4375998464 bytes
Fixed Size 2296864 bytes
Variable Size 956302304 bytes
Database Buffers 3405774848 bytes
Redo Buffers 11624448 bytes
Database mounted.
Database opened.
SQL> SELECT name, value FROM v$parameter WHERE name = 'compatible';
NAME VALUE
------------------------------------------- -------------------------------------
compatible 12.2.0.1.0