Create a legacy init file to local from spfile, modify cluster_database to false, do some necessary modify. I modified the ORACLE_BASE to /u02, the adump to /u02, created the adump directory, and deleted the remote_listener.
1
SQL> create pfile='/home/oracle/init.ora' from spfile;
Now, SET the new ORACLE variables to 12c, and add the following entry to /etc/oratab in both nodes:
1 2 3 4 5 6 7 8
[oracle@node1:/home/oracle]$ . .bash_profile [oracle@node1:/home/oracle]$ echo $ORACLE_HOME /u02/app/oracle/product/12.1.0/db1 [oracle@node1:/home/oracle]$ which sqlplus /u02/app/oracle/product/12.1.0/db1/bin/sqlplus [root@node2 ~]# tail -2 /etc/oratab #racdb:/u01/app/oracle/product/11gr2:N # line added by Agent racdb:/u02/app/oracle/product/12.1.0/db1:N
Database will automatically shutdown once the previous command successfully completes. Then I need to perform some tasks to enable CLUSTER_DATABASE, enable ARCHIVE etc.:
1 2 3 4 5 6 7 8
#modify cluster_database to true, uncommet the remote_listener in the init file SQL> startup mount pfile='/home/oracle/init.ora'; SQL> ALTER DATABASE ARCHIVELOG; SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP pfile='/home/oracle/init.ora'; SQL> create spfile='+DATA/RACDB/spfileracdb.ora' from pfile='/home/oracle/init.ora'; #add following entries to $ORACLE_HOME/dbs/initracdb1(2).ora to both nodes SPFILE='+DATA/racdb/spfileracdb.ora'
Executing compile scripts:
1 2 3 4 5 6
SQL> execute dbms_stats.gather_fixed_objects_stats; SQL> @?/rdbms/admin/utlrp.sql --recomiples all invalid objects on the database SQL> @?/rdbms/admin/utluiobj.sql --verfies the validity of all packages/classes on the database SQL> @?/rdbms/admin/catuppst.sql SQL> @?/rdbms/admin/utlu121s.sql --displays database upgrade summary SQL> SHUTDOWN IMMEDIATE;
Upgrade the database version in OCR by using the following command:
Adjust the compatibility of ASM diskgroup's attribute "compatible.asm" and "compatible.rdbms" to 12.1 if necessary, for example, convert non-CDB to PDB, it's necessary to update these values to 12.1. For the convenience of downgrade, this step will be omitted.
No comments:
Post a Comment