1. Stop database-related processes
Stop the database on two machines respectively
Sqlplus "/as sysdba ";
SQL> shutdown immediate
Lsnrctl stop
Read: EXP-00056 error reported when exporting data after Oracle10201 RAC upgrade to 10204
You can also use the srvctl tool on a node.
$ ORA_CRS_HOME/bin/srvctl stop service-d rac stop service)
$ ORA_CRS_HOME/bin/srvctl stop database-d rac stop all instances in the RAC database
$ ORA_CRS_HOME/bin/srvctl stop listener-n racnode1 stop listening on node racnode1
$ ORA_CRS_HOME/bin/srvctl stop listener-n racnode2 stop listening on node racnode2
Ii. Install the clusterware patch
Su-Oracle
Cd/home/oracle/Disk1
./RunInstaller
After the OUI welcome window pops up, click Next:
Select the Software Directory. First, select the Home Directory of ipvrs10g. Click the drop-down box in Name and select export rs10g_home.
OUI automatically selects all available nodes and click Next.
Check the installation environment. If there is no exception, click Next: (if there is no problem when installing the oracle software, this should not be too serious)
The summary is displayed. If no exception occurs, click install.
After the installation is complete, exit (a message is displayed, asking you to disable the crs service on both nodes and execute the root102.sh script. The steps are as follows)
Log on as a root user
/Etc/init. d/init. crs stop
Sh $ ORA_CRS_HOME/install/root102.sh ($ ORA_CRS_HOME does not define environment variables in the root user. Please enter the actual full path)
3. Install database software patches
Because the crs is automatically re-executed when you run root102.sh, you need to stop the related process operations in step 1 Before upgrading the database software, such as shutting down the database, listening, and other services in turn.
After the OUI welcome window pops up, click Next:
Select the Software Directory. First, select the Home Directory of analytic dB, click the drop-down box in Name, and select oradb10g_home1.
OUI automatically selects all available nodes and click Next.
Check the installation environment. If no exception exists, click Next.
Indicates whether to bind metalink. You can select it based on the actual situation.
If no problem exists, click install.
During this period, the OUI will automatically pop up the following window, prompting all nodes in the RAC environment to execute the specified root. sh script. Note that the script is executed as root:
4. Upgrade the database (two methods can be used: dbua and script execution)
First, we use the dbua graphical interface.
To upgrade the RAC database environment, you must start the listening service for each node as follows:
$ ORA_CRS_HOME/bin/srvctl start listener-n racnode1
$ ORA_CRS_HOME/bin/srvctl start listener-n racnode2
Run the dbua command and select upgrade database in the window:
Select the database to be upgraded (and the database is currently available). Only one database is selected by default, and then enter the sys user password:
Select whether to automatically compile invalid objects after the upgrade. By default, the objects are selected and directly follow the next step.
Start upgrading. This step takes a long time. Please wait patiently:
After the operation is completed, click OK. The OUI displays the returned results of the entire operation.
Click close to close the window.
At this time, you can log on to any node and use the sqlplus command line to connect to query the database version:
Sqlplus "/as sysdba"
SQL> select * from gv $ instance;
After confirmation, the upgrade is complete.
Another method is implemented using scripts.
When upgrading the database, make sure that the crs-related services and monitoring services must be started.
Modify parameters from startup to nomount
Sqlplus "/as sysdba"
SQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET CLUSTER_DATABASE = FALSE SCOPE = spfile;
SQL> SHUTDOWN
Rebuilding a data dictionary
SQL> STARTUP UPGRADE
SQL> SPOOL patch. log
SQL> @ $ ORACLE_HOME/rdbms/admin/catupgrd. SQL # long execution time here
SQL> SHUTDOWN IMMEDIATE
SQL> SPOOL OFF
Invalid compilation object
SQL> STARTUP
SQL> @ $ ORACLE_HOME/rdbms/admin/utlrp. SQL
SQL> ALTER SYSTEM SET CLUSTER_DATABASE = TRUE scope = spfile;
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
Check whether the upgrade is successful after the upgrade
Su-oracle
Sqlplus "/as sysdba"
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS. DBA_REGISTRY;
SQL> select * from gv $ instance;