Upgrade the Database
After you install the patch set, you must perform. the following steps on every database associated with the upgraded Oracle home:
-
Log in as the Oracle software owner (typically oracle).
-
For RAC installations, start the Global Services Daemon (GSD) on each node of the cluster as follows:
$ gsdctl start
-
Start the Oracle Net listener as follows:
$ lsnrctl start
Note:
For RAC installations, start the listener on each node of the cluster.If you are using the Oracle OLAP option, make sure that the listener is running.
-
For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
$ sqlplus /nolog SQL> CONNECT / AS SYSDBA
-
For RAC installations:
-
Start the database as follows, where db_name is the database name:
$ srvctl start database -d db_name
-
Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
$ sqlplus /nolog SQL> CONNECT / AS SYSDBA
-
Set the CLUSTER_DATABASE initialization parameter to FALSE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
Note:
If the system uses an initialization parameter file, change the value of the CLUSTER_DATABASE initialization parameter to FALSE in the initialization parameter file (initsid.ora).
-
Exit SQL*Plus and shut down the database:
SQL> EXIT $ srvctl stop database -d db_name
-
Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
$ sqlplus /nolog SQL> CONNECT / AS SYSDBA
-
-
Enter the following SQL*Plus commands:
SQL> STARTUP MIGRATE SQL> SPOOL patch.log SQL> @?/rdbms/admin/catpatch.sql SQL> SPOOL OFF
-
Review the patch.log file for errors and inspect the list of components that is displayed at the end of catpatch.sql script.
This list provides the version and status of each SERVER component in the database.
-
If necessary, rerun the catpatch.sql script. after correcting any problems.
-
Restart the database:
SQL> SHUTDOWN SQL> STARTUP
-
Run the utlrp.sql script. to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
SQL> @?/rdbms/admin/utlrp.sql
-
For RAC installations:
-
Set the CLUSTER_DATABASE initialization parameter to TRUE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
Note:
If the system uses an initialization parameter file, change the value of the CLUSTER_DATABASE initialization parameters to TRUE in the initialization parameter file (initsid.ora).
-
Restart the database:
SQL> SHUTDOWN SQL> STARTUP
-
-
If you are using the Oracle Recovery Manager catalog, enter the following command:
$ rman catalog username/password@alias RMAN> UPGRADE CATALOG;
-
If Oracle Internet Directory release 9.2.0 is installed in the Oracle home, run the following shell script.
Note:
Make sure that the database and database listener are running, and all parameters for the oidpatchca.sh script. are specified before running the script.
$ORACLE_HOME/bin/oidpatchca.sh -connect Connect_String -lsnrport Listener_Port -systempwd SYSTEM_Password -odspwd ODS_Password -sudn Super-User_DN -supwd Super-User_Password -dippwd Password_to_register_DIP_Server
In the preceding example, Password_to_register_DIP_Server must conform. to the password policy in the Oracle Internet Directory server.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8102208/viewspace-442396/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8102208/viewspace-442396/