Stop database-related processes Stop the database on two machines separately Sqlplus "/as sysdba"; Sql>shutdown Immediate Lsnrctl stop
You can also use the Srvctl tool to complete on one node $ORA _crs_home/bin/srvctl Stop service-d RAC stops service. (for RAC databases, first stop service services in all nodes, if a service is created) $ORA _crs_home/bin/srvctl Stop database-d RAC stops all instances in the RAC database $ORA _crs_home/bin/srvctl stop Listener-n racnode1 stop node Racnode1 listening on $ORA _crs_home/bin/srvctl stop Listener-n racnode2 stop node Racnode2 listening on If you have ASM, you need to turn off ASM
Second, install Clusterware patch Su-oracle Cd/home/oracle/disk1 ./runinstaller When you pop the Oui Welcome window, click Next: Select the directory of the software, where we first select the oracrs10g home directory, click the dropdown box in name, select Oracrs10g_home OUI automatically selects all available nodes, directly click Next Install the Environment check, if no exception, direct Click Next can be: (When installing Oracle software is not a problem, this should not be too big problem) Display summary information, such as no exception click Install Install end exit (at the end, a message will appear that lets you turn off the two-node CRS service and execute the root102.sh script, as follows)
Log in as root user /etc/init.d/init.crs stop SH $ORA _crs_home/install/root102.sh (where the $ora_crs_home does not have an environment variable defined in the root user, please enter the actual full path)
Third, the installation of database software patches Since the root102.sh is automatically restarted before the database software is upgraded, it is necessary to perform the first step of stopping the related process, such as shutting down the database, listening for services, etc. When you pop the Oui Welcome window, click Next: Select the directory of the software, where we first select the ORACDB home directory, click the dropdown box in name, select Oradb10g_home1 OUI automatically selects all available nodes, directly click Next Installation environment Check, if no exception, direct click Next can be Prompts if you want to bind Metalink, you can choose according to the actual situation If no problem directly click Install During this time, Oui will automatically pop up the window as follows, prompting you to execute the specified root.sh script at each node in the RAC environment, and note that it is executing as root:
Iv. Upgrading the database (there are two ways to implement, Dbua and execute scripts)
One First, we use the Dbua graphical interface to achieve For upgrades in the RAC database environment, you first need to 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 If you have ASM, you need to open the ASM instance and Mount ASM disk Group Execute the DBUA command and select the upgrade database through the Windows interface: Select the (and currently available) database to be upgraded, with only one and the default selected, and then enter the SYS user password: Select whether to automatically compile invalid objects after the upgrade, by default, and press Next Start to perform the upgrade, this step more, time-consuming, please wait patiently: After the completion of the operation, click OK, oui pop-up the entire operation of the return results Click the Close button to shut down the window. At this point, you can log on to any node to connect to the Sqlplus command line to query the version of the database: Sqlplus "/As SYSDBA" Sql>select * from Gv$instance; After the confirmation is correct, the upgrade completes
Two The other way is to do this in a scripted way. When upgrading the database, make sure that the related services and listening services for CRS are started Boot to nomount State Modify parameter 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 #此处执行时间较长 Sql> SHUTDOWN IMMEDIATE Sql> SPOOL off Compile Invalid 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 for successful upgrade after upgrade Su–oracle Sqlplus "/as sysdba" Sql> SELECT comp_name, VERSION, STATUS from SYS. Dba_registry; Sql>select * from Gv$instance; |