• 검색 결과가 없습니다.

Manual Patch

문서에서 Oracle Patch (페이지 31-39)

1 번노드부터 Manual Patch 를 진행합니다.

Supplemental Readme - Grid Infrastructure Release Update 12.2.0.1.x (Doc ID 2246888.1)

-- DB Shutdown

[oracle:YOUNHA1:/home/oracle> sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Sat Mar 3 16:21:30 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> shutdown immediate;

1. Stop the CRS managed resources running from DB homes.

database home owner execute

$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

[oracle:YOUNHA1:/home/oracle> /oracle/app/product/12.2.0/bin/srvctl stop home -o /oracle/app/product/12.2.0/ -s /home/oracle/status -n younha1

2. Run the pre root script.

root user execute

# <GI_HOME>/crs/install/rootcrs.sh -prepatch

[root:younha1/root> /oragrid/12.2.0/grid/crs/install/rootcrs.sh -prepatch

Using configuration parameter file: /oragrid/12.2.0/grid/crs/install/crsconfig_params The log of current session can be found at:

/oragrid/grid_base/crsdata/younha1/crsconfig/crspatch_younha1_2018-03-03_04-27-11PM.log Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'younha1' CRS-2673: Attempting to stop 'ora.crsd' on 'younha1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'younha1' CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'younha1'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'younha1' CRS-2673: Attempting to stop 'ora.chad' on 'younha1'

CRS-2677: Stop of 'ora.MGMT.dg' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'younha1' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'younha1' CRS-2673: Attempting to stop 'ora.RECO.dg' on 'younha1' CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'younha1' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'younha1' succeeded CRS-2677: Stop of 'ora.RECO.dg' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'younha1'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.younha1.vip' on 'younha1' CRS-2677: Stop of 'ora.asm' on 'younha1' succeeded

CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'younha1' CRS-2677: Stop of 'ora.younha1.vip' on 'younha1' succeeded

CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'younha1' succeeded

CRS-2677: Stop of 'ora.chad' on 'younha1' succeeded

CRS-2672: Attempting to start 'ora.younha1.vip' on 'younha2' CRS-2676: Start of 'ora.younha1.vip' on 'younha2' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'younha1'

CRS-2677: Stop of 'ora.ons' on 'younha1' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'younha1' CRS-2677: Stop of 'ora.net1.network' on 'younha1' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'younha1' has completed CRS-2677: Stop of 'ora.crsd' on 'younha1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'younha1' CRS-2673: Attempting to stop 'ora.crf' on 'younha1'

CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'younha1' CRS-2673: Attempting to stop 'ora.gpnpd' on 'younha1'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'younha1' CRS-2677: Stop of 'ora.drivers.acfs' on 'younha1' succeeded CRS-2677: Stop of 'ora.crf' on 'younha1' succeeded

CRS-2677: Stop of 'ora.gpnpd' on 'younha1' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'younha1' succeeded CRS-2677: Stop of 'ora.asm' on 'younha1' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'younha1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'younha1'

CRS-2673: Attempting to stop 'ora.evmd' on 'younha1' CRS-2677: Stop of 'ora.ctssd' on 'younha1' succeeded CRS-2677: Stop of 'ora.evmd' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'younha1' CRS-2677: Stop of 'ora.cssd' on 'younha1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'younha1' CRS-2677: Stop of 'ora.gipcd' on 'younha1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'younha1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

2018/03/03 16:28:19 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2018/03/03 16:28:28 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2018/03/03 16:28:29 CLSRSC-347: Successfully unlock /oragrid/12.2.0/grid

3. Patch GI home.

GI home owner execute

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%ACFS TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%DBWLM TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%DB RU TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%TOMCAT RU TRACKING BUG%

[oragrid:+ASM1:/home/oragrid> /oragrid/12.2.0/grid/OPatch/opatch apply -oh /oragrid/12.2.0/grid/

-local /oramedia/27100009/27335416/

Oracle Interim Patch Installer version 12.2.0.1.12

Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /oragrid/12.2.0/grid Central Inventory : /oragrid/oraInventory

from : /oragrid/12.2.0/grid//oraInst.loc OPatch version : 12.2.0.1.12

OUI version : 12.2.0.1.4

Log file location : /oragrid/12.2.0/grid/cfgtoollogs/opatch/opatch2018-03-03_16-31-34PM_1.log Verifying environment and performing prerequisite checks...

OPatch continues with these patches: 27335416 Do you want to proceed? [y|n]

y

User Responded with: Y All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/oragrid/12.2.0/grid')

Is the local system ready for patching? [y|n]

y

User Responded with: Y Backing up files...

Applying interim patch '27335416' to OH '/oragrid/12.2.0/grid' Patching component oracle.has.deconfig, 12.2.0.1.0...

Patching component oracle.has.rsf, 12.2.0.1.0...

Patching component oracle.has.crs, 12.2.0.1.0...

Patching component oracle.has.db, 12.2.0.1.0...

Patching component oracle.has.cvu, 12.2.0.1.0...

Patching component oracle.has.common.cvu, 12.2.0.1.0...

Patching component oracle.has.common, 12.2.0.1.0...

Patch 27335416 successfully applied.

Log file location: /oragrid/12.2.0/grid/cfgtoollogs/opatch/opatch2018-03-03_16-31-34PM_1.log OPatch succeeded.

[oragrid:+ASM1:/home/oragrid> /oragrid/12.2.0/grid/OPatch/opatch apply -oh /oragrid/12.2.0/grid/

-local /oramedia/27100009/27128906/

[oragrid:+ASM1:/home/oragrid> /oragrid/12.2.0/grid/OPatch/opatch apply -oh /oragrid/12.2.0/grid/

-local /oramedia/27100009/26839277/

[oragrid:+ASM1:/home/oragrid> /oragrid/12.2.0/grid/OPatch/opatch apply -oh /oragrid/12.2.0/grid/

-local /oramedia/27100009/27105253/

[oragrid:+ASM1:/home/oragrid> /oragrid/12.2.0/grid/OPatch/opatch apply -oh /oragrid/12.2.0/grid/

-local /oramedia/27100009/27144050/

4. Patch DB home.

database home owner execute

$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%

$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%DB RU TRACKING BUG%

$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>

[oracle:YOUNHA1:/home/oracle> /oramedia/27100009/27335416/custom/scripts/prepatch.sh -dbhome /oracle/app/product/12.2.0/

/oramedia/27100009/27335416/custom/scripts/prepatch.sh completed successfully.

[oracle:YOUNHA1:/home/oracle> /oracle/app/product/12.2.0/OPatch/opatch apply -oh /oracle/app/product/12.2.0/ -local /oramedia/27100009/27335416/

[oracle:YOUNHA1:/home/oracle> /oracle/app/product/12.2.0/OPatch/opatch apply -oh /oracle/app/product/12.2.0/ -local /oramedia/27100009/27105253/

[oracle:YOUNHA1:/home/oracle> /oramedia/27100009/27335416/custom/scripts/postpatch.sh -dbhome /oracle/app/product/12.2.0/

Reading /oracle/app/product/12.2.0//install/params.ora..

Reading /oracle/app/product/12.2.0//install/params.ora..

Found uninstantiated /oracle/app/product/12.2.0//crs/sbs/srvctl.sbs file, copying to /oracle/app/product/12.2.0//bin/srvctl

Parsing file /oracle/app/product/12.2.0//bin/srvctl Parsing file /oracle/app/product/12.2.0//bin/srvconfig Parsing file /oracle/app/product/12.2.0//bin/cluvfy Verifying file /oracle/app/product/12.2.0//bin/srvctl Verifying file /oracle/app/product/12.2.0//bin/srvconfig Verifying file /oracle/app/product/12.2.0//bin/cluvfy

Reapplying file permissions on /oracle/app/product/12.2.0//bin/srvctl Reapplying file permissions on /oracle/app/product/12.2.0//bin/srvconfig Reapplying file permissions on /oracle/app/product/12.2.0//bin/cluvfy Reapplying file permissions on /oracle/app/product/12.2.0//bin/diskmon.bin Reapplying file permissions on /oracle/app/product/12.2.0//bin/lsnodes Reapplying file permissions on /oracle/app/product/12.2.0//bin/osdbagrp Reapplying file permissions on /oracle/app/product/12.2.0//bin/rawutl

Reapplying file permissions on /oracle/app/product/12.2.0//srvm/admin/ractrans Reapplying file permissions on /oracle/app/product/12.2.0//srvm/admin/getcrshome Reapplying file permissions on /oracle/app/product/12.2.0//bin/crsdiag.pl

Postpatch completed successfully

5. Run the post script.

root user execute

# <GI_HOME>/rdbms/install/rootadd_rdbms.sh

# <GI_HOME>/crs/install/rootcrs.sh -postpatch

[root:younha1/root> /oragrid/12.2.0/grid/rdbms/install/rootadd_rdbms.sh [root:younha1/root> /oragrid/12.2.0/grid/crs/install/rootcrs.sh -postpatch

Using configuration parameter file: /oragrid/12.2.0/grid/crs/install/crsconfig_params The log of current session can be found at:

/oragrid/grid_base/crsdata/younha1/crsconfig/crspatch_younha1_2018-03-03_04-44-38PM.log 2018/03/03 16:44:56 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2018/03/03 16:45:37 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2018/03/03 16:45:41 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf' CRS-4123: Starting Oracle High Availability Services-managed resources

CRS-2672: Attempting to start 'ora.mdnsd' on 'younha1' CRS-2672: Attempting to start 'ora.evmd' on 'younha1' CRS-2676: Start of 'ora.mdnsd' on 'younha1' succeeded CRS-2676: Start of 'ora.evmd' on 'younha1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'younha1' CRS-2676: Start of 'ora.gpnpd' on 'younha1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'younha1' CRS-2676: Start of 'ora.gipcd' on 'younha1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'younha1' CRS-2676: Start of 'ora.cssdmonitor' on 'younha1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'younha1' CRS-2672: Attempting to start 'ora.diskmon' on 'younha1' CRS-2676: Start of 'ora.diskmon' on 'younha1' succeeded CRS-2676: Start of 'ora.cssd' on 'younha1' succeeded

<중략>

CRS-4123: Oracle High Availability Services has been started.

Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [ROLLING PATCH]. The cluster active patch level is [0].

SQL Patching tool version 12.2.0.1.0 Production on Sat Mar 3 16:50:08 2018 Copyright (c) 2012, 2017, Oracle. All rights reserved.

Connecting to database...OK

Note: Datapatch will only apply or rollback SQL fixes for PDBs

that are in an open state, no patches will be applied to closed PDBs.

Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1)

Determining current state...done

Adding patches to installation queue and performing prereq checks...done Installation queue:

For the following PDBs: CDB$ROOT PDB$SEED GIMR_DSCREP_10 Nothing to roll back

The following patches will be applied:

27105253 (DATABASE RELEASE UPDATE 12.2.0.1.180116) Installing patches...

Patch installation complete. Total patches installed: 3 Validating logfiles...done

SQL Patching tool complete on Sat Mar 3 16:54:05 2018

6. Start the CRS managed resources that were earlier running from DB homes.

database home owner execute

$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>

[oracle:YOUNHA1:/home/oracle> /oracle/app/product/12.2.0/bin/srvctl start home -o /oracle/app/product/12.2.0/ -s /home/oracle/status -n younha1

-- DB Startup

[oracle:YOUNHA1:/home/oracle> sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Sat Mar 3 16:58:34 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup

2 번 노드도 동일하게 수행합니다. 1 번 & 6 번 Step 의 node name 값만 주의해주시면 명령어는 동일합 니다.

5 번 Step 에서 아래와 같이 cluster patch level 을 확인할 수 있습니다.

Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [2960767134].

7. For each database instance running on the Oracle home being patched, run the datapatch utility

database home owner execute

$ <ORACLE_HOME>/OPatch/datapatch -verbose

한 노드에서만 수행하면 된다.

[oracle:YOUNHA1:/home/oracle> /oracle/app/product/12.2.0/OPatch/datapatch -verbose SQL Patching tool version 12.2.0.1.0 Production on Sat Mar 3 17:22:41 2018

Copyright (c) 2012, 2017, Oracle. All rights reserved.

Log file for this invocation:

/oracle/app/cfgtoollogs/sqlpatch/sqlpatch_22331_2018_03_03_17_22_41/sqlpatch_invocation.log Connecting to database...OK

Bootstrapping registry and package to current versions...done Determining current state...done

Current state of SQL patches:

Bundle series DBRU:

ID 180116 in the binary registry and not installed in the SQL registry Adding patches to installation queue and performing prereq checks...

Installation queue:

Nothing to roll back

The following patches will be applied:

27105253 (DATABASE RELEASE UPDATE 12.2.0.1.180116) Installing patches...

Patch installation complete. Total patches installed: 1 Validating logfiles...

Patch 27105253 apply: SUCCESS logfile:

/oracle/app/cfgtoollogs/sqlpatch/27105253/21862470/27105253_apply_YOUNHA_2018Mar03_17_23_23.log (no errors)

SQL Patching tool complete on Sat Mar 3 17:26:10 2018 [oracle:YOUNHA1:/home/oracle> sqlplus "/as sysdba"

SQL> select patch_id, version, action, status, bundle_id from dba_registry_sqlpatch;

PATCH_ID VERSION ACTION STATUS BUNDLE_ID --- --- --- --- --- 27105253 12.2.0.1 APPLY SUCCESS 180116

7.3. 11g vs 12c

11g 와 12c 는 수행 절차는 동일하나 명령어의 차이가 있다. 11g R2 Manual 명령어만 기술하겠다.

Database Shutdown ( 1&2 노드 )

< 1 번노드 >

1

. $ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

2. # <GI_HOME>/crs/install/rootcrs.pl –unlock

3. $<GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>

$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

4. $<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/

<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>

/custom/server/<OCW Components_number>

$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/

<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>

5. # <GI_HOME>/rdbms/install/rootadd_rdbms.sh

# <GI_HOME>/crs/install/rootcrs.pl –patch

6.

$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>

<2 번 노드도 동일하게 수행>

1 ~ 6

Database Startup ( 1&2 노드 )

<한노드에서만 수행>

7. cd $ORACLE_HOME/rdbms/admin

SQL> @catbundle.sql psu apply

문서에서 Oracle Patch (페이지 31-39)

관련 문서