ORACLE/ADMIN2024. 2. 8. 08:12
반응형

 

오라클 12.2.0.1 -> 19.22.0.0

 

0.. 먼저 19C 엔진을 설치하고 최신 RU 패치 까지 진행 한다.

기존 12C 설치 홈

export ORACLE_HOME=$ORACLE_BASE/product/12C/db_1

신규 19C 설치 홈
export ORACLE_HOME=$ORACLE_BASE/product/19C/db_1 

 

[oracle@ORA12C ~]$ opatch lspatches
35926646;OJVM RELEASE UPDATE: 19.22.0.0.240116 (35926646)
35943157;Database Release Update : 19.22.0.0.240116 (35943157)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.

패치가 끝나니  autoupgrade.jar도 최신 파일로 업그레이드 된다.

 

1,config 파일 샘플 생성 및 자성

$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -create_sample_file config

cp sample_config.cfg config.cfg

vi config.cfg

#
# Sample config file for AutoUpgrade
#
# build version 23.4.230921
# build date    2023/09/21 14:43:05 -0400
#
#
# Global configurations
#
# This directory will include the following:
#   (1) AutoUpgrade''s global directory
#   (2) Any logs, not directly tied to a job
#   (3) Config files
#   (4) progress.json and status.json
global.autoupg_log_dir=/home/oracle/upg_logs

#
# Database number 1 - Full DB/CDB upgrade
#
upg1.log_dir=/home/oracle/upg_logs/aracdb            # Path of the log directory for the upgrade job
upg1.sid=ORA12C                                              # ORACLE_SID of the source DB/CDB
upg1.source_home=/u01/app/oracle/product/12C/db_1  # Path of the source ORACLE_HOME
upg1.target_home=/u01/app/oracle/product/19C/db_1  # Path of the target ORACLE_HOME
upg1.start_time=NOW                                       # Optional. [NOW | +XhYm (X hours, Y minutes after launch) | dd/mm/yyyy hh:mm:ss]
upg1.upgrade_node=ora12c                                # Optional. To find out the name of your node, run the hostname utility. Default is ''localhost''
#upg1.run_utlrp=[yes|no]                                  # Optional. Whether or not to run utlrp after upgrade
#upg1.timezone_upg=[yes|no]                               # Optional. Whether or not to run the timezone upgrade
upg1.target_version=19                                # Oracle version of the target ORACLE_HOME.  Only required when the target Oracle database version is 12.2

 

2. 초기 분석 작업

[oracle@aracdb ~]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode analyze
AutoUpgrade 23.4.230921 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be analyzed
Type 'help' to list console commands
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]

Please check the summary report at:
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.html
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log

로그 확인 필요!!!!

vi /home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log

[Stage Name]    PRECHECKS
[Status]        FAILURE
[Start Time]    2024-02-07 17:07:13
[Duration]
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/100/prechecks
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/100/prechecks/ora12c_preupgrade.log
                Check failed for ORA12C, manual intervention needed for the below checks
                [FLASH_RECOVERY_AREA_SETUP, ARCHIVE_MODE_ON]
원인:
이유: 데이터베이스 검사와 관련하여 /home/oracle/upg_logs/aracdb/ORA12C/100/prechecks에 실패 세부정보가 있습니다.
조치: [MANUAL]
정보: 반환 상태가 ERROR입니다.
ExecutionError: 아니오
오류 메시지: 없음

 

에러 화인 기존 12C 환경에서 FLASH_RECOVERY_AREA_SETUP, ARCHIVE_MODE_ON 

설정을 해줘야 한다.

아카이이브 모드 설정 완료

 

FRA 영역 설정 완료

fra 경로 사이즈 설정

===============================================
SQL> alter system set db_recovery_file_dest_size = 10G;  
System altered.
fra 경로 설정
SQL> alter system set db_recovery_file_dest = '/oradata/fra';
System altered.

===============================================

다시 초기  분석 시작 

 


[oracle@ORA12C ~]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode analyze
AutoUpgrade 23.4.230921 launched with default internal options
구성 파일 처리 중...
+--------------------------------+
| 자동 업그레이드 실행 시작 중 |
+--------------------------------+
1 Non-CDB(s) will be analyzed
콘솔 명령을 나열하려면 'help'을(를) 입력하십시오.
upg> status

Config
        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary

        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]
        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+

upg> /

Config
        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary

        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]
        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+

upg> /

Config
        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary
        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]

        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+
upg> status

Config

        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary

        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]
        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+

upg> ljs
알 수 없는 CMD: ljs
upg> status

Config

        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary

        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]

        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+
upg> /
Config

        User configuration file    [/home/oracle/config.txt]
        General logs location      [/home/oracle/upg_logs/cfgtoollogs/upgrade/auto]
        Mode                       [ANALYZE]
Jobs Summary

        Total databases in configuration file [1]
        Total Non-CDB being processed         [1]
        Total Containers being processed      [0]
        Jobs finished successfully            [0]
        Jobs finished/stopped                 [0]
        Jobs in progress                      [1]

Progress
        +---+---------------------------------------------------------+
        |Job|                                                 Progress|
        +---+---------------------------------------------------------+
        |101|[|||||||||||||||||                                 ] 33 %|
        +---+---------------------------------------------------------+

upg> Job 101 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]

 

로그 확인 완료

[oracle@ORA12C ~]$ cat /home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log
==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Feb 07 17:28:14 KST 2024
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name]                ORA12C
[Version Before Upgrade] 12.2.0.1.0
[Version After Upgrade]  19.22.0.0.0
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2024-02-07 17:27:23
[Duration]       
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/101/prechecks
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/101/prechecks/ora12c_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------

 

3. 사전 작업 

[oracle@aracdb ~]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode fixups
AutoUpgrade 23.4.230921 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
upg> lsj -p
+----+-------+---------+---------+-------+----------+-------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
| 103| aracdb|PRECHECKS|EXECUTING|RUNNING|  14:44:35| 0s ago|Loading database information|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+----------+-------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
| 103| aracdb|PRECHECKS|EXECUTING|RUNNING|  14:44:35| 0s ago|Loading database information|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+----------+-------+-------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-------+
| 103| aracdb|PREFIXUPS|EXECUTING|RUNNING|  14:44:35| 0s ago|       |
+----+-------+---------+---------+-------+----------+-------+-------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+----------+-------+------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+----+-------+---------+---------+-------+----------+-------+------------------+
| 103| aracdb|PREFIXUPS|EXECUTING|RUNNING|  14:44:35| 1s ago|Refreshing DB info|
+----+-------+---------+---------+-------+----------+-------+------------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+----------+-------+------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+----+-------+---------+---------+-------+----------+-------+------------------+
| 103| aracdb|PREFIXUPS|EXECUTING|RUNNING|  14:44:35| 0s ago|Refreshing DB info|
+----+-------+---------+---------+-------+----------+-------+------------------+
Total jobs 1

upg> /Job 103 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]
Jobs finished                  [1]
Jobs failed                    [0]

Please check the summary report at:
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.html
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log

 

로그 확인 완료

==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Feb 07 17:32:40 KST 2024
[Number of Jobs] 1
==========================================
[Job ID] 102
==========================================
[DB Name]                ORA12C
[Version Before Upgrade] 12.2.0.1.0
[Version After Upgrade]  19.22.0.0.0
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2024-02-07 17:30:47
[Duration]      0:00:10
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/102/prechecks
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/102/prechecks/ora12c_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[Stage Name]    PREFIXUPS
[Status]        SUCCESS
[Start Time]    2024-02-07 17:30:58
[Duration]       
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/102/prefixups
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/102/prefixups/prefixups.html
------------------------------------------

이상 없음

 

4. 업그레이드


[oracle@ORA12C ~]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode deploy
AutoUpgrade 23.4.230921 launched with default internal options
구성 파일 처리 중...
+--------------------------------+
| 자동 업그레이드 실행 시작 중 |
+--------------------------------+
1 Non-CDB(s) will be processed
콘솔 명령을 나열하려면 'help'을(를) 입력하십시오.
upg> lsj -p
+-----+-------+---------+---------+-------+----------+-------+----------------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|                     MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+----------------------------+
|  103| ORA12C|PRECHECKS|EXECUTING|RUNNING|  17:34:32| 4s ago|Loading database information|
+-----+-------+---------+---------+-------+----------+-------+----------------------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+-------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+-------+
|  103| ORA12C|PREFIXUPS|EXECUTING|RUNNING|  17:34:32| 0s ago|       |
+-----+-------+---------+---------+-------+----------+-------+-------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+------------------+
|  103| ORA12C|PREFIXUPS|EXECUTING|RUNNING|  17:34:32| 4s ago|Refreshing DB info|
+-----+-------+---------+---------+-------+----------+-------+------------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+------------------+
|  103| ORA12C|PREFIXUPS|EXECUTING|RUNNING|  17:34:32| 0s ago|Refreshing DB info|
+-----+-------+---------+---------+-------+----------+-------+------------------+
총 작업 1


upg> /
+-----+-------+-----+---------+-------+----------+-------+---------+
|작업 번호|DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|  MESSAGE|
+-----+-------+-----+---------+-------+----------+-------+---------+
|  103| ORA12C|DRAIN|EXECUTING|RUNNING|  17:34:32|28s ago|데이터베이스 종료|
+-----+-------+-----+---------+-------+----------+-------+---------+
총 작업 1


upg> /
+-----+-------+---------+---------+-------+----------+-------+-------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+-------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32| 0s ago|Running|
+-----+-------+---------+---------+-------+----------+-------+-------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+-----------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|          MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+-----------------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32| 2s ago|0%을(를) 업그레이드했습니다.|
+-----+-------+---------+---------+-------+----------+-------+-----------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+--------+-----------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|          MESSAGE|
+-----+-------+---------+---------+-------+----------+--------+-----------------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32|118s ago|5%을(를) 업그레이드했습니다.|
+-----+-------+---------+---------+-------+----------+--------+-----------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+------------------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32| 0s ago|10%을(를) 업그레이드했습니다.|
+-----+-------+---------+---------+-------+----------+-------+------------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+------------------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32| 5s ago|21%을(를) 업그레이드했습니다.|
+-----+-------+---------+---------+-------+----------+-------+------------------+
총 작업 1

upg> /
+-----+-------+---------+---------+-------+----------+-------+------------------+
|작업 번호|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+-----+-------+---------+---------+-------+----------+-------+------------------+
|  103| ORA12C|DBUPGRADE|EXECUTING|RUNNING|  17:34:32|63s ago|21%을(를) 업그레이드했습니다.|
+-----+-------+---------+---------+-------+----------+-------+------------------+
총 작업 1

upg> Job 103 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]
Jobs restored                  [0]
Jobs pending                   [0]

---- 더 이상 필요하지 않다고 생각되면 편리하게 GRP를 삭제하십시오. ----
ORA12C에서 GRP 삭제: 복원 지점 AUTOUPGRADE_9212_ORA12C122010 삭제


Please check the summary report at:
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.html
/home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log

 

로그 확인

[oracle@ORA12C ~]$ cat /home/oracle/upg_logs/cfgtoollogs/upgrade/auto/status/status.log
==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Feb 07 18:07:33 KST 2024
[Number of Jobs] 1
==========================================
[Job ID] 103
==========================================
[DB Name]                ORA12C
[Version Before Upgrade] 12.2.0.1.0
[Version After Upgrade]  19.22.0.0.0
------------------------------------------
[Stage Name]    GRP
[Status]        SUCCESS
[Start Time]    2024-02-07 17:34:33
[Duration]      0:00:01
[Detail]        Please drop the following GRPs after Autoupgrade completes:
                 AUTOUPGRADE_9212_ORA12C122010
------------------------------------------
[Stage Name]    PREUPGRADE
[Status]        SUCCESS
[Start Time]    2024-02-07 17:34:34
[Duration]      0:00:00
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/preupgrade
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2024-02-07 17:34:34
[Duration]      0:00:11
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/prechecks
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/103/prechecks/ora12c_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[Stage Name]    PREFIXUPS
[Status]        SUCCESS
[Start Time]    2024-02-07 17:34:46
[Duration]      0:00:09
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/prefixups
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/103/prefixups/prefixups.html
------------------------------------------
[Stage Name]    DRAIN
[Status]        SUCCESS
[Start Time]    2024-02-07 17:34:56
[Duration]      0:00:30
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/drain
------------------------------------------
[Stage Name]    DBUPGRADE
[Status]        SUCCESS
[Start Time]    2024-02-07 17:35:26
[Duration]      0:25:50
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/dbupgrade
------------------------------------------
[Stage Name]    POSTCHECKS
[Status]        SUCCESS
[Start Time]    2024-02-07 18:01:34
[Duration]      0:00:00
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/postchecks
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/103/postchecks/ora12c_postupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[Stage Name]    POSTFIXUPS
[Status]        SUCCESS
[Start Time]    2024-02-07 18:01:35
[Duration]      0:04:36
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/postfixups
[Detail]        /home/oracle/upg_logs/aracdb/ORA12C/103/postfixups/postfixups.html
------------------------------------------
[Stage Name]    POSTUPGRADE
[Status]        SUCCESS
[Start Time]    2024-02-07 18:06:12
[Duration]      0:01:20
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/postupgrade
------------------------------------------
[Stage Name]    SYSUPDATES
[Status]        SUCCESS
[Start Time]    2024-02-07 18:07:33
[Duration]       
[Log Directory] /home/oracle/upg_logs/aracdb/ORA12C/103/sysupdates
------------------------------------------
Summary: /home/oracle/upg_logs/aracdb/ORA12C/103/dbupgrade/upg_summary.log
[oracle@ORA12C ~]$ .

 

5. 업그레이드 완료 후 인벨리드 오브젝트 처리

 

[oracle@ORA12C ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 7 18:40:15 2024
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0

SQL> col instance_name form a20
SQL> col version form a20
SQL> col status form a10
SQL> select instance_name, version, status from v$instance;

INSTANCE_NAME        VERSION              STATUS
-------------------- -------------------- ----------
ORA12C               19.0.0.0.0           OPEN

SQL> set lines 200
SQL> set pages 100
SQL> col comp_id form a10
SQL> col comp_name form a50
SQL> col version_full form a20
SQL> col status form a20
SQL> select COMP_ID, COMP_NAME, VERSION_FULL, STATUS from DBA_REGISTRY;

COMP_ID    COMP_NAME                                          VERSION_FULL         STATUS
---------- -------------------------------------------------- -------------------- --------------------
CATALOG    Oracle Database Catalog Views                      19.22.0.0.0          VALID
CATPROC    Oracle Database Packages and Types                 19.22.0.0.0          VALID
JAVAVM     JServer JAVA Virtual Machine                       19.22.0.0.0          VALID
XML        Oracle XDK                                         19.22.0.0.0          VALID
CATJAVA    Oracle Database Java Packages                      19.22.0.0.0          VALID
APS        OLAP Analytic Workspace                            19.22.0.0.0          VALID
RAC        Oracle Real Application Clusters                   19.22.0.0.0          OPTION OFF
XDB        Oracle XML Database                                19.22.0.0.0          VALID
OWM        Oracle Workspace Manager                           19.22.0.0.0          VALID
CONTEXT    Oracle Text                                        19.22.0.0.0          VALID
ORDIM      Oracle Multimedia                                  19.22.0.0.0          VALID
SDO        Spatial                                            19.22.0.0.0          VALID
XOQ        Oracle OLAP API                                    19.22.0.0.0          VALID
OLS        Oracle Label Security                              19.22.0.0.0          VALID
DV         Oracle Database Vault                              19.22.0.0.0          VALID

15 rows selected.

SQL> @?/rdbms/admin/utlrp

Session altered.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2024-02-07 18:44:24

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2024-02-07 18:44:25

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0

Function created.
PL/SQL procedure successfully completed.
Function dropped.


PL/SQL procedure successfully completed.

SQL>  select DBMS_DST.GET_LATEST_TIMEZONE_VERSION from dual;

GET_LATEST_TIMEZONE_VERSION
---------------------------
                         42

 

SQL> col version for a24

SQL> col version for 999999  

SQL> select FILENAME, VERSION from V$TIMEZONE_FILE;
FILENAME             VERSION
-------------------- -------
timezlrg_42.dat           42

 

 

 

참조 :

AutoUpgrade Tool (문서 ID 2485457.1)

https://dataforum.io/pages/viewpage.action?pageId=57573378#AutoUpgrade%EB%A5%BC%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC11.2.0.4%EC%97%90%EC%84%9C19c%EB%A1%9C%EC%97%85%EA%B7%B8%EB%A0%88%EC%9D%B4%EB%93%9C%ED%95%98%EA%B8%B0-%EC%82%AC%EC%A0%84%EC%A4%80%EB%B9%84

 

반응형

'ORACLE > ADMIN' 카테고리의 다른 글

ASMLib사용 ASM 디스크 그룹 생성 및 추가  (0) 2024.02.23
ASM 디스크 그룹 삭제 방법  (0) 2024.02.22
single to rac 방법  (0) 2024.01.29
12.2.0.1 기준 rac to single로 변환  (0) 2024.01.28
12C RAC GIRU Patch ROLLBACK  (0) 2024.01.26
Posted by [PineTree]
ORACLE/TroubleShooting2024. 2. 6. 17:23
반응형

19C(19.3) RAC 노 패치 기준 테스트 

 

참조 : How to Reinstall Oracle Grid Infrastructure Without Disturbing RDBMS Installation (문서 ID 1276975.1)

 

0. RAC 현재 상태

-- 패치 정보

[racdb1:/home/oracle]> opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)

-- voting disk 정보

[racdb1:/home/oracle]> crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   a2cd2b1080754f3dbfd1dd9cfc288076 (/dev/oracleasm/disks/CRS1) [CRS]
 2. ONLINE   3d09921f15d14f46bf07b9802ba755d4 (/dev/oracleasm/disks/CRS3) [CRS]
 3. ONLINE   4b80c0d6281c4f13bfbb26f44031a142 (/dev/oracleasm/disks/CRS2) [CRS]
3개의 선호 디스크를 찾았습니다.
[root@rac1 disks]# olsnodes -n -i -s -t
rac1    1       <none>  Active  Unpinned
rac2    2       <none>  Active  Unpinned
[racdb1:/home/oracle]> ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     491684
         Used space (kbytes)      :      84292
         Available space (kbytes) :     407392
         ID                       :  269554171
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check bypassed due to non-privileged user

 

-- disk 정보

[root@rac1 ~]# cd /dev/oracleasm/disks

[root@rac1 disks]# ls
ASM01  ASM02  ASM03  ASM04  ASM05  CRS1  CRS2  CRS3  CRS4  DATA  DATA2  FRA

[root@rac1 disks]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.chad
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMDATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.FRA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     Started,STABLE
      2        ONLINE  ONLINE       rac2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac2                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.racdb.db
      1        ONLINE  ONLINE       rac2                     Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
      2        ONLINE  ONLINE       rac1                     Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rac1                     STABLE
--------------------------------------------------------------------------------

 

1. ocr  ,voting  dd 카피로 삭제

[root@rac1 disks]# dd if=/dev/zero of=/dev/oracleasm/disks/CRS1 bs=8192
dd: `/dev/oracleasm/disks/CRS1'에 쓰는 도중 오류 발생: 장치에 남은 공간이 없음
130945+0 records in
130944+0 records out
1072693248 bytes (1.1 GB) copied, 3.63769 s, 295 MB/s
[root@rac1 disks]# dd if=/dev/zero of=/dev/oracleasm/disks/CRS2 bs=8192
dd if=/dev/zero of=/dev/oracleasm/disks/CRS3 bs=8192
dd if=/dev/zero of=/dev/oracleasm/disks/CRS4 bs=8192dd: 
dd: `/dev/oracleasm/disks/CRS2'에 쓰는 도중 오류 발생: 장치에 남은 공간이 없음
130945+0 records in
130944+0 records out
1072693248 bytes (1.1 GB) copied, 2.12309 s, 505 MB/s
[root@rac1 disks]# dd if=/dev/zero of=/dev/oracleasm/disks/CRS3 bs=8192
dd: `/dev/oracleasm/disks/CRS3'에 쓰는 도중 오류 발생: 장치에 남은 공간이 없음
130945+0 records in
130944+0 records out
1072693248 bytes (1.1 GB) copied, 3.82352 s, 281 MB/s
[root@rac1 disks]# dd if=/dev/zero of=/dev/oracleasm/disks/CRS4 bs=8192
dd: `/dev/oracleasm/disks/CRS4'에 쓰는 도중 오류 발생: 장치에 남은 공간이 없음
130945+0 records in
130944+0 records out
1072693248 bytes (1.1 GB) copied, 4.25221 s, 252 MB/s

-- 비정상 동작 확인

[root@rac1 disks]# crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. OFFLINE  04d643e792984fa7bf2c85e2a9abcac2 (/dev/oracleasm/disks/CRS1) [CRS]
 2. PENDOFFL d3be744a62074f53bf7e41621a49fadc (/dev/oracleasm/disks/CRS2) [CRS]
 3. PENDOFFL d0469877eb0d4f82bf8c6a9c45193bc8 (/dev/oracleasm/disks/CRS3) [CRS]
Located 3 voting disk(s).
[root@rac1 disks]# ocrcheck
PROT-601: Failed to initialize ocrcheck
PROC-22: The OCR backend has an invalid format

 

2. CRS  정지

<GRID_HOME>/bin/crsctl stop crs -f

-- 그리드 정지 안 될때는 리 부팅 후 그리드 시작 초반에 다시 crsctl stop crs -f로 정지 해야 된다.

 

3. 구성 해제

De-configure the clusterware on the remote nodes (typically 'node2'-'noden')
 On all remote nodes, as root on Unix platforms and as the (current) Grid Infrastructure software owner on Windows, execute the following:

Unix example:
# <GRID_HOME>/crs/install/rootcrs.pl -deconfig -force -verbose 

[root@rac2 install]# ./rootcrs.pl -deconfig -force -verbose
./rootcrs.pl: line 88: =head1: command not found
./rootcrs.pl: line 90: rootcrs.pl: command not found
./rootcrs.pl: line 92: =head1: command not found
./rootcrs.pl: line 94: rootcrs.pl: command not found
./rootcrs.pl: line 95: parameter-file: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 96: [-deconfig: command not found
./rootcrs.pl: line 96: file: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 97: path: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 98: path: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 99: [[-prepatch: command not found
./rootcrs.pl: line 99: path: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 100: node: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 101: [-init]: command not found
./rootcrs.pl: line 102: path: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 103: sites: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 104: conversion: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 104: -createmc: command not found
./rootcrs.pl: line 104: -rollbacksc: command not found
./rootcrs.pl: line 104: dsc: 그런 파일이나 디렉터리가 없습니다
./rootcrs.pl: line 104: -convert: command not found
./rootcrs.pl: line 106: Options:: command not found
./rootcrs.pl: line 107: -verbose: command not found
./rootcrs.pl: line 108: -upgrade: command not found
./rootcrs.pl: line 109: -lock: command not found
./rootcrs.pl: line 110: -paramfile: command not found
./rootcrs.pl: line 111: -lastnode: command not found

wtmp begins Sun Jan  2 01:04:41 2022
./rootcrs.pl: line 113: with: command not found
./rootcrs.pl: line 114: -downgrade: command not found
./rootcrs.pl: line 115: -deconfig: command not found
./rootcrs.pl: line 116: -deinstall: command not found
./rootcrs.pl: line 117: -keepdg: command not found
./rootcrs.pl: line 118: -force: command not found
./rootcrs.pl: line 119: verified: command not found
./rootcrs.pl: line 120: -unlock: command not found
./rootcrs.pl: line 121: -crshome: command not found
./rootcrs.pl: line 122: syntax error near unexpected token `('
./rootcrs.pl: line 122: `   -prepatch   Perform required steps before the Oracle patching tool (Opatch) is invoked'

 

 

4) On the local node (typically 'node1'), as root on Unix platforms and as the (current) Grid Infrastructure software owner on Windows, execute the following:
a)  ONLY EXECUTE THE FOLLOWING COMMAND IF YOUR OCR and VD files ARE CONTAINED WITHIN THEIR OWN DISKGROUP:

Unix example:
# <GRID_HOME>/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode

 

4. 그리드 인프라스트럭처 삭제

-- 1번 노드

[racdb1:/u01/app/19c/grid/deinstall]> ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
로그 위치 /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [시작] 설치 확인 구성 ##


 Oracle Clusterware 프로세스가 로컬 노드에서 실행 중이지 않으므로 설치 해제 유틸리티가 해당 홈이 구성된 노드 목록을 확인할 수 없습니다.

 다른 노드에 구성된 홈입니까(y - 예, n - 아니오)?[n]:

Oracle 홈 위치의 존재 여부를 확인하는 중/u01/app/19c/grid
설치 해제를 위해 선택된 Oracle 홈 유형: 클러스터용 Oracle Grid Infrastructure
설치 해제를 위해 선택된 Oracle 기본 위치: /u01/app/oracle
중앙 인벤토리 위치의 존재 여부를 확인하는 중/u01/app/oraInventory
Oracle Grid Infrastructure 홈의 존재 여부를 확인하는 중/u01/app/19c/grid
이 클러스터에 속한 노드: rac1
노드에 충분한 임시 공간을 사용할 수 있는지 확인하는 중: 'rac1'

## [종료] 설치 확인 구성 ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2024-02-06_10-50-11-오전.log

네트워크 구성 확인 구성 시작

네트워크 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/netdc_check2024-02-06_10-50-12AM.log

구성을 해제할 RAC 리스너(SCAN 리스너 포함 안함)를 모두 지정하십시오. 모두 선택 해제하려면 .(마침표)를 입력하십시오. [ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1]:

네트워크 구성 확인 구성 종료

ASM 확인 구성 시작

ASM 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/asmcadc_check2024-02-06_10-50-12AM.log

이 Oracle 홈에서 ASM 구성이 감지되지 않았습니다. 이 Oracle 홈 (y|n)에서 ASM을 구성했습니까? [n]: y
이 Oracle 홈 /u01/app/19c/grid에서 ASM(Automatic Storage Management) 인스턴스가 감지되었습니다.
ASM 진단 대상: /u01/app/oracle
ASM 디스크 그룹: 
ASM 디스크 문자열: /dev/oracleasm/disks/*
디스크 그룹이 삭제되지 않습니다.
 기존 디스크 그룹을 보존하려는 경우 또는 감지된 정보가 올바르지 않을 경우 'y'를 입력하여 수정할 수 있습니다. 위 정보 (y|n)을(를) 수정하겠습니까? [n]: 
데이터베이스 확인 구성 시작

데이터베이스 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/databasedc_check2024-02-06_10-50-12AM.log

이 Grid Infrastructure 홈에서 Oracle Grid 관리 데이터베이스를 찾을 수 없습니다.

데이터베이스 확인 구성 종료

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure 홈: /u01/app/19c/grid
이 클러스터에 속한 노드: rac1
Oracle 홈 설치 해제가 수행될 클러스터 노드:rac1
설치 해제를 위해 선택된 Oracle 홈: /u01/app/19c/grid
등록된 Oracle 홈이 있는 인벤토리 위치: /u01/app/oraInventory
구성을 해제할 RAC 리스너: ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1
이 Oracle 홈에서 ASM 인스턴스의 구성이 해제됩니다.
이 Grid Infrastructure 홈에서 Oracle Grid 관리 데이터베이스를 찾을 수 없습니다.
계속하겠습니까(y - 예, n - 아니오)? [n]: y
이 세션의 로그는 '/u01/app/oraInventory/logs/deinstall_deconfig2024-02-06_10-49-07-AM.out'에 기록됩니다.
이 세션의 모든 오류 메시지는 '/u01/app/oraInventory/logs/deinstall_deconfig2024-02-06_10-49-07-AM.err'에 기록됩니다.

######################## DECONFIG CLEAN OPERATION START ########################
데이터베이스 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/databasedc_clean2024-02-06_10-50-12AM.log
ASM 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/asmcadc_clean2024-02-06_10-50-12AM.log
ASM 정리 구성 시작
ASM 정리 구성 종료

네트워크 구성 정리 구성 시작

네트워크 구성 해제 추적 파일 위치: /u01/app/oraInventory/logs/netdc_clean2024-02-06_10-50-12AM.log

RAC 리스너의 구성을 해제하는 중: ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1

리스너의 구성을 해제하는 중: ASMNET1LSNR_ASM
    리스너를 정지하는 중: ASMNET1LSNR_ASM
    경고: 리스너 정지를 실패했습니다. 리스너가 실행 중이 아닐 수 있습니다.
리스너의 구성이 성공적으로 해제되었습니다.

리스너의 구성을 해제하는 중: LISTENER
    리스너를 정지하는 중: LISTENER
    경고: 리스너 정지를 실패했습니다. 리스너가 실행 중이 아닐 수 있습니다.
리스너의 구성이 성공적으로 해제되었습니다.

리스너의 구성을 해제하는 중: LISTENER_SCAN3
    리스너를 정지하는 중: LISTENER_SCAN3
    경고: 리스너 정지를 실패했습니다. 리스너가 실행 중이 아닐 수 있습니다.
리스너의 구성이 성공적으로 해제되었습니다.

리스너의 구성을 해제하는 중: LISTENER_SCAN2
    리스너를 정지하는 중: LISTENER_SCAN2
    경고: 리스너 정지를 실패했습니다. 리스너가 실행 중이 아닐 수 있습니다.
리스너의 구성이 성공적으로 해제되었습니다.

리스너의 구성을 해제하는 중: LISTENER_SCAN1
    리스너를 정지하는 중: LISTENER_SCAN1
    경고: 리스너 정지를 실패했습니다. 리스너가 실행 중이 아닐 수 있습니다.
리스너의 구성이 성공적으로 해제되었습니다.

모든 노드에서 이름 지정 방법 구성 파일의 구성을 해제하는 중...
이름 지정 방법 구성 파일의 구성이 성공적으로 해제되었습니다.

모든 노드에서 로컬 네트 서비스 이름 구성 파일의 구성을 해제하는 중...
로컬 네트 서비스 이름 구성 파일의 구성이 성공적으로 해제되었습니다.

모든 노드에서 디렉토리 사용 구성 파일의 구성을 해제하는 중...
디렉토리 사용 구성 파일의 구성이 성공적으로 해제되었습니다.

모든 노드에서 백업 파일의 구성을 해제하는 중...
백업 파일의 구성이 성공적으로 해제되었습니다.

네트워크 구성이 성공적으로 정리되었습니다.

네트워크 구성 정리 구성 종료


---------------------------------------->

아래의 deconfig 명령은 모든 원격 노드에서 병렬로 실행할 수 있습니다. 모든 원격 노드에서 실행이 완료된 후 로컬 노드에서 명령을 실행하십시오.

다음 명령을 "rac1" 노드에서 루트 사용자 또는 관리자로 실행하십시오.

/u01/app/19c/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2024-02-06_10-48-43AM/response/deinstall_OraGI19Home1.rsp" -lastnode

위의 명령 실행을 완료한 후 Enter를 누르십시오.

<----------------------------------------

-- 1번 서버 새창에서 Enter 전에 실행 

[root@rac1 ~]# /u01/app/19c/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2024-02-06_10-48-43AM/response/deinstall_OraGI19Home1.rsp" -lastnode
Using configuration parameter file: /tmp/deinstall2024-02-06_10-48-43AM/response/deinstall_OraGI19Home1.rsp
The log of current session can be found at:
  /u01/app/oraInventory/logs/crsdeconfig_rac1_2024-02-06_10-51-57AM.log
PRCR-1070 : 리소스 ora.cvu이(가) 등록되었는지 여부 확인을 실패했습니다.

CRS-0184 : Cannot communicate with the CRS daemon.

2024/02/06 10:52:05 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl stop cvu -f'
PRCR-1070 : 리소스 ora.cvu이(가) 등록되었는지 여부 확인을 실패했습니다.

CRS-0184 : CRS 데몬과 통신할 수 없습니다.

2024/02/06 10:52:06 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl remove cvu -f'
PRCR-1068 : 리소스 질의를 실패했습니다.

CRS-0184 : CRS 데몬과 통신할 수 없습니다.

2024/02/06 10:52:06 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl stop scan_listener -f'
PRCR-1068 : 리소스 질의를 실패했습니다.

CRS-0184 : CRS 데몬과 통신할 수 없습니다.

2024/02/06 10:52:07 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl remove scan_listener -y -f'
PRCR-1068 : 리소스 질의를 실패했습니다.
CRS-0184 : CRS 데몬과 통신할 수 없습니다.
2024/02/06 10:52:07 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl stop scan -f'
PRCR-1068 : 리소스 질의를 실패했습니다.
CRS-0184 : CRS 데몬과 통신할 수 없습니다.
2024/02/06 10:52:08 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl remove scan -y -f'
PRCR-1070 : 리소스 ora.net1.network이(가) 등록되었는지 여부 확인을 실패했습니다.
CRS-0184 : CRS 데몬과 통신할 수 없습니다.
PRCR-1070 : 리소스 ora.helper이(가) 등록되었는지 여부 확인을 실패했습니다.
CRS-0184 : CRS 데몬과 통신할 수 없습니다.
PRCR-1070 : 리소스 ora.ons이(가) 등록되었는지 여부 확인을 실패했습니다.
CRS-0184 : CRS 데몬과 통신할 수 없습니다.

2024/02/06 10:52:09 CLSRSC-180: An error occurred while executing the command '/u01/app/19c/grid/bin/srvctl config nodeapps'

CRS-4123: Oracle 고가용성 서비스가 시작되었습니다.
CRS-2672: 'ora.evmd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2672: 'ora.mdnsd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.mdnsd' 시작('rac1')이 성공했습니다.
CRS-2676: 'ora.evmd' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.gpnpd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.gpnpd' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.cssdmonitor'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2672: 'ora.gipcd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.cssdmonitor' 시작('rac1')이 성공했습니다.
CRS-2676: 'ora.gipcd' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.cssd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2672: 'ora.diskmon'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.diskmon' 시작('rac1')이 성공했습니다.
CRS-2676: 'ora.cssd' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.crf'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2672: 'ora.ctssd'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2672: 'ora.cluster_interconnect.haip'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.crf' 시작('rac1')이 성공했습니다.
CRS-2676: 'ora.ctssd' 시작('rac1')이 성공했습니다.
CRS-2676: 'ora.cluster_interconnect.haip' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.asm'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
CRS-2676: 'ora.asm' 시작('rac1')이 성공했습니다.
CRS-2672: 'ora.storage'을(를) 'rac1'에서 시작하려고 시도하는 중입니다.
diskgroup CRS not mounted ()
CRS-5055: 클러스터에 실행 중인 ASM 인스턴스가 없으므로 ASM 인스턴스에 접속할 수 없습니다.
CRS-2674: 'ora.storage' 시작('rac1')이 실패했습니다.
CRS-2679: 'ora.storage'('rac1')을(를) 정리하려고 시도하는 중입니다.
CRS-2681: 'ora.storage' 정리('rac1')가 성공했습니다.
CRS-2673: 'ora.asm'을(를) 'rac1'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.asm' 정지('rac1')가 성공했습니다.
CRS-2673: 'ora.cluster_interconnect.haip'을(를) 'rac1'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.cluster_interconnect.haip' 정지('rac1')가 성공했습니다.
CRS-2673: 'ora.ctssd'을(를) 'rac1'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.ctssd' 정지('rac1')가 성공했습니다.
CRS-2673: 'ora.crf'을(를) 'rac1'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.crf' 정지('rac1')가 성공했습니다.
CRS-4000: Start 명령을 실패했거나 오류와 함께 완료되었습니다.
2024/02/06 11:03:31 CLSRSC-260: Clusterware exclusive mode start of Cluster Ready Services failed
2024/02/06 11:03:31 CLSRSC-558: failed to deconfigure ASM
2024/02/06 11:03:31 CLSRSC-651: One or more deconfiguration steps failed, but the deconfiguration process continued because the -force option was specified.
2024/02/06 11:03:49 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2024/02/06 11:05:48 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2024/02/06 11:05:52 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
2024/02/06 11:05:52 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/app/19c/grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.

 

-- 2번 서버도 같은 방식으로 deinstall

 

5. OCR ,VOTING DISK 파일 ASM등록

 

[root@rac1 ~]# oracleasm createdisk CRS1 /dev/sdb1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm createdisk CRS 2 /dev/sdc1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm createdisk CRS 3 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm createdisk CRS4 /dev/sdh1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac1 ~]# oracleasm listdisks
ASM01
ASM02
ASM03
ASM04
ASM05
CRS1
CRS2
CRS3

CRS4
DATA
DATA2
FRA

 

6. 그리드 인프라스트럭처 재 설치

 

-- cvuqdisk 패키지 1, 2번 노드 설치

[root@rac1 ~]# cd $GRID_HOME/cv/rpm

[root@rac1 rpm]# ls -ltr
합계 12
-rw-r--r--. 1 oracle oinstall 11412  3월 13  2019 cvuqdisk-1.0.10-1.rpm
[root@rac1 rpm]# rpm -Uvh cvuqdisk-1.0.10-1.rpm 
준비 중...                         ################################# [100%]
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

-- SCP 로 2번 노드로 복사 후 설치

scp cvuqdisk-1.0.10-1.rpm root@rac2:/tmp/

-- 2번 서버에서 설치

[root@rac2 tmp]# rpm -Uvh cvuqdisk-1.0.10-1.rpm 
준비 중...                         ################################# [100%]
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

 

-- 처음에 설치 했던 대로 설치

cd $GRID_HOME
./gridSetup.sh

 

-- 설치 중  ASM 볼륨(OCR,Voting disk ) 설정

 

-- #1번 서버 설치 중 root.sh 실행하라고 나오면 1.서버 root.sh실행 후 2번서버root.sh실행

[root@rac1 grid]# ./root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/19c/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/rac2/crsconfig/rootcrs_rac2_2024-02-06_02-50-47PM.log
2024/02/06 14:50:56 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2024/02/06 14:50:56 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2024/02/06 14:50:57 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2024/02/06 14:50:58 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2024/02/06 14:50:58 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2024/02/06 14:50:58 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2024/02/06 14:50:59 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2024/02/06 14:51:01 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2024/02/06 14:51:01 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2024/02/06 14:51:10 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2024/02/06 14:51:10 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2024/02/06 14:51:11 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2024/02/06 14:51:12 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/02/06 14:51:32 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2024/02/06 14:51:41 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2024/02/06 14:51:43 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2024/02/06 14:51:44 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2024/02/06 14:51:46 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2024/02/06 14:51:54 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2024/02/06 14:52:50 CLSRSC-343: Successfully started Oracle Clusterware stack
2024/02/06 14:52:50 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2024/02/06 14:53:08 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2024/02/06 14:53:16 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

7. root.sh 완료 후 제대로 실행 되었는 지 확인

 

Unix: <GRID_HOME>/bin/crsctl check cluster -all
[root@rac2 grid]# crsctl check cluster -all
**************************************************************
rac1:
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
rac2:
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

For Grid Infrastructure Standalone: <GRID_HOME>/bin/crsctl check has

For Grid Infrastructure Standalone, it's possible you will need to re-create your ora.asm resource using the following commands:

Unix:

srvctl add asm
srvctl start asm

 

8. 기존 asm 디스크 그룹 마운트

 

-- asmca 실행 후 기존 디스크 그룹 마운트

   모두 마운트 선택

---------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMDATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.FRA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE

 

9 DB 및 인스턴스 정보 등록

DB 등록

[racdb1:/home/oracle]> srvctl add database -d racdb -o $ORACLE_HOME

인스턴스 정보 등록

[racdb1:/home/oracle]> srvctl add instance -d racdb  -i racdb1 -n rac1
[racdb1:/home/oracle]> srvctl add instance -d racdb  -i racdb2 -n rac2

 

10  오라클 기동 

[racdb1:/home/oracle]> srvctl start database -d racdb
[racdb1:/home/oracle]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.chad
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMDATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.FRA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     Started,STABLE
      2        ONLINE  ONLINE       rac2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac2                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac2                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
      2        ONLINE  ONLINE       rac2                     Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rac2                     STABLE
--------------------------------------------------------------------------------

 

완료!!!

반응형
Posted by [PineTree]
ORACLE/INSTALL2024. 2. 1. 07:51
반응형

공유볼륨 설정

 

{공유볼륨 설정]

cmd 창에서 실행 파일 생성

정해진 크기로 파일 볼륨으로 만듬 추후 ASM 용으로 사용

vboxmanage createmedium --filename CRS1.vdi --size 1024--format VDI --variant Fixed
vboxmanage createmedium --filename CRS 2.vdi --size 1024 --format VDI --variant Fixed
vboxmanage createmedium --filename CRS 3.vdi --size 1024 --format VDI --variant Fixed
vboxmanage createmedium --filename REDATA1.vdi --size 30720 --format VDI --variant Fixed
vboxmanage createmedium --filename REDATA2.vdi --size 30720 --format VDI --variant Fixed
vboxmanage createmedium --filename REDATA3.vdi --size 30720 --format VDI --variant Fixed
vboxmanage createmedium --filename REFRA.vdi --size 20480 --format VDI --variant Fixed

 

-- 공유볼륨설정

vboxmanage modifymedium CRS1 .vdi --type shareable

vboxmanage modifymedium CRS2 .vdi --type shareable

vboxmanage modifymedium CRS3 .vdi --type shareable
vboxmanage modifymedium REDATA1.vdi --type shareable
vboxmanage modifymedium REDATA2.vdi --type shareable
vboxmanage modifymedium REDATA3.vdi --type shareable
vboxmanage modifymedium REFRA.vdi --type shareable

 

 

반응형
Posted by [PineTree]
ORACLE/TroubleShooting2024. 2. 1. 07:40
반응형

[INS-08101]
Oracle Database/client Installation fails with Error:[INS-08101] Unexpected error while executing the action at state:'clientSupportedOSCheck' (문서 ID 2584365.1)

 

 

export CV_ASSUME_DISTID=OL7                 -- If software is installed on RHEL 8/OL8

-- 다시 실행

./runInstaller

 

반응형
Posted by [PineTree]
ORACLE/ADMIN2024. 1. 29. 15:53
반응형

 이 방법은 기존에 rac 운영에 문제가 생겨서 single로 변경 했을 시에

문제 처리가 끝났다고 가정한 후 rac로 바꾸는 방법

 

==============================

기존 rac to single 방법

https://theone79.tistory.com/1012

==============================

 

crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
ora.LISTENER.lsnr
               ONLINE  OFFLINE      arac1                    STARTING
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
ora.chad
               ONLINE  OFFLINE      arac1                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  INTERMEDIATE arac1                    FAILED OVER,STABLE
ora.aracdb.db
      1        ONLINE  ONLINE       arac1                    Open,HOME=/u01/app/o
                                                             racle/product/12c/db
                                                             _1,STABLE
      2        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  OFFLINE                               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  OFFLINE      arac1                    Instance Shutdown,ST
                                                             ARTING
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

Shutdown  instance 
Shutdown all the listeners.

SQL> shutdown immediate

srvctl stop listener -n arac1
srvctl stop scan_listener
crsctl stat res -t

[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        OFFLINE OFFLINE                               STABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

Relink Oracle executable with rac_on option
  
  [aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk rac_on
(if /u01/app/oracle/product/12c/db_1/bin/skgxpinfo | grep rds;\
then \
make -f  /u01/app/oracle/product/12c/db_1/rdbms/lib/ins_rdbms.mk ipc_rds; \
else \
make -f  /u01/app/oracle/product/12c/db_1/rdbms/lib/ins_rdbms.mk ipc_g; \
fi)
make[1]: Entering directory `/u01/app/oracle/product/12c/db_1/rdbms/lib'
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxpg.so /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
make[1]: Leaving directory `/u01/app/oracle/product/12c/db_1/rdbms/lib'
 - Use stub SKGXN library
cp /u01/app/oracle/product/12c/db_1/lib/libskgxns.so /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
/usr/bin/ar d /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a ksnkcs.o
/usr/bin/ar cr /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/12c/db_1/rdbms/lib/kcsm.o 
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk ioracle
chmod 755 /u01/app/oracle/product/12c/db_1/bin

 - Linking Oracle 
rm -f /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle
/u01/app/oracle/product/12c/db_1/bin/orald  -o /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12c/db_1/rdbms/lib/ -L/u01/app/oracle/product/12c/db_1/lib/ -L/u01/app/oracle/product/12c/db_1/lib/stubs/   -Wl,-E /u01/app/oracle/product/12c/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12c/db_1/lib/nautab.o /u01/app/oracle/product/12c/db_1/lib/naeet.o /u01/app/oracle/product/12c/db_1/lib/naect.o /u01/app/oracle/product/12c/db_1/lib/naedhs.o /u01/app/oracle/product/12c/db_1/rdbms/lib/config.o  -ldmext -lserver12 -lodm12 -lofs -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12  -lrt -lplp12 -ldmext -lserver12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12  -lrt -lplp12 -ljavavm12 -lserver12  -lwwg  `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12   -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12c/db_1/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12  -lgeneric12 -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons  -lfthread12   `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12c/db_1/lib -lm    `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/12c/db_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/12c/db_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
test ! -f /u01/app/oracle/product/12c/db_1/bin/oracle || (\
   mv -f /u01/app/oracle/product/12c/db_1/bin/oracle /u01/app/oracle/product/12c/db_1/bin/oracleO &&\
   chmod 600 /u01/app/oracle/product/12c/db_1/bin/oracleO )
mv /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle /u01/app/oracle/product/12c/db_1/bin/oracle
chmod 6751 /u01/app/oracle/product/12c/db_1/bin/oracle


기존에 백업 해 뒀던 파라미터 파일 내용 복사

[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> vi initaracdb1.ora
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
aracdb2.instance_number=2
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb2.thread=2
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'
aracdb2.undo_tablespace='UNDOTBS2'

[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 29 15:01:15 2024
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  8625656 bytes
Variable Size             838861320 bytes
Database Buffers         2298478592 bytes
Redo Buffers                8151040 bytes
Database mounted.
Database opened.


SQL> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER                                             IS_     CON_ID
---------- ------- ------- -------------------------------------------------- --- ----------
         2         ONLINE  +DATA/ARACDB/ONLINELOG/group_2.271.1136924671      NO           0
         2         ONLINE  +FRA/ARACDB/ONLINELOG/group_2.261.1136924673       YES          0
         1         ONLINE  +DATA/ARACDB/ONLINELOG/group_1.270.1136924671      NO           0
         1         ONLINE  +FRA/ARACDB/ONLINELOG/group_1.260.1136924673       YES          0
         3         ONLINE  +DATA/ARACDB/ONLINELOG/group_3.274.1136924835      NO           0
         3         ONLINE  +FRA/ARACDB/ONLINELOG/group_3.262.1136924835       YES          0
         4         ONLINE  +DATA/ARACDB/ONLINELOG/group_4.275.1136924837      NO           0
         4         ONLINE  +FRA/ARACDB/ONLINELOG/group_4.263.1136924837       YES          0

8 rows selected.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TI NEXT_CHANGE# NEXT_TIM     CON_ID
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- -------- ------------ -------- ----------
         1          1         27  209715200        512          2 YES INACTIVE               1840293 24/01/26      1852823 24/01/26          0
         2          1         28  209715200        512          2 NO  CURRENT                1853020 24/01/27   1.8447E+19 24/01/27          0
         3          2          5  209715200        512          2 YES INACTIVE               1849934 24/01/26      1859299 24/01/27          0
         4          2          6  209715200        512          2 YES INACTIVE               1859343 24/01/27      1866531 24/01/27          
 

spfile 생성
SQL> create spfile from pfile;

File created.  


SQL> select tablespace_name from dba_data_files;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS2
USERS
UNDOTBS1

파라미터 파일 spfile 로 교체 및 2번 서버 기동 
spfile asm 경로 확인
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    ASM/
                                                 N    aracdb/
PARAMETERFILE  UNPROT  COARSE   JAN 29 15:00:00  N    spfilearacdb1.ora => +DATA/aracdb/PARAMETERFILE/spfile.278.1159542267
ASMCMD> 
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> vi  initaracdb1.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159542267'

[aracdb2:/u01/app/oracle/product/12c/db_1/dbs]> vi  initaracdb2.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159542267'

srvctl start instacne -d aracdb -i aracdb2

상태 확인

[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        ONLINE  ONLINE       arac1                    Open,HOME=/u01/app/o
                                                             racle/product/12c/db
                                                             _1,STABLE
      2        ONLINE  OFFLINE      arac2                    Instance Shutdown,ST
                                                             ARTING
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

 

완료

반응형
Posted by [PineTree]
ORACLE/ADMIN2024. 1. 28. 00:41
반응형

-- 12.2.0.1 기준 rac 에서 single로 변환

 

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 27 22:13:02 2024
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter pfile;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/ARACDB/PARAMETERFILE/spf
                                                 ile.276.1136924839
SQL> create pfile from spfile;

File created.

[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> ls -ltr
합계 19272
-rw-r--r--. 1 oracle oinstall     3079  5월 15  2015 init.ora
-rw-r-----. 1 oracle oinstall     2048  5월 23  2023 orapwaracdb1
-rw-r--r--. 1 oracle oinstall       71  5월 23  2023 afiedt.buf
-rw-r-----. 1 oracle asmadmin 19709952  1월 25 16:34 snapcf_aracdb1.f
-rw-rw----. 1 oracle asmadmin     1544  1월 27 22:12 hc_aracdb1.dat
-rw-r--r--. 1 oracle asmadmin     1816  1월 27 22:13 initaracdb1.ora
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> cat  initaracdb1.ora
aracdb1.__data_transfer_cache_size=0
aracdb2.__data_transfer_cache_size=0
aracdb1.__db_cache_size=2264924160
aracdb2.__db_cache_size=2264924160
aracdb1.__inmemory_ext_roarea=0
aracdb2.__inmemory_ext_roarea=0
aracdb1.__inmemory_ext_rwarea=0
aracdb2.__inmemory_ext_rwarea=0
aracdb1.__java_pool_size=16777216
aracdb2.__java_pool_size=16777216
aracdb1.__large_pool_size=33554432
aracdb2.__large_pool_size=33554432
aracdb1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
aracdb2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
aracdb1.__pga_aggregate_target=1056964608
aracdb2.__pga_aggregate_target=1056964608
aracdb1.__sga_target=3154116608
aracdb2.__sga_target=3154116608
aracdb1.__shared_io_pool_size=167772160
aracdb2.__shared_io_pool_size=167772160
aracdb1.__shared_pool_size=654311424
aracdb2.__shared_pool_size=654311424
aracdb1.__streams_pool_size=0
aracdb2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
aracdb2.instance_number=2
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb2.thread=2
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'
aracdb2.undo_tablespace='UNDOTBS2'

[root@arac1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        ONLINE  OFFLINE      arac1                    Instance Shutdown,ST
                                                             ARTING
      2        ONLINE  OFFLINE      arac2                    Instance Shutdown,ST
                                                             ARTING
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

1.  Shutdown all the instance in RAC environment.
[root@arac1 ~]# srvctl stop database -d aracdb
[root@arac1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

2.  Shutdown all the listeners.

[root@arac1 ~]# srvctl stop listener -n arac1
[root@arac1 ~]# srvctl stop listener -n arac2
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> srvctl stop scan_listener
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

3.  Relink Oracle executable with rac_off option.

  $ make -f ins_rdbms.mk rac_off
  $ make -f ins_rdbms.mk ioracle
  
  
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk rac_off
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxpg.so /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxns.so \
      /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
/usr/bin/ar d /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a kcsm.o
/usr/bin/ar cr /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/12c/db_1/rdbms/lib/ksnkcs.o 

[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk ioracle
chmod 755 /u01/app/oracle/product/12c/db_1/bin

 - Linking Oracle 
rm -f /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle
/u01/app/oracle/product/12c/db_1/bin/orald  -o /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12c/db_1/rdbms/lib/ -L/u01/app/oracle/product/12c/db_1/lib/ -L/u01/app/oracle/product/12c/db_1/lib/stubs/   -Wl,-E /u01/app/oracle/product/12c/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12c/db_1/lib/nautab.o /u01/app/oracle/product/12c/db_1/lib/naeet.o /u01/app/oracle/product/12c/db_1/lib/naect.o /u01/app/oracle/product/12c/db_1/lib/naedhs.o /u01/app/oracle/product/12c/db_1/rdbms/lib/config.o  -ldmext -lserver12 -lodm12 -lofs -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12  -lrt -lplp12 -ldmext -lserver12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12  -lrt -lplp12 -ljavavm12 -lserver12  -lwwg  `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12   -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12c/db_1/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12  -lgeneric12 -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons  -lfthread12   `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12c/db_1/lib -lm    `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/12c/db_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/12c/db_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
test ! -f /u01/app/oracle/product/12c/db_1/bin/oracle || (\
   mv -f /u01/app/oracle/product/12c/db_1/bin/oracle /u01/app/oracle/product/12c/db_1/bin/oracleO &&\
   chmod 600 /u01/app/oracle/product/12c/db_1/bin/oracleO )
mv /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle /u01/app/oracle/product/12c/db_1/bin/oracle
chmod 6751 /u01/app/oracle/product/12c/db_1/bin/oracle
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> 


4.  Remove all the parameters from init.ora which points to second instance and it is on other node.
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> cat  initaracdb1.ora
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'


5.  Remove cluster_database parameter
-- 주석 처리
#*.cluster_database=true

6.  Remove undo_tablespace parameter which points to second instance
-- 주석 처리
#aracdb1.undo_tablespace='UNDOTBS2'
7.  Start-up the database in mount stage and execute..

SQL> startup pfile='/u01/app/oracle/product/12c/db_1/dbs/initaracdb1.ora'
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  8625656 bytes
Variable Size             788529672 bytes
Database Buffers         2348810240 bytes
Redo Buffers                8151040 bytes
Database mounted.
Database opened.



alter database disable thread <thread of other instance>

SQL> select INSTANCE_NUMBER,INSTANCE_NAME,THREAD#,STATUS from v$instance;

INSTANCE_NUMBER INSTANCE_NAME       THREAD# STATUS
--------------- ---------------- ---------- ------------
              1 aracdb                    1 OPEN

 

 

 


파라미터 파일 인식

SQL> create spfile from pfile;

-- +data에 spfilearacdb1.ora 생긴다
ASMCMD> pwd
+data
ASMCMD> ls -al
Type           Redund  Striped  Time             Sys  Name
                                                 Y    ASM/
                                                 N    aracdb/
PARAMETERFILE  UNPROT  COARSE   JAN 29 14:00:00  N    spfilearacdb1.ora => +DATA/aracdb/PARAMETERFILE/spfile.278.1159539453

mv initaracdb1.ora initaracdb1.ora.old

vi initaracdb1.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159539453'

SQL> startup
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  8625656 bytesvi initaracdb1.ora
Variable Size             788529672 bytes
Database Buffers         2348810240 bytes
Redo Buffers                8151040 bytes
Database mounted.
Database opened.
SQL> show parameter pfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/aracdb/PARAMETERFILE/spf
                                                 ile.278.1159539453

 

 

반응형
Posted by [PineTree]
ORACLE/ADMIN2024. 1. 26. 20:29
반응형

12.2.0.1

grid 엔진 롤백

grid rollback  root 유저로 진행 - 1번 서버 진행

[root@arac1 33583921]# cd /u01/app/12c/grid
[root@arac1 grid]# cd OPatch
[root@arac1 OPatch]# ./opatchauto rollback /media/33583921/ -oh /u01/app/12c/grid

OPatchauto session is initiated at Fri Jan 26 15:10:04 2024

System initialization log file is /u01/app/12c/grid/cfgtoollogs/opatchautodb/systemconfig2024-01-26_03-10-12PM.log.

세션 로그 파일은 /u01/app/12c/grid/cfgtoollogs/opatchauto/opatchauto2024-01-26_03-10-54PM.log입니다.
이 세션의 ID는 KR4L입니다.

Executing OPatch prereq operations to verify patch applicability on home /u01/app/12c/grid
Patch applicability verified successfully on home /u01/app/12c/grid


Executing patch validation checks on home /u01/app/12c/grid
Patch validation checks successfully completed on home /u01/app/12c/grid


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/12c/grid

Prepatch operation log file location: /u01/app/oracle/crsdata/arac1/crsconfig/crspatch_arac1_2024-01-26_03-11-31PM.log
CRS service brought down successfully on home /u01/app/12c/grid


Start rolling back binary patch on home /u01/app/12c/grid
Binary patch rolled back successfully on home /u01/app/12c/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/12c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/arac1/crsconfig/crspatch_arac1_2024-01-26_03-17-01PM.log
CRS service started successfully on home /u01/app/12c/grid

OPatchAuto를 성공했습니다.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:arac1
CRS Home:/u01/app/12c/grid
Version:12.2.0.1.0
Summary:

==Following patches were SUCCESSFULLY rolled back:

Patch: /media/33583921/33678030
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-15-05오후_1.log

Patch: /media/33583921/33116894
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-15-05오후_1.log

Patch: /media/33583921/26839277
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-15-05오후_1.log

Patch: /media/33583921/33610989
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-15-05오후_1.log

Patch: /media/33583921/33587128
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-15-05오후_1.log



OPatchauto session completed at Fri Jan 26 15:27:56 2024
Time taken to complete the session 17 minutes, 53 seconds

============================================================================================

grid rollback  root 유저로 진행 - 2번 서버 진행


[root@arac2 media]# cd /u01/app/12c/grid
[root@arac2 grid]# cd OPatch
[root@arac2 OPatch]# ./opatchauto rollback /media/33583921/ -oh /u01/app/12c/grid

OPatchauto session is initiated at Fri Jan 26 15:29:27 2024

System initialization log file is /u01/app/12c/grid/cfgtoollogs/opatchautodb/systemconfig2024-01-26_03-29-31PM.log.

세션 로그 파일은 /u01/app/12c/grid/cfgtoollogs/opatchauto/opatchauto2024-01-26_03-29-51PM.log입니다.
이 세션의 ID는 3QLA입니다.

Executing OPatch prereq operations to verify patch applicability on home /u01/app/12c/grid
Patch applicability verified successfully on home /u01/app/12c/grid


Executing patch validation checks on home /u01/app/12c/grid
Patch validation checks successfully completed on home /u01/app/12c/grid


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/12c/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/arac2/crsconfig/crspatch_arac2_2024-01-26_03-30-23PM.log
CRS service brought down successfully on home /u01/app/12c/grid


Start rolling back binary patch on home /u01/app/12c/grid
Binary patch rolled back successfully on home /u01/app/12c/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/12c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/arac2/crsconfig/crspatch_arac2_2024-01-26_03-35-05PM.log
CRS service started successfully on home /u01/app/12c/grid

OPatchAuto를 성공했습니다.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:arac2
CRS Home:/u01/app/12c/grid
Version:12.2.0.1.0
Summary:

==Following patches were SUCCESSFULLY rolled back:

Patch: /media/33583921/33678030
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-32-55오후_1.log

Patch: /media/33583921/33116894
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-32-55오후_1.log

Patch: /media/33583921/26839277
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-32-55오후_1.log

Patch: /media/33583921/33610989
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-32-55오후_1.log

Patch: /media/33583921/33587128
Log: /u01/app/12c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_15-32-55오후_1.log



OPatchauto session completed at Fri Jan 26 15:37:35 2024
Time taken to complete the session 8 minutes, 8 seconds

################################################################################################

DB 엔진 롤백

oracle rollback  root 유저로 진행 - 1번 서버 진행

 

[root@arac1 33583921]# /u01/app/oracle/product/12c/db_1/OPatch/opatchauto rollback /media/33583921 -oh /u01/app/oracle/product/12c/db_1

OPatchauto session is initiated at Fri Jan 26 16:51:14 2024

System initialization log file is /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchautodb/systemconfig2024-01-26_04-51-17PM.log.

세션 로그 파일은 /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/opatchauto2024-01-26_04-52-08PM.log입니다.
이 세션의 ID는 JBEF입니다.

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12c/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/12c/db_1


Executing patch validation checks on home /u01/app/oracle/product/12c/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/12c/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/12c/db_1
"[/bin/sh -c 'cd /u01/app/oracle/product/12c/db_1; ORACLE_HOME=/u01/app/oracle/product/12c/db_1 ORACLE_SID=aracdb1 /u01/app/oracle/product/12c/db_1/OPatch/datapatch -prereq -verbose']" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.

SQL patch applicability verified successfully on home /u01/app/oracle/product/12c/db_1


Preparing to bring down database service on home /u01/app/oracle/product/12c/db_1
Successfully prepared home /u01/app/oracle/product/12c/db_1 to bring down database service


Bringing down database service on home /u01/app/oracle/product/12c/db_1
Database service successfully brought down on home /u01/app/oracle/product/12c/db_1


Performing prepatch operation on home /u01/app/oracle/product/12c/db_1
Prepatch operation completed successfully on home /u01/app/oracle/product/12c/db_1


Start rolling back binary patch on home /u01/app/oracle/product/12c/db_1
Binary patch rolled back successfully on home /u01/app/oracle/product/12c/db_1


Performing postpatch operation on home /u01/app/oracle/product/12c/db_1
Postpatch operation completed successfully on home /u01/app/oracle/product/12c/db_1


Starting database service on home /u01/app/oracle/product/12c/db_1
Database service successfully started on home /u01/app/oracle/product/12c/db_1


Preparing home /u01/app/oracle/product/12c/db_1 after database service restarted
No step execution required.........
 

Trying to roll back SQL patch on home /u01/app/oracle/product/12c/db_1
No SQL patch operations are required on local node for this home

OPatchAuto를 성공했습니다.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:arac1
RAC Home:/u01/app/oracle/product/12c/db_1
Version:12.2.0.1.0
Summary:

==Following patches were SKIPPED:

Patch: /media/33583921/33116894
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /media/33583921/26839277
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /media/33583921/33610989
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY rolled back:

Patch: /media/33583921/33678030
Log: /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_16-52-53오후_1.log

Patch: /media/33583921/33587128
Log: /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_16-52-53오후_1.log



OPatchauto session completed at Fri Jan 26 16:55:48 2024
Time taken to complete the session 4 minutes, 34 seconds
[root@arac1 33583921]#
=================================================================================

oracle rollback  root 유저로 진행 - 2번 서버 진행


[root@arac2 ~]#  /u01/app/oracle/product/12c/db_1/OPatch/opatchauto rollback /media/33583921 -oh /u01/app/oracle/product/12c/db_1

OPatchauto session is initiated at Fri Jan 26 16:56:26 2024

System initialization log file is /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchautodb/systemconfig2024-01-26_04-56-29PM.log.

세션 로그 파일은 /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/opatchauto2024-01-26_04-56-55PM.log입니다.
이 세션의 ID는 8D38입니다.

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12c/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/12c/db_1


Executing patch validation checks on home /u01/app/oracle/product/12c/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/12c/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/12c/db_1
"[/bin/sh -c 'cd /u01/app/oracle/product/12c/db_1; ORACLE_HOME=/u01/app/oracle/product/12c/db_1 ORACLE_SID=aracdb2 /u01/app/oracle/product/12c/db_1/OPatch/datapatch -prereq -verbose']" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.

SQL patch applicability verified successfully on home /u01/app/oracle/product/12c/db_1


Preparing to bring down database service on home /u01/app/oracle/product/12c/db_1
Successfully prepared home /u01/app/oracle/product/12c/db_1 to bring down database service


Bringing down database service on home /u01/app/oracle/product/12c/db_1
Database service successfully brought down on home /u01/app/oracle/product/12c/db_1


Performing prepatch operation on home /u01/app/oracle/product/12c/db_1
Prepatch operation completed successfully on home /u01/app/oracle/product/12c/db_1


Start rolling back binary patch on home /u01/app/oracle/product/12c/db_1
Binary patch rolled back successfully on home /u01/app/oracle/product/12c/db_1


Performing postpatch operation on home /u01/app/oracle/product/12c/db_1
Postpatch operation completed successfully on home /u01/app/oracle/product/12c/db_1


Starting database service on home /u01/app/oracle/product/12c/db_1
Database service successfully started on home /u01/app/oracle/product/12c/db_1


Preparing home /u01/app/oracle/product/12c/db_1 after database service restarted
No step execution required.........
 

Trying to roll back SQL patch on home /u01/app/oracle/product/12c/db_1
"[/bin/sh -c 'cd /u01/app/oracle/product/12c/db_1;ORACLE_HOME=/u01/app/oracle/product/12c/db_1 ORACLE_SID=aracdb2 /u01/app/oracle/product/12c/db_1/OPatch/datapatch -verbose']" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be rolled back by manually retrying the same command.

SQL patch rolled back successfully on home /u01/app/oracle/product/12c/db_1

OPatchAuto를 성공했습니다.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:arac2
RAC Home:/u01/app/oracle/product/12c/db_1
Version:12.2.0.1.0
Summary:

==Following patches were SKIPPED:

Patch: /media/33583921/33116894
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /media/33583921/26839277
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /media/33583921/33610989
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY rolled back:

Patch: /media/33583921/33678030
Log: /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_16-57-29오후_1.log

Patch: /media/33583921/33587128
Log: /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-01-26_16-57-29오후_1.log



OPatchauto session completed at Fri Jan 26 16:59:51 2024
Time taken to complete the session 3 minutes, 26 seconds

 

[root@arac1 ~]# su - grid
마지막 로그인: 금  1월 26 20:33:37 KST 2024
[+ASM1:/home/grid]> opatch lspatches
이 Oracle 홈에 설치된 Interim 패치가 없습니다 "/u01/app/12c/grid".

 

[aracdb1:/u01/app/oracle/product/12c/db_1/OPatch]> opatch lspatches
이 Oracle 홈에 설치된 Interim 패치가 없습니다 "/u01/app/oracle/product/12c/db_1".

OPatch succeeded.

 

[aracdb2:/home/oracle]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        ONLINE  ONLINE       arac1                    Open,HOME=/u01/app/o
                                                             racle/product/12c/db
                                                             _1,STABLE
      2        ONLINE  ONLINE       arac2                    Open,HOME=/u01/app/o
                                                             racle/product/12c/db
                                                             _1,STABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

 

반응형
Posted by [PineTree]
ORACLE/ADMIN2024. 1. 25. 15:11
반응형


1) Using ASMCMD Utility ( Latest method )
2) Using RMAN ( alternative method )
3) Using DBMS package ( old method )

 

첫 번째

> Using ASMCMD Utility

 select file_id,file_name,bytes/1024/1024 from dba_data_files;
   FILE_ID FILE_NAME                                          BYTES/1024/1024
---------- -------------------------------------------------- ---------------
         1 +DATA/ARACDB/DATAFILE/system.265.1136924533                    810
         3 +DATA/ARACDB/DATAFILE/sysaux.266.1136924577                    530
         5 +DATA/ARACDB/DATAFILE/undotbs2.273.1136924729                   25
         7 +DATA/ARACDB/DATAFILE/users.268.1136924605                       5
         4 +DATA/ARACDB/DATAFILE/undotbs1.267.1136924603                   70

 

[+ASM1:/home/grid]> asmcmd
ls
ASMCMD> CRS/
DATA/
FRA/
MGMT/
ASMCMD> cd data
ASMCMD> ls
aracdb/
ASMCMD> cd a*
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
PASSWORD/
TEMPFILE/
ASMCMD> cd datafile
ASMCMD> ls
SYSAUX.258.1136915229
SYSAUX.266.1136924577
SYSTEM.257.1136915185
SYSTEM.265.1136924533
UNDOTBS1.259.1136915255
UNDOTBS1.267.1136924603
UNDOTBS2.273.1136924729
USERS.260.1136915255
USERS.268.1136924605

-- 복사

ASMCMD> cp SYSAUX.266.1136924577 /home/grid/sysaux01.dbf
copying +data/aracdb/datafile/SYSAUX.266.1136924577 -> /home/grid/sysaux01.dbf

 

두 번째

> Using RMAN

[aracdb1:/home/oracle]> rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Thu Jan 25 11:12:10 2024
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ARACDB (DBID=2943394426)
RMAN> copy datafile 1 to '/home/oracle/system01.dbf'             ;
Starting backup at 24/01/25
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=277 instance=aracdb1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/ARACDB/DATAFILE/system.265.1136924533
output file name=/home/oracle/system01.dbf tag=TAG20240125T111517 RECID=1 STAMP=1159182926
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16
Finished backup at 24/01/25

Starting Control File and SPFILE Autobackup at 24/01/25
piece handle=+FRA/ARACDB/AUTOBACKUP/2024_01_25/s_1159182933.287.1159182935 comment=NONE
Finished Control File and SPFILE Autobackup at 24/01/25

 

세 번째

> Using DBMS package

SQL> desc dbms_file_transfer
PROCEDURE COPY_FILE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN
 SOURCE_FILE_NAME               VARCHAR2                IN
 DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN
 DESTINATION_FILE_NAME          VARCHAR2                IN
PROCEDURE COPY_FILE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN
 SOURCE_FILE_NAME               VARCHAR2                IN
 DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN
 DESTINATION_FILE_NAME          VARCHAR2                IN
 CREATED_FILE_NAME              VARCHAR2                OUT
 DESTINATION_FILE_TAG           VARCHAR2                IN     DEFAULT
PROCEDURE GET_FILE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN
 SOURCE_FILE_NAME               VARCHAR2                IN
 SOURCE_DATABASE                VARCHAR2                IN
 DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN
 DESTINATION_FILE_NAME          VARCHAR2                IN
PROCEDURE PUT_FILE
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN
 SOURCE_FILE_NAME               VARCHAR2                IN
 DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN
 DESTINATION_FILE_NAME          VARCHAR2                IN
 DESTINATION_DATABASE           VARCHAR2                IN

SQL> create directory SOURCE_DIR as '+DATA/aracdb/datafile';
Directory created.
SQL> create directory TARGET_DIR as '/oradata/';
Directory created.
SQL> BEGIN
  2  dbms_file_transfer.copy_file(source_directory_object =>
  3  'SOURCE_DIR', source_file_name => 'SYSAUX.266.1136924577',
  4  destination_directory_object => 'TARGET_DIR',
  5  destination_file_name => 'sysaux001.dbf');
  6  END;  
  7  /
PL/SQL procedure successfully completed.

 

[oracle@arac1 ~]$ cd /oradata
[oracle@arac1 oradata]$ ls
sysaux001.dbf
[oracle@arac1 oradata]$ ls -al
합계 542732
drwxr-xr-x.  2 oracle dba             26  1월 25 11:36 .
dr-xr-xr-x. 20 root   root          4096  1월 25 11:27 ..
-rw-r-----.  1 oracle asmadmin 555753472  1월 25 11:36 sysaux001.dbf

 

=============================================================

 

 ASM 에서 filesystem으로 복사 하는 3가지 방법이 있습니다.

위 3가지 방법 중에서는 1,2번(asmcmd cp,rman copy) 방법이 제일 간단히 할 수 있겠습니다.

감사합니다.

반응형
Posted by [PineTree]
ORACLE/ADMIN2024. 1. 18. 21:04
반응형

오라클 동적 리스너 설정 - single 서버 기준

 

-- 리스너 설정

listener.ora
LISTENER_TEST = (ADDRESS = (PROTOCOL = TCP)(HOST = ora19c)(PORT = 1529))

 

-- tns 설정
tnsnames.ora
LISTENER_TEST = (ADDRESS = (PROTOCOL = TCP)(HOST = ora19c)(PORT = 1529))

 

-- DB 접속 후 LOCAL LISTENER 등록


alter system set local_listener=' LISTENER_TEST';

show parameter local
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      LISTENER_TEST
parallel_force_local                 boolean     FALSE

 

 

 

 

[ora19c:/u01/app/oracle/product/19c/db_1/network/admin]> lsnrctl start listener_test

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-JAN-2024 17:45:57

Copyright (c) 1991, 2023, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/19c/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19c/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ora19c/listener_test/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c)(PORT=1529)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora19c)(PORT=1529)))
STATUS of the LISTENER
------------------------
Alias                     listener_test
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                18-JAN-2024 17:45:57
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora19c/listener_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c)(PORT=1529)))
The listener supports no services
The command completed successfully

 

alter system register;


[ora19c:/home/oracle]> lsnrctl status listener_test

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-JAN-2024 20:46:30

Copyright (c) 1991, 2023, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=ora19c)(PORT=1529))
STATUS of the LISTENER
------------------------
Alias                     listener_test
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                18-JAN-2024 20:45:32
Uptime                    0 days 0 hr. 0 min. 58 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora19c/listener_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c)(PORT=1529)))
Services Summary...
Service "ora19c" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
Service "ora19cXDB" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
The command completed successfully

반응형
Posted by [PineTree]
ORACLE/ADMIN2023. 12. 18. 17:33
반응형

rac asm 환경에서 파일을 일반 파일시스템으로 잘못 만들었을 때 ASM으로 이동
SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_data_files;

TABLESPACE_NAME                FILE_NAME                                          BYTES/1024/1024
------------------------------ -------------------------------------------------- ---------------
SYSTEM                         +DATA/RACDB/DATAFILE/system.257.1093539089                     910
SYSAUX                         +DATA/RACDB/DATAFILE/sysaux.258.1093539113                     640
UNDOTBS1                       +DATA/RACDB/DATAFILE/undotbs1.259.1093539129                   345
USERS                          +DATA/RACDB/DATAFILE/users.260.1093539129                        5
UNDOTBS2                       +DATA/RACDB/DATAFILE/undotbs2.270.1093539589                    25
IMSI                           /u01/app/oracle/product/19c/db_1/dbs/data1
ASMTBS                         +ASMDATA/RACDB/DATAFILE/asmtbs.256.1139007429                   14

7 rows selected.


SQL> alter tablespace imsi offline;

Tablespace altered.


rman 접속 후 copy
RMAN> copy datafile '/u01/app/oracle/product/19c/db_1/dbs/data1' to '+DATA'
2> ;

Starting backup at 23/12/18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=214 instance=racdb1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00015 name=/u01/app/oracle/product/19c/db_1/dbs/data1
output file name=+DATA/RACDB/DATAFILE/imsi.281.1155917741 tag=TAG20231218T161539 RECID=4 STAMP=1155918015
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
Finished backup at 23/12/18

Starting Control File and SPFILE Autobackup at 23/12/18
piece handle=/share/backup/rman/db_ctl_c-1091155962-20231218-00 comment=NONE
Finished Control File and SPFILE Autobackup at 23/12/18

RMAN> 
# asm위치로 변경(rename)
SQL> alter database rename file '/u01/app/oracle/product/19c/db_1/dbs/data1' to '+DATA/RACDB/DATAFILE/imsi.281.1155917741' ;

Database altered.

SQL> recover datafile '+DATA/RACDB/DATAFILE/imsi.281.1155917741';
Media recovery complete.

SQL> alter tablespace imsi online;

Tablespace altered.

반응형
Posted by [PineTree]