####
安全关闭数据库资源
##GRID#
cd /u01/11.2.0/crs/install
[root@wxrac01 install]# ./rootcrs.pl -unlock
Using configuration parameter file: ./crsconfig_params
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'wxrac01'
CRS-2673: Attempting to stop 'ora.crsd' on 'wxrac01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'wxrac01'
CRS-2673: Attempting to stop 'ora.wxrac01.vip' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.cvu' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'wxrac01'
CRS-2677: Stop of 'ora.cvu' on 'wxrac01' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'wxrac02'
CRS-2677: Stop of 'ora.wxrac01.vip' on 'wxrac01' succeeded
CRS-2672: Attempting to start 'ora.wxrac01.vip' on 'wxrac02'
CRS-2676: Start of 'ora.cvu' on 'wxrac02' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'wxrac01'
CRS-2677: Stop of 'ora.scan1.vip' on 'wxrac01' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'wxrac02'
CRS-2677: Stop of 'ora.FRA.dg' on 'wxrac01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'wxrac01' succeeded
CRS-2676: Start of 'ora.wxrac01.vip' on 'wxrac02' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'wxrac02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'wxrac02'
CRS-5020: Not all endpoints are registered for listener LISTENER_SCAN1
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'wxrac02' succeeded
CRS-2677: Stop of 'ora.CRS.dg' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'wxrac01'
CRS-2677: Stop of 'ora.oc4j' on 'wxrac01' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'wxrac02'
CRS-2677: Stop of 'ora.asm' on 'wxrac01' succeeded
CRS-2676: Start of 'ora.oc4j' on 'wxrac02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'wxrac01'
CRS-2677: Stop of 'ora.ons' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'wxrac01'
CRS-2677: Stop of 'ora.net1.network' on 'wxrac01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'wxrac01' has completed
CRS-2677: Stop of 'ora.crsd' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.evmd' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.asm' on 'wxrac01'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'wxrac01'
CRS-2677: Stop of 'ora.evmd' on 'wxrac01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'wxrac01' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'wxrac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'wxrac01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'wxrac01'
CRS-2677: Stop of 'ora.cssd' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'wxrac01'
CRS-2677: Stop of 'ora.gipcd' on 'wxrac01' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'wxrac01'
CRS-2677: Stop of 'ora.gpnpd' on 'wxrac01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'wxrac01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully unlock /u01/11.2.0
[root@wxrac02 psu]# chmod 775 *
[root@wxrac02 psu]# chown grid:oinstall *
su - grid
[grid@wxrac01 29255947]$ opatch napply -oh $ORACLE_HOME -local /psu/29255947/29141056 --psu
Verifying environment and performing prerequisite checks...
UtilSession failed:
To run in silent mode, OPatch requires a response file for Oracle Configuration Manager (OCM).
Please run "/tmp/oracle-home-156213046756695/OPatch/ocm/bin/emocmrsp" to generate an OCM response file. The generated response file
can be reused on different platforms and in multiple OPatch silent installs.
To regenerate an OCM response file, Please rerun "/tmp/oracle-home-156213046756695/OPatch/ocm/bin/emocmrsp".
Log file location: /u01/11.2.0/cfgtoollogs/opatch/opatch2019-07-03_13-07-54PM_1.log
[grid@wxrac01 bin]$ ./emocmrsp
OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (ocm.rsp) was successfully created.
[grid@wxrac01 bin]$ pwd
/u01/11.2.0/OPatch/ocm/bin
[grid@wxrac01 bin]$
[grid@wxrac01 bin]$ opatch napply -oh $ORACLE_HOME -local /psu/29255947/29141201 -ocmrf /u01/11.2.0/OPatch/ocm/bin/ocm.rsp --ocw
[grid@wxrac01 bin]$ opatch napply -oh $ORACLE_HOME -local /psu/29255947/28729245 --acfs
###############ORACLE###
[root@wxrac02 psu]# chmod 775 *
[root@wxrac02 psu]# chown oracle:oinstall *
[root@wxrac01 psu]# mv p29255947_112040_Linux-x86-64.zip /home/oracle/
[root@wxrac01 psu]# mv p6880880_112000_Linux-x86-64.zip /home/oracle/
chmod 775 p29255947_112040_Linux-x86-64.zip p6880880_112000_Linux-x86-64.zip
chown oracle:oinstall p29255947_112040_Linux-x86-64.zip p6880880_112000_Linux-x86-64.zip
---ocw
cd /home/oracle/29255947/29141201/custom/server/29141201/custom/scripts
./prepatch.sh -dbhome $ORACLE_HOME
cd /home/oracle/29255947/29141201/custom/server
opatch napply -oh $ORACLE_HOME -local 29141201/ -ocmrf /u01/oracle/product/11.2.0.4/db_1/OPatch/ocm/bin/ocm.rsp
--psu
opatch napply -oh $ORACLE_HOME -local 29141056/
cd /home/oracle/29255947/29141201/custom/server/29141201/custom/scripts
./postpatch.sh -dbhome $ORACLE_HOME
cd /u01/11.2.0/bin/
[root@wxrac01 bin]# ./crsctl stop has
CRS-2796: The command may not proceed when Cluster Ready Services is not running
CRS-4687: Shutdown command has completed with errors.
CRS-4000: Command Stop failed, or completed with errors.
[root@wxrac01 bin]# ./crsctl stop has -f
[root@wxrac01 bin]# ./crsctl start resource ora.crsd
[root@wxrac01 bin]# /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 &
[1] 5776
[root@wxrac01 bin]# ./crsctl start has &
CRS-4123: Oracle High Availability Services has been started.
[root@wxrac01 bin]#
[root@wxrac01 bin]# ./crsctl status res -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE wxrac01 Started
ora.cluster_interconnect.haip
1 ONLINE ONLINE wxrac01
ora.crf
1 ONLINE OFFLINE
ora.crsd
1 ONLINE INTERMEDIATE wxrac01 ---zhengzai qi
ora.cssd
1 ONLINE ONLINE wxrac01
ora.cssdmonitor
1 ONLINE ONLINE wxrac01
ora.ctssd
1 ONLINE ONLINE wxrac01 OBSERVER
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE wxrac01
ora.gipcd
1 ONLINE ONLINE wxrac01
ora.gpnpd
1 ONLINE ONLINE wxrac01
ora.mdnsd
1 ONLINE ONLINE wxrac01
[root@wxrac01 bin]#
ti[oracle@wxrac01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 3 14:40:33 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> @?/rdbms/admin/catbundle.sql psu apply
srvctl stop home -o $ORACLE_HOME -s /home/oracle/sf.txt -t immediate -n wxrac01
srvctl stop home -o $ORACLE_HOME -s /home/oracle/sf02.txt -t immediate -n wxrac01
srvctl start home -o $ORACLE_HOME -s /home/oracle/sf.txt -n wxrac01
srvctl start home -o $ORACLE_HOME -s /home/oracle/sf02.txt -n wxrac02
crsctl stop resource ora.wxrac01.vip
[grid@wxrac02 ~]$ srvctl stop scan_listener -i 1
[grid@wxrac02 ~]$ srvctl stop scan