반응형

사전 주요 파일 백업

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ pwd
/home/oracle/DATASYNCXML
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.4
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 30 13:13:37 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/11.2.0.4/dbs/spfileTST.ora
SQL>
SQL> create pfile='/home/oracle/DATASYNCXML/initTST.ora_11g' from spfile;

File created.

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/home/oracle/DATASYNCXML/TST_cr_controlfile.sql_11g';

Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 11.2.0.4]$ cd $ORACLE_HOME/network/admin
[oracle@ol7 admin]$ ls
listener.ora  samples  shrept.lst
[oracle@ol7 admin]$ cp *.ora /home/oracle/DATASYNCXML
[oracle@ol7 admin]$ cd $ORACLE_HOME/dbs
[oracle@ol7 dbs]$ ls
hc_TST.dat  init.ora  initTST.ora  lkTST  orapwTST  spfileTST.ora
[oracle@ol7 dbs]$ cp spfileTST.ora /home/oracle/DATASYNCXML/spfileTST.ora_11g
[oracle@ol7 dbs]$ cp orapwTST /home/oracle/DATASYNCXML/orapwTST_11g
[oracle@ol7 dbs]$ cd /home/oracle/DATASYNCXML/
[oracle@ol7 DATASYNCXML]$ ls
initTST.ora_11g  listener.ora  orapwTST_11g  spfileTST.ora_11g  TST_cr_controlfile.sql_11g
[oracle@ol7 DATASYNCXML]$

preupgrade_fixups 수행

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ pwd
/home/oracle/DATASYNCXML
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.4
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/19.0.0.0/rdbms/admin/preupgrade.jar TERMINAL TEXT
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 13 on 2022-09-30T14:52:28

Upgrade-To version: 19.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
      Database Name:  TST
     Container Name:  Not Applicable in Pre-12.1 database
       Container ID:  Not Applicable in Pre-12.1 database
            Version:  11.2.0.4.0
     DB Patch Level:  PSU 11.2.0.4.201020
         Compatible:  11.2.0.4.0
          Blocksize:  8192
           Platform:  Linux x86 64-bit
      Timezone File:  14
  Database log mode:  ARCHIVELOG
           Readonly:  FALSE
            Edition:  EE

  Oracle Component                       Upgrade Action    Current Status
  ----------------                       --------------    --------------
  Oracle Server                          [to be upgraded]  VALID
  JServer JAVA Virtual Machine           [to be upgraded]  VALID
  Oracle XDK for Java                    [to be upgraded]  VALID
  Oracle Workspace Manager               [to be upgraded]  VALID
  OLAP Analytic Workspace                [to be upgraded]  VALID
  Oracle Enterprise Manager Repository   [to be upgraded]  VALID
  Oracle Text                            [to be upgraded]  VALID
  Oracle XML Database                    [to be upgraded]  VALID
  Oracle Java Packages                   [to be upgraded]  VALID
  Oracle Multimedia                      [to be upgraded]  VALID
  Oracle Spatial                         [to be upgraded]  VALID
  Expression Filter                      [to be upgraded]  VALID
  Rule Manager                           [to be upgraded]  VALID
  Oracle OLAP API                        [to be upgraded]  VALID

==============
BEFORE UPGRADE
==============

  REQUIRED ACTIONS
  ================
  1.  (AUTOFIXUP) Empty the RECYCLEBIN immediately before database upgrade.

      The database contains 5 objects in the recycle bin.

      The recycle bin must be completely empty before database upgrade.

  RECOMMENDED ACTIONS
  ===================
  2.  Update NUMERIC INITIALIZATION PARAMETERS to meet estimated minimums.
      This action may be done now or when starting the database in upgrade mode
      using the 19 ORACLE HOME.

       Parameter                                 Currently  19 minimum
       ---------                                 ---------  ------------------
       processes                                       150                 300

      The database upgrade process requires certain initialization parameters
      to meet minimum values.  The Oracle upgrade process itself has minimum
      values which may be higher and are marked with an asterisk.  After
      upgrading, those asterisked parameter values may be reset if needed.

  3.  Remove the EM repository.

      - Copy the $ORACLE_HOME/rdbms/admin/emremove.sql script from the target
      19 ORACLE_HOME into the source 11.2.0.4.0 ORACLE_HOME.

      Step 1: If database control is configured, stop EM Database Control,
      using the following command

        $> emctl stop dbconsole

      Step 2: Connect to the database using the SYS account AS SYSDBA

        SET ECHO ON;
        SET SERVEROUTPUT ON;
        @emremove.sql

      Without the set echo and serveroutput commands, you will not be able to
      follow the progress of the script.

      The database has an Enterprise Manager Database Control repository.

      Starting with Oracle Database 12c, the local Enterprise Manager Database
      Control does not exist anymore. The repository will be removed from your
      database during the upgrade.  This step can be manually performed before
      the upgrade to reduce downtime.

  4.  Remove OLAP Catalog by running the 11.2.0.4.0 SQL script
      $ORACLE_HOME/olap/admin/catnoamd.sql script.

      The OLAP Catalog component, AMD, exists in the database.

      Starting with Oracle Database 12c, the OLAP Catalog (OLAP AMD) is
      desupported and will be automatically marked as OPTION OFF during the
      database upgrade if present. Oracle recommends removing OLAP Catalog
      (OLAP AMD) before database upgrade.  This step can be manually performed
      before the upgrade to reduce downtime.

  5.  Upgrade Oracle Application Express (APEX) manually before the database
      upgrade.

      The database contains APEX version 3.2.1.00.12. Upgrade APEX to at least
      version 18.2.0.00.12.

      Starting with Oracle Database Release 18, APEX is not upgraded
      automatically as part of the database upgrade. Refer to My Oracle Support
      Note 1088970.1 for information about APEX installation and upgrades.

  6.  (AUTOFIXUP) Gather stale data dictionary statistics prior to database
      upgrade in off-peak time using:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Dictionary statistics do not exist or are stale (not up-to-date).

      Dictionary statistics help the Oracle optimizer find efficient SQL
      execution plans and are essential for proper upgrade timing. Oracle
      recommends gathering dictionary statistics in the last 24 hours before
      database upgrade.

      For information on managing optimizer statistics, refer to the 11.2.0.4
      Oracle Database Performance Tuning Guide.

  7.  (AUTOFIXUP) Directly grant ADMINISTER DATABASE TRIGGER privilege to the
      owner of the trigger or drop and re-create the trigger with a user that
      was granted directly with such. You can list those triggers using: SELECT
      OWNER, TRIGGER_NAME FROM DBA_TRIGGERS WHERE
      TRIM(BASE_OBJECT_TYPE)='DATABASE' AND OWNER NOT IN (SELECT GRANTEE FROM
      DBA_SYS_PRIVS WHERE PRIVILEGE='ADMINISTER DATABASE TRIGGER').

      There is one or more database triggers whose owner does not have the
      right privilege on the database.

      The creation of database triggers must be done by users granted with
      ADMINISTER DATABASE TRIGGER privilege. Privilege must have been granted
      directly.

  8.  (AUTOFIXUP) Gather statistics on fixed objects prior to the upgrade using
      the command:

        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

      None of the fixed object tables have had stats collected.

      Gathering statistics on fixed objects, if none have been gathered yet, is
      recommended prior to upgrading.

      For information on managing optimizer statistics, refer to the 11.2.0.4
      Oracle Database Performance Tuning Guide.

  INFORMATION ONLY
  ================
  9.  Here are ALL the components in this database registry:

      Component Current     Current     Original    Previous    Component
      CID       Version     Status      Version     Version     Schema
      --------- ----------- ----------- ----------- ----------- -----------
      AMD       11.2.0.4.0  VALID                               OLAPSYS
      APEX      3.2.1.00.12 VALID                               APEX_030200
      APS       11.2.0.4.0  VALID                               SYS
      CATALOG   11.2.0.4.0  VALID                               SYS
      CATJAVA   11.2.0.4.0  VALID                               SYS
      CATPROC   11.2.0.4.0  VALID                               SYS
      CONTEXT   11.2.0.4.0  VALID                               CTXSYS
      EM        11.2.0.4.0  VALID                               SYSMAN
      EXF       11.2.0.4.0  VALID                               EXFSYS
      JAVAVM    11.2.0.4.0  VALID                               SYS
      ORDIM     11.2.0.4.0  VALID                               ORDSYS
      OWB       11.2.0.4.0  VALID                               OWBSYS
      OWM       11.2.0.4.0  VALID                               WMSYS
      RUL       11.2.0.4.0  VALID                               EXFSYS
      SDO       11.2.0.4.0  VALID                               MDSYS
      XDB       11.2.0.4.0  VALID                               XDB
      XML       11.2.0.4.0  VALID                               SYS
      XOQ       11.2.0.4.0  VALID                               SYS

      Review the information before upgrading.

  10. To help you keep track of your tablespace allocations, the following
      AUTOEXTEND tablespaces are expected to successfully EXTEND during the
      upgrade process.

                                                 Min Size
      Tablespace                        Size     For Upgrade
      ----------                     ----------  -----------
      SYSAUX                             600 MB       747 MB
      SYSTEM                             750 MB      1186 MB

      Minimum tablespace sizes for upgrade are estimates.

  11. Run $ORACLE_HOME/rdbms/admin/catnoexf.sql located in the new Oracle
      Database Oracle home to remove both EXF and RUL.

      Expression Filter (EXF) or Rules Manager (RUL) exist in the database.

      Starting with Oracle Database release 12.1, the Expression Filter (EXF)
      and Database Rules Manager (RUL) features are desupported, and are
      removed during the upgrade process.  This step can be manually performed
      before the upgrade to reduce downtime.

  12. Ensure there is additional disk space in LOG_ARCHIVE_DEST_1 for at least
      4950 MB of archived logs.  Check alert log during the upgrade that there
      is no write error to the destination due to lack of disk space.

      Archiving cannot proceed if the archive log destination is full during
      upgrade.

      Archive Log Destination:
       Parameter    :  LOG_ARCHIVE_DEST_1
       Destination  :  /log/arch/

      The database has archiving enabled.  The upgrade process will need free
      disk space in the archive log destination(s) to generate archived logs to.

  13. Check the Oracle Backup and Recovery User's Guide for information on how
      to manage an RMAN recovery catalog schema.

      If you are using a version of the recovery catalog schema that is older
      than that required by the RMAN client version, then you must upgrade the
      catalog schema.

      It is good practice to have the catalog schema the same or higher version
      than the RMAN client version you are using.

  14. Here is a count of invalid objects by users:

      User Name                                   Number of INVALID Objects
      ---------------------------                 -------------------------
      None                                        None

      Review the information before upgrading.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database TST
  which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/u01/app/oracle/cfgtoollogs/TST/preupgrade/preupgrade_fixups.sql

=============
AFTER UPGRADE
=============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  15. Upgrade the database time zone file using the DBMS_DST package.

      The database is using time zone file version 14 and the target 19 release
      ships with time zone file version 32.

      Oracle recommends upgrading to the desired (latest) version of the time
      zone file.  For more information, refer to "Upgrading the Time Zone File
      and Timestamp with Time Zone Data" in the 19 Oracle Database
      Globalization Support Guide.

  16. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
      command:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Oracle recommends gathering dictionary statistics after upgrade.

      Dictionary statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans. After a database
      upgrade, statistics need to be re-gathered as there can now be tables
      that have significantly changed during the upgrade or new tables that do
      not have statistics gathered yet.

  17. Gather statistics on fixed objects after the upgrade and when there is a
      representative workload on the system using the command:

        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

      This recommendation is given for all preupgrade runs.

      Fixed object statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans.  Those
      statistics are specific to the Oracle Database release that generates
      them, and can be stale upon database upgrade.

      For information on managing optimizer statistics, refer to the 11.2.0.4
      Oracle Database Performance Tuning Guide.

  INFORMATION ONLY
  ================
  18. Check the Oracle documentation for the identified components for their
      specific upgrade procedure.

      The database upgrade script will not upgrade the following Oracle
      components:  OLAP Catalog,OWB

      The Oracle database upgrade script upgrades most, but not all Oracle
      Database components that may be installed.  Some components that are not
      upgraded may have their own upgrade scripts, or they may be deprecated or
      obsolete.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database TST
  which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/u01/app/oracle/cfgtoollogs/TST/preupgrade/postupgrade_fixups.sql


==================
PREUPGRADE SUMMARY
==================
  /u01/app/oracle/cfgtoollogs/TST/preupgrade/preupgrade.log
  /u01/app/oracle/cfgtoollogs/TST/preupgrade/preupgrade_fixups.sql
  /u01/app/oracle/cfgtoollogs/TST/preupgrade/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups
@/u01/app/oracle/cfgtoollogs/TST/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups
@/u01/app/oracle/cfgtoollogs/TST/preupgrade/postupgrade_fixups.sql

Preupgrade complete: 2022-09-30T14:52:29
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 30 14:57:46 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @/u01/app/oracle/cfgtoollogs/TST/preupgrade/preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 13
Generated on:            2022-09-30 14:52:25

For Source Database:     TST
Source Database Version: 11.2.0.4.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  purge_recyclebin          YES         None.
    2.  parameter_min_val         NO          Manual fixup recommended.
    3.  em_present                NO          Manual fixup recommended.
    4.  amd_exists                NO          Manual fixup recommended.
    5.  apex_manual_upgrade       NO          Manual fixup recommended.
    6.  dictionary_stats          YES         None.
    7.  trgowner_no_admndbtrg     YES         None.
    8.  pre_fixed_objects         YES         None.
    9.  component_info            NO          Informational only.
                                              Further action is optional.
   10.  tablespaces_info          NO          Informational only.
                                              Further action is optional.
   11.  exf_rul_exists            NO          Informational only.
                                              Further action is optional.
   12.  min_archive_dest_size     NO          Informational only.
                                              Further action is optional.
   13.  rman_recovery_version     NO          Informational only.
                                              Further action is optional.
   14.  invalid_all_obj_info      NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database is not ready
for upgrade.  To resolve the outstanding issues, start by reviewing
the preupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

Manual fixup 진행 및 DB Shutdown

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.4
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 30 15:06:25 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> show parameter processes

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     1
db_writer_processes                  integer     1
gcs_server_processes                 integer     0
global_txn_processes                 integer     1
job_queue_processes                  integer     1000
log_archive_max_processes            integer     4
processes                            integer     150
SQL>
SQL> alter system set processes=300 scope=spfile sid='*';

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ cp /u01/app/oracle/product/19.0.0.0/rdbms/admin/emremove.sql $ORACLE_HOME/rdbms/admin/emremove.sql
[oracle@ol7 DATASYNCXML]$ cd $ORACLE_HOME/rdbms/admin/
[oracle@ol7 admin]$ pwd
/u01/app/oracle/product/11.2.0.4/rdbms/admin
[oracle@ol7 admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 30 15:12:54 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> SET ECHO ON;
SQL> SET SERVEROUTPUT ON;
SQL> @emremove.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/emremove.sql /main/5 2017/05/28 22:46:05 stanaya Exp $
SQL> Rem
SQL> Rem emremove.sql
~~~~
Dropping synonym : MGMT$ALERT_CURRENT ...
Dropping synonym : MGMT$ALERT_ANNOTATIONS ...
Dropping synonym : EMD_MNTR ...
Dropping synonym : ECM_UTIL ...
Finished phase 5
Starting phase 6 : Dropping Oracle Enterprise Manager related other roles ...
Process DBSNMP user
Done processing DBSNMP user
Finished phase 6
The Oracle Enterprise Manager related schemas and objects are dropped.
Do the manual steps to studown the DB Control if not done before running this
script and then delete the DB Control configuration files

PL/SQL procedure successfully completed.

SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 admin]$
[oracle@ol7 admin]$ ls -al catnoamd.sql
-rw-r--r--. 1 oracle dba 11916 Apr 13  2013 catnoamd.sql
[oracle@ol7 admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 30 15:23:42 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @catnoamd.sql

Synonym dropped.
~~~~~~~~~~
Role dropped.


PL/SQL procedure successfully completed.


1 row deleted.

SQL>
SQL> PURGE DBA_RECYCLEBIN ;

DBA Recyclebin purged.

SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

PL/SQL procedure successfully completed.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 admin]$

11g 설정 파일을 19c로 복사

[oracle@ol7 ~]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.4
[oracle@ol7 ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-SEP-2022 15:28:17

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ol7.localdomain)(PORT=1521)))
The command completed successfully
[oracle@ol7 ~]$ cd DATASYNCXML/
[oracle@ol7 DATASYNCXML]$ ls
initTST.ora_11g  listener.ora  orapwTST_11g  spfileTST.ora_11g  TST_cr_controlfile.sql_11g
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/
[oracle@ol7 DATASYNCXML]$ ls
initTST.ora_11g  listener.ora  orapwTST_11g  spfileTST.ora_11g  TST_cr_controlfile.sql_11g
[oracle@ol7 DATASYNCXML]$ cp listener.ora $ORACLE_HOME/network/admin
[oracle@ol7 DATASYNCXML]$ cp spfileTST.ora_11g $ORACLE_HOME/dbs/spfileTST.ora
[oracle@ol7 DATASYNCXML]$ cp orapwTST_11g $ORACLE_HOME/dbs/orapwTST
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.0.0.0
[oracle@ol7 DATASYNCXML]$ orapwd file=/u01/app/oracle/product/19.0.0.0/dbs/orapwTST force=y format=12

Enter password for SYS:
[oracle@ol7 DATASYNCXML]$ ls -al /u01/app/oracle/product/19.0.0.0/dbs
total 16
drwxr-xr-x.  2 oracle dba   59 Sep 30 15:41 .
drwxr-xr-x. 70 oracle dba 4096 Sep 30 15:40 ..
-rw-r--r--.  1 oracle dba 3079 May 14  2015 init.ora
-rw-r-----.  1 oracle dba 2048 Sep 30 15:41 orapwTST
-rw-r-----.  1 oracle dba 2560 Sep 30 15:31 spfileTST.ora
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 30-SEP-2022 15:42:36

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

Starting /u01/app/oracle/product/19.0.0.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19.0.0.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ol7/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol7)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ol7.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                30-SEP-2022 15:42:36
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/19.0.0.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ol7/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol7)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@ol7 DATASYNCXML]$

Oracle DB 19c Upgrade

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.0.0.0
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Sep 30 15:43:49 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1660940992 bytes
Fixed Size                  8897216 bytes
Variable Size             956301312 bytes
Database Buffers          687865856 bytes
Redo Buffers                7876608 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ $ORACLE_HOME/bin/dbupgrade

Argument list for [/u01/app/oracle/product/19.0.0.0/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in                       c = 0
Do not run in                C = 0
Input Directory              d = 0
Echo OFF                     e = 1
Simulate                     E = 0
Forced cleanup               F = 0
Log Id                       i = 0
Child Process                I = 0
Log Dir                      l = 0
Priority List Name           L = 0
Upgrade Mode active          M = 0
SQL Process Count            n = 0
SQL PDB Process Count        N = 0
Open Mode Normal             o = 0
Start Phase                  p = 0
End Phase                    P = 0
Reverse Order                r = 0
AutoUpgrade Resume           R = 0
Script                       s = 0
Serial Run                   S = 0
RO User Tablespaces          T = 0
Display Phases               y = 0
Debug catcon.pm              z = 0
Debug catctl.pl              Z = 0

catctl.pl VERSION: [19.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_19.16.0.0.0DBRU_LINUX.X64_220701]


/u01/app/oracle/product/19.0.0.0/rdbms/admin/orahome = [/u01/app/oracle/product/19.0.0.0]
/u01/app/oracle/product/19.0.0.0/bin/orabasehome = [/u01/app/oracle/product/19.0.0.0]
catctlGetOraBaseLogDir = [/u01/app/oracle/product/19.0.0.0]

Analyzing file /u01/app/oracle/product/19.0.0.0/rdbms/admin/catupgrd.sql

Log file directory = [/tmp/cfgtoollogs/upgrade20220930154446]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20220930154446/catupgrd_catcon_11869.lst]

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20220930154446/catupgrd*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20220930154446/catupgrd_*.lst] files for spool files, if any


Number of Cpus        = 2
Database Name         = TST
DataBase Version      = 11.2.0.4.0
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447/catupgrd_catcon_11869.lst]

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447/catupgrd*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447/catupgrd_*.lst] files for spool files, if any


Log file directory = [/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447]

Parallel SQL Process Count            = 4
Components in [TST]
    Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT JAVAVM ORDIM OWM SDO XDB XML XOQ]
Not Installed [DV EM MGW ODM OLS RAC WK]
DataBase Version      = 11.2.0.4.0

------------------------------------------------------
Phases [0-107]         Start Time:[2022_09_30 15:44:48]
------------------------------------------------------
***********   Executing Change Scripts   ***********
Serial   Phase #:0    [TST] Files:1    Time: 60s
***************   Catalog Core SQL   ***************
Serial   Phase #:1    [TST] Files:5    Time: 44s
Restart  Phase #:2    [TST] Files:1    Time: 0s
***********   Catalog Tables and Views   ***********
Parallel Phase #:3    [TST] Files:19   Time: 23s
Restart  Phase #:4    [TST] Files:1    Time: 0s
*************   Catalog Final Scripts   ************
Serial   Phase #:5    [TST] Files:7    Time: 17s
*****************   Catproc Start   ****************
Serial   Phase #:6    [TST] Files:1    Time: 10s
*****************   Catproc Types   ****************
Serial   Phase #:7    [TST] Files:2    Time: 7s
Restart  Phase #:8    [TST] Files:1    Time: 0s
****************   Catproc Tables   ****************
Parallel Phase #:9    [TST] Files:70   Time: 25s
Restart  Phase #:10   [TST] Files:1    Time: 1s
*************   Catproc Package Specs   ************
Serial   Phase #:11   [TST] Files:1    Time: 54s
Restart  Phase #:12   [TST] Files:1    Time: 0s
**************   Catproc Procedures   **************
Parallel Phase #:13   [TST] Files:95   Time: 6s
Restart  Phase #:14   [TST] Files:1    Time: 0s
Parallel Phase #:15   [TST] Files:122  Time: 10s
Restart  Phase #:16   [TST] Files:1    Time: 0s
Serial   Phase #:17   [TST] Files:25   Time: 2s
Restart  Phase #:18   [TST] Files:1    Time: 1s
*****************   Catproc Views   ****************
Parallel Phase #:19   [TST] Files:32   Time: 14s
Restart  Phase #:20   [TST] Files:1    Time: 0s
Serial   Phase #:21   [TST] Files:3    Time: 9s
Restart  Phase #:22   [TST] Files:1    Time: 1s
Parallel Phase #:23   [TST] Files:25   Time: 166s
Restart  Phase #:24   [TST] Files:1    Time: 0s
Parallel Phase #:25   [TST] Files:12   Time: 102s
Restart  Phase #:26   [TST] Files:1    Time: 0s
Serial   Phase #:27   [TST] Files:1    Time: 0s
Serial   Phase #:28   [TST] Files:4    Time: 2s
Serial   Phase #:29   [TST] Files:1    Time: 0s
Restart  Phase #:30   [TST] Files:1    Time: 0s
***************   Catproc CDB Views   **************
Serial   Phase #:31   [TST] Files:1    Time: 1s
Restart  Phase #:32   [TST] Files:1    Time: 0s
Serial   Phase #:34   [TST] Files:1    Time: 0s
*****************   Catproc PLBs   *****************
Serial   Phase #:35   [TST] Files:297  Time: 18s
Serial   Phase #:36   [TST] Files:1    Time: 0s
Restart  Phase #:37   [TST] Files:1    Time: 0s
Serial   Phase #:38   [TST] Files:10   Time: 4s
Restart  Phase #:39   [TST] Files:1    Time: 0s
***************   Catproc DataPump   ***************
Serial   Phase #:40   [TST] Files:3    Time: 37s
Restart  Phase #:41   [TST] Files:1    Time: 0s
******************   Catproc SQL   *****************
Parallel Phase #:42   [TST] Files:13   Time: 104s
Restart  Phase #:43   [TST] Files:1    Time: 0s
Parallel Phase #:44   [TST] Files:11   Time: 8s
Restart  Phase #:45   [TST] Files:1    Time: 0s
Parallel Phase #:46   [TST] Files:3    Time: 1s
Restart  Phase #:47   [TST] Files:1    Time: 0s
*************   Final Catproc scripts   ************
Serial   Phase #:48   [TST] Files:1    Time: 9s
Restart  Phase #:49   [TST] Files:1    Time: 0s
**************   Final RDBMS scripts   *************
Serial   Phase #:50   [TST] Files:1    Time: 18s
************   Upgrade Component Start   ***********
Serial   Phase #:51   [TST] Files:1    Time: 1s
Restart  Phase #:52   [TST] Files:1    Time: 0s
**********   Upgrading Java and non-Java   *********
Serial   Phase #:53   [TST] Files:2    Time: 307s
*****************   Upgrading XDB   ****************
Restart  Phase #:54   [TST] Files:1    Time: 1s
Serial   Phase #:56   [TST] Files:3    Time: 18s
Serial   Phase #:57   [TST] Files:3    Time: 2s
Parallel Phase #:58   [TST] Files:10   Time: 1s
Parallel Phase #:59   [TST] Files:25   Time: 3s
Serial   Phase #:60   [TST] Files:4    Time: 6s
Serial   Phase #:61   [TST] Files:1    Time: 0s
Serial   Phase #:62   [TST] Files:32   Time: 2s
Serial   Phase #:63   [TST] Files:1    Time: 0s
Parallel Phase #:64   [TST] Files:6    Time: 5s
Serial   Phase #:65   [TST] Files:2    Time: 14s
Serial   Phase #:66   [TST] Files:3    Time: 52s
****************   Upgrading ORDIM   ***************
Restart  Phase #:67   [TST] Files:1    Time: 0s
Serial   Phase #:69   [TST] Files:1    Time: 1s
Parallel Phase #:70   [TST] Files:2    Time: 28s
Restart  Phase #:71   [TST] Files:1    Time: 0s
Parallel Phase #:72   [TST] Files:2    Time: 1s
Serial   Phase #:73   [TST] Files:2    Time: 0s
*****************   Upgrading SDO   ****************
Restart  Phase #:74   [TST] Files:1    Time: 0s
Serial   Phase #:76   [TST] Files:1    Time: 30s
Serial   Phase #:77   [TST] Files:2    Time: 1s
Restart  Phase #:78   [TST] Files:1    Time: 0s
Serial   Phase #:79   [TST] Files:1    Time: 12s
Restart  Phase #:80   [TST] Files:1    Time: 1s
Parallel Phase #:81   [TST] Files:3    Time: 28s
Restart  Phase #:82   [TST] Files:1    Time: 1s
Serial   Phase #:83   [TST] Files:1    Time: 3s
Restart  Phase #:84   [TST] Files:1    Time: 0s
Serial   Phase #:85   [TST] Files:1    Time: 7s
Restart  Phase #:86   [TST] Files:1    Time: 1s
Parallel Phase #:87   [TST] Files:4    Time: 74s
Restart  Phase #:88   [TST] Files:1    Time: 0s
Serial   Phase #:89   [TST] Files:1    Time: 1s
Restart  Phase #:90   [TST] Files:1    Time: 0s
Serial   Phase #:91   [TST] Files:2    Time: 7s
Restart  Phase #:92   [TST] Files:1    Time: 1s
Serial   Phase #:93   [TST] Files:1    Time: 0s
Restart  Phase #:94   [TST] Files:1    Time: 0s
*******   Upgrading ODM, WK, EXF, RUL, XOQ   *******
Serial   Phase #:95   [TST] Files:1    Time: 17s
Restart  Phase #:96   [TST] Files:1    Time: 1s
***********   Final Component scripts    ***********
Serial   Phase #:97   [TST] Files:1    Time: 2s
*************   Final Upgrade scripts   ************
Serial   Phase #:98   [TST] Files:1    Time: 55s
*******************   Migration   ******************
Serial   Phase #:99   [TST] Files:1    Time: 28s
***   End PDB Application Upgrade Pre-Shutdown   ***
Serial   Phase #:100  [TST] Files:1    Time: 1s
Serial   Phase #:101  [TST] Files:1    Time: 0s
Serial   Phase #:102  [TST] Files:1    Time: 30s
*****************   Post Upgrade   *****************
Serial   Phase #:103  [TST] Files:1    Time: 24s
****************   Summary report   ****************
Serial   Phase #:104  [TST] Files:1    Time: 1s
***   End PDB Application Upgrade Post-Shutdown   **
Serial   Phase #:105  [TST] Files:1    Time: 0s
Serial   Phase #:106  [TST] Files:1    Time: 0s
Serial   Phase #:107  [TST] Files:1     Time: 53s

------------------------------------------------------
Phases [0-107]         End Time:[2022_09_30 16:11:03]
------------------------------------------------------

Grand Total Time: 1575s

 LOG FILES: (/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447/catupgrd*.log)

Upgrade Summary Report Located in:
/u01/app/oracle/product/19.0.0.0/cfgtoollogs/TST/upgrade20220930154447/upg_summary.log

Grand Total Upgrade Time:    [0d:0h:26m:15s]
[oracle@ol7 DATASYNCXML]$

Upgrade 후속 작업 및 Upgrade 확인

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.0.0.0
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Sep 30 16:14:34 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1660940992 bytes
Fixed Size                  8897216 bytes
Variable Size            1124073472 bytes
Database Buffers          520093696 bytes
Redo Buffers                7876608 bytes
Database mounted.
Database opened.
SQL>
SQL> @/u01/app/oracle/cfgtoollogs/TST/preupgrade/postupgrade_fixups.sql

Session altered.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.

No errors.

Package body created.


PL/SQL procedure successfully completed.

No errors.

Package created.

No errors.

Package body created.

No errors.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 13
Generated on:            2022-09-30 14:52:28

For Source Database:     TST
Source Database Version: 11.2.0.4.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
   15.  old_time_zones_exist      NO          Manual fixup recommended.
   16.  post_dictionary           YES         None.
   17.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.
   18.  upg_by_std_upgrd          YES         None.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database upgrade is not
fully complete.  To resolve the outstanding issues, start by reviewing
the postupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.


Session altered.

SQL>
SQL> select BANNER from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

SQL>
SQL>
SQL>
SQL> SET LINESIZE 400
SQL> COLUMN ACTION_TIME FORMAT A20
SQL> COLUMN ACTION FORMAT A10
SQL> COLUMN STATUS FORMAT A10
SQL> COLUMN DESCRIPTION FORMAT A60
SQL> COLUMN VERSION FORMAT A10
SQL> SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME,ACTION,STATUS,DESCRIPTION,SOURCE_VERSION
  2  ,TARGET_VERSION,PATCH_ID FROM DBA_REGISTRY_SQLPATCH ORDER BY ACTION_TIME;

ACTION_TIME          ACTION     STATUS     DESCRIPTION                                                  SOURCE_VERSION  TARGET_VERSION    PATCH_ID
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
20220930 16:08:39    APPLY      SUCCESS    Database Release Update : 19.16.0.0.220719 (34133642)        19.1.0.0.0      19.16.0.0.0       34133642

SQL>
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /log/arch/
Oldest online log sequence     139
Next log sequence to archive   141
Current log sequence           141
SQL>
SQL>
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      11.2.0.4.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL>
SQL> alter system set compatible='19.0.0' scope=spfile sid='*';

System altered.

SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Sep 30 16:46:42 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1660940992 bytes
Fixed Size                  8897216 bytes
Variable Size            1090519040 bytes
Database Buffers          553648128 bytes
Redo Buffers                7876608 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      19.0.0
noncdb_compatible                    boolean     FALSE
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
[oracle@ol7 DATASYNCXML]$
반응형
반응형

기존상태 확인

[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 09:34:42 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> --SPFILE 확인
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /dev/raw/raw9
SQL>
SQL> --Control File 확인
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/dev/raw/raw10
/dev/raw/raw11
SQL>
SQL> --Data File 확인
SQL> col FILE_NAME for a30
SQL> select TABLESPACE_NAME, FILE_NAME from dba_data_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
SYSTEM                         /dev/raw/raw1
SYSAUX                         /dev/raw/raw2
UNDOTBS1                       /dev/raw/raw5
USERS                          /dev/raw/raw4
TS_DATA                        /dev/raw/raw12
TS_IDX                         /dev/raw/raw13
6 rows selected.
SQL>
SQL> --Temp File 확인
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP                           /dev/raw/raw3
SQL>
SQL> --Redo Log 확인
SQL> SET LINESIZE 150
SQL> COLUMN member FORMAT A20
SQL> COLUMN first_change# FORMAT 99999999999999999999
SQL> COLUMN next_change# FORMAT 99999999999999999999
SQL> SELECT l.thread#,
SQL>        lf.group#,
SQL>        lf.member,
SQL>        TRUNC(l.bytes/1024/1024) AS size_mb,
SQL>        l.status,
SQL>        l.archived,
SQL>        lf.type,
SQL>        lf.is_recovery_dest_file AS rdf,
SQL>        l.sequence#,
SQL>        l.first_change#,
SQL>        l.next_change#   
SQL> FROM   v$logfile lf
SQL>        JOIN v$log l ON l.group# = lf.group#
SQL> ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                  SIZE_MB STATUS           ARC TYPE    RDF  SEQUENCE#         FIRST_CHANGE#          NEXT_CHANGE#
---------- ---------- -------------------- ---------- ---------------- --- ------- --- ---------- --------------------- ---------------------
         1          1 /dev/raw/raw6                50 CURRENT          NO  ONLINE  NO          85                818528       281474976710655
         1          2 /dev/raw/raw7                50 INACTIVE         YES ONLINE  NO          83                818196                818419
         1          3 /dev/raw/raw8                50 INACTIVE         YES ONLINE  NO          84                818419                818528

SQL>
SQL> --Archive Log 확인
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /log/arch/
Oldest online log sequence     83
Next log sequence to archive   85
Current log sequence           85
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

RMAN를 이용한 Rawdevice를 Filesystem으로 변경 하기

사전 확인 / 주요 파일 백업 DB 종료

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ pwd
/home/oracle/DATASYNCXML
[oracle@ol7 DATASYNCXML]$ ls
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 09:54:41 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> --Spfile 백업
SQL> create pfile='/home/oracle/DATASYNCXML/initTST.ora_org' from spfile;
File created.
SQL>
SQL> --Control File 백업
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/home/oracle/DATASYNCXML/TST_cr_controlfile.sql';
Database altered.
SQL>
SQL> --주요 Table Row수 확인
SQL> select count(*) from scott.big_emp;
  COUNT(*)
----------
   3440640
SQL>
SQL> --SCN Number 확인
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
                  819396

SQL>
SQL> --DB 종료
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

RMAN으로 Rawdevice를 Filesystem으로 변경 하기(Temp/Redo/Control 제외)

[oracle@ol7 DATASYNCXML]$ id
uid=54321(oracle) gid=54322(dba) groups=54322(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 10:30:54 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> --DB를 Mounut 하기
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1040190504 bytes
Database Buffers          603979776 bytes
Redo Buffers                7094272 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 29 10:36:46 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TST (DBID=2257768950, not open)
RMAN> run {
2> allocate channel c1 type disk;
3> copy datafile '/dev/raw/raw1' to '/oradata/system/sytem01.dbf';
4> copy datafile '/dev/raw/raw2' to '/oradata/system/sysaux01.dbf';
5> copy datafile '/dev/raw/raw5' to '/oradata/system/unotodb01.dbf';
6> copy datafile '/dev/raw/raw4' to '/oradata/system/user01.dbf';
7> copy datafile '/dev/raw/raw12' to '/oradata/data/ts_data_01.dbf';
8> copy datafile '/dev/raw/raw13' to '/oradata/idx/ts_indx_01.dbf';
9> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=133 device type=DISK
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00001 name=/dev/raw/raw1
output file name=/oradata/system/sytem01.dbf tag=TAG20220929T103806 RECID=1 STAMP=1116671888
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 29-SEP-22
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00002 name=/dev/raw/raw2
output file name=/oradata/system/sysaux01.dbf tag=TAG20220929T103809 RECID=2 STAMP=1116671891
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 29-SEP-22
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00003 name=/dev/raw/raw5
output file name=/oradata/system/unotodb01.dbf tag=TAG20220929T103812 RECID=3 STAMP=1116671895
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 29-SEP-22
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00004 name=/dev/raw/raw4
output file name=/oradata/system/user01.dbf tag=TAG20220929T103815 RECID=4 STAMP=1116671895
channel c1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 29-SEP-22
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00005 name=/dev/raw/raw12
output file name=/oradata/data/ts_data_01.dbf tag=TAG20220929T103816 RECID=5 STAMP=1116671899
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 29-SEP-22
Starting backup at 29-SEP-22
channel c1: starting datafile copy
input datafile file number=00006 name=/dev/raw/raw13
output file name=/oradata/idx/ts_indx_01.dbf tag=TAG20220929T103820 RECID=6 STAMP=1116671902
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 29-SEP-22
released channel: c1
RMAN> exit
Recovery Manager complete.
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 10:40:08 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL>
SQL> --DBF File Rename
SQL> alter database rename file '/dev/raw/raw1' to '/oradata/system/sytem01.dbf';
Database altered.
SQL> alter database rename file '/dev/raw/raw2' to '/oradata/system/sysaux01.dbf';
Database altered.
SQL> alter database rename file '/dev/raw/raw5' to '/oradata/system/unotodb01.dbf';
Database altered.
SQL> alter database rename file '/dev/raw/raw4' to '/oradata/system/user01.dbf';
Database altered.
SQL> alter database rename file '/dev/raw/raw12' to '/oradata/data/ts_data_01.dbf';
Database altered.
SQL> alter database rename file '/dev/raw/raw13' to '/oradata/idx/ts_indx_01.dbf';
Database altered.
SQL>
SQL> --Database Open
SQL> alter database open;
Database altered.
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> select count(*) from scott.big_emp;
  COUNT(*)
----------
   3440640
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
                  819977
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

Temp Tablespace Filesystem으로 생성 및 기존 Raw Device Temp Tablespace 삭제

[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 10:46:40 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> --사용자 기본 Temp Tablespace 확인
SQL> select username, TEMPORARY_TABLESPACE from dba_users where ACCOUNT_STATUS='OPEN';
USERNAME                       TEMPORARY_TABLESPACE
------------------------------ ------------------------------
SYSTEM                         TEMP
SYS                            TEMP
SCOTT                          TEMP
SQL>
SQL>  --Temp Tablespace 상태 학인
SQL> col FILE_NAME for a20
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ --------------------
TEMP                           /dev/raw/raw3
SQL>
SQL> --임시 Temp Tablespace 생성 및 기존 Raw Device Temp Tablespace 삭제
SQL> create temporary tablespace temp2 tempfile '/oradata/temp/imsi01.dbf' size 512m autoextend on;
Tablespace created.
SQL> alter database default temporary tablespace temp2;
Database altered.
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP                           /dev/raw/raw3
TEMP2                          /oradata/temp/imsi01.dbf
SQL> select username, TEMPORARY_TABLESPACE from dba_users where ACCOUNT_STATUS='OPEN';
USERNAME                       TEMPORARY_TABLESPACE
------------------------------ ------------------------------
SYSTEM                         TEMP2
SYS                            TEMP2
SCOTT                          TEMP2
SQL>
SQL> drop tablespace temp;
Tablespace dropped.
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP2                          /oradata/temp/imsi01.dbf
SQL>
SQL> --정식 Temp Tablespace 생성 및 임시 Temp Tablespace 삭제
SQL> create temporary tablespace temp tempfile '/oradata/temp/temp01.dbf' size 512m autoextend on;
Tablespace created.
SQL> alter database default temporary tablespace temp;
Database altered.
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP                           /oradata/temp/temp01.dbf
TEMP2                          /oradata/temp/imsi01.dbf
SQL> select username, TEMPORARY_TABLESPACE from dba_users where ACCOUNT_STATUS='OPEN';
USERNAME                       TEMPORARY_TABLESPACE
------------------------------ ------------------------------
SYSTEM                         TEMP
SYS                            TEMP
SCOTT                          TEMP
SQL>
SQL> drop tablespace TEMP2;
Tablespace dropped.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

File system으로 Redolog 생성 및 기존 Raw Device Redolog 삭제

[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:09:32 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> --현 상태 학인
SQL> SET LINESIZE 150
SQL> COLUMN member FORMAT A50
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /dev/raw/raw6                                      CURRENT          NO  ONLINE
         1          2 /dev/raw/raw7                                      INACTIVE         YES ONLINE
         1          3 /dev/raw/raw8                                      INACTIVE         YES ONLINE

SQL>
SQL> --임시 Redo Log 생성
SQL> alter database add logfile group 11 '/oradata/redo1/imsi_redo11.log' size 200m;
Database altered.
SQL> alter database add logfile group 12 '/oradata/redo1/imsi_redo12.log' size 200m;
Database altered.
SQL> alter database add logfile group 13 '/oradata/redo1/imsi_redo13.log' size 200m;
Database altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /dev/raw/raw6                                      CURRENT          NO  ONLINE
         1          2 /dev/raw/raw7                                      INACTIVE         YES ONLINE
         1          3 /dev/raw/raw8                                      INACTIVE         YES ONLINE
         1         11 /oradata/redo1/imsi_redo11.log                     UNUSED           YES ONLINE
         1         12 /oradata/redo1/imsi_redo12.log                     UNUSED           YES ONLINE
         1         13 /oradata/redo1/imsi_redo13.log                     UNUSED           YES ONLINE

6 rows selected.
SQL>
SQL> --기존 Rawdevice Redo Log 삭제
SQL> alter system switch logfile; --3~4회 반복
System altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;
   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /dev/raw/raw6                                      INACTIVE         YES ONLINE
         1          2 /dev/raw/raw7                                      INACTIVE         YES ONLINE
         1          3 /dev/raw/raw8                                      INACTIVE         YES ONLINE
         1         11 /oradata/redo1/imsi_redo11.log                     CURRENT          NO  ONLINE
         1         12 /oradata/redo1/imsi_redo12.log                     INACTIVE         YES ONLINE
         1         13 /oradata/redo1/imsi_redo13.log                     INACTIVE         YES ONLINE

6 rows selected.
SQL>
SQL> --리두로그 상태가 INACTIVE 인 경우만 삭제 가능
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database drop logfile group 3;
Database altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1         11 /oradata/redo1/imsi_redo11.log                     CURRENT          NO  ONLINE
         1         12 /oradata/redo1/imsi_redo12.log                     INACTIVE         YES ONLINE
         1         13 /oradata/redo1/imsi_redo13.log                     INACTIVE         YES ONLINE
SQL>
SQL>
SQL> --정식 Redo log 생성
SQL> alter database add logfile group 1 '/oradata/redo1/redo11.log' size 200m;
Database altered.
SQL> alter database add logfile group 2 '/oradata/redo1/redo12.log' size 200m;
Database altered.
SQL> alter database add logfile group 3 '/oradata/redo1/redo13.log' size 200m;
Database altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;
   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /oradata/redo1/redo11.log                          UNUSED           YES ONLINE
         1          2 /oradata/redo1/redo12.log                          UNUSED           YES ONLINE
         1          3 /oradata/redo1/redo13.log                          UNUSED           YES ONLINE
         1         11 /oradata/redo1/imsi_redo11.log                     CURRENT          NO  ONLINE
         1         12 /oradata/redo1/imsi_redo12.log                     INACTIVE         YES ONLINE
         1         13 /oradata/redo1/imsi_redo13.log                     INACTIVE         YES ONLINE

6 rows selected.
SQL>
SQL> --임시 Redo Log 삭제
SQL> alter system switch logfile; --3~4회 반복
System altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /oradata/redo1/redo11.log                          INACTIVE         YES ONLINE
         1          2 /oradata/redo1/redo12.log                          CURRENT          NO  ONLINE
         1          3 /oradata/redo1/redo13.log                          INACTIVE         YES ONLINE
         1         11 /oradata/redo1/imsi_redo11.log                     INACTIVE         YES ONLINE
         1         12 /oradata/redo1/imsi_redo12.log                     INACTIVE         YES ONLINE
         1         13 /oradata/redo1/imsi_redo13.log                     INACTIVE         YES ONLINE

6 rows selected.
SQL>
SQL> --리두로그 상태가 INACTIVE 인 경우만 삭제 가능
SQL> alter database drop logfile group 11;
Database altered.
SQL> alter database drop logfile group 12;
Database altered.
SQL> alter database drop logfile group 13;
Database altered.
SQL> SELECT l.thread#, lf.group#, lf.member, l.status, l.archived, lf.type
  2  FROM   v$logfile lf
  3  JOIN v$log l ON l.group# = lf.group#
  4  ORDER BY l.thread#,lf.group#, lf.member;
   THREAD#     GROUP# MEMBER                                             STATUS           ARC TYPE
---------- ---------- -------------------------------------------------- ---------------- --- -------
         1          1 /oradata/redo1/redo11.log                          INACTIVE         YES ONLINE
         1          2 /oradata/redo1/redo12.log                          CURRENT          NO  ONLINE
         1          3 /oradata/redo1/redo13.log                          INACTIVE         YES ONLINE

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

Control File/Spfile을 File systemd로 변경 하기

[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:34:55 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> --Control File 상태 확인
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/dev/raw/raw10
/dev/raw/raw11
SQL> --DB 중지
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:37:46 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> --DB NOMOUNT
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1040190504 bytes
Database Buffers          603979776 bytes
Redo Buffers                7094272 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ --rman을 이용하여 Control File Resotre
[oracle@ol7 DATASYNCXML]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 29 11:40:17 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TST (not mounted)
RMAN> restore controlfile to '/oradata/control/control01.ctl' from '/dev/raw/raw10';
Starting restore at 29-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 29-SEP-22
RMAN> quit
Recovery Manager complete.
[oracle@ol7 DATASYNCXML]$ --Control File을 다중화를 위해서 복사
[oracle@ol7 DATASYNCXML]$ ls -al /oradata/control/control01.ctl
-rw-r-----. 1 oracle dba 10043392 Sep 29 11:40 /oradata/control/control01.ctl
[oracle@ol7 DATASYNCXML]$ cp /oradata/control/control01.ctl /oradata/control/control02.ctl
[oracle@ol7 DATASYNCXML]$ ls -al /oradata/control/control*
-rw-r-----. 1 oracle dba 10043392 Sep 29 11:40 /oradata/control/control01.ctl
-rw-r-----. 1 oracle dba 10043392 Sep 29 11:41 /oradata/control/control02.ctl
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:41:23 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> --DB Shutdown
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ pwd
/home/oracle/DATASYNCXML
[oracle@ol7 DATASYNCXML]$ ls
initTST.ora_org  TST_cr_controlfile.sql
[oracle@ol7 DATASYNCXML]$ cp initTST.ora_org imsiTST.ora
[oracle@ol7 DATASYNCXML]$ vi imsiTST.ora
[oracle@ol7 DATASYNCXML]$ more imsiTST.ora
*.audit_file_dest='/log/dblog/admin/TST/adump'
*.audit_trail='none'
*.compatible='11.2.0.4.0'
#*.control_files='/dev/raw/raw10','/dev/raw/raw11' --주석 처리
*.control_files='/oradata/control/control01.ctl','/oradata/control/control02.ctl' --변경 Control File 추가
*.db_block_size=8192
*.db_domain=''
*.db_name='TST'
*.diagnostic_dest='/log/dblog/'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=TSTXDB)'
*.log_archive_dest_1='location=/log/arch/'
*.log_archive_format='TST_%t_%s_%r.log'
*.memory_target=1645215744
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
[oracle@ol7 DATASYNCXML]$
[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:45:59 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> --임시 Pfile을 이용하여 DB Startup
SQL> startup pfile='/home/oracle/DATASYNCXML/imsiTST.ora';
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1006636072 bytes
Database Buffers          637534208 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL>
SQL> --Spfile 생성
SQL> create spfile from pfile='/home/oracle/DATASYNCXML/imsiTST.ora';
File created.
SQL> !ls -al /u01/app/oracle/product/11.2.0.4/dbs/sp*
-rw-r-----. 1 oracle dba 2560 Sep 29 11:47 /u01/app/oracle/product/11.2.0.4/dbs/spfileTST.ora
SQL> 
SQL> --DB Restart
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1006636072 bytes
Database Buffers          637534208 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

최종 상태 확인

[oracle@ol7 DATASYNCXML]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 29 11:50:35 2022
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> --SPFILE 확인
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/11.2.0.4/dbs/spfileTST.ora
SQL>
SQL> --Control File 확인
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/oradata/control/control01.ctl
/oradata/control/control02.ctl
SQL>
SQL> --Data File 확인
SQL> col FILE_NAME for a30
SQL> select TABLESPACE_NAME, FILE_NAME from dba_data_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
SYSTEM                         /oradata/system/sytem01.dbf
SYSAUX                         /oradata/system/sysaux01.dbf
UNDOTBS1                       /oradata/system/unotodb01.dbf
USERS                          /oradata/system/user01.dbf
TS_DATA                        /oradata/data/ts_data_01.dbf
TS_IDX                         /oradata/idx/ts_indx_01.dbf
6 rows selected.
SQL>
SQL> --Temp File 확인
SQL> select TABLESPACE_NAME, FILE_NAME from dba_temp_files;
TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP                           /oradata/temp/temp01.dbf
SQL>
SQL> --Redo Log 확인
SQL> SET LINESIZE 200
SQL> COLUMN member FORMAT A50
SQL> COLUMN first_change# FORMAT 99999999999999999999
SQL> COLUMN next_change# FORMAT 99999999999999999999
SQL> SELECT l.thread#,lf.group#,lf.member,TRUNC(l.bytes/1024/1024) AS size_mb,l.status,l.archived,lf.type,
  2  lf.is_recovery_dest_file AS rdf,l.sequence#,l.first_change#,l.next_change#
  3  FROM   v$logfile lf
  4  JOIN v$log l ON l.group# = lf.group#
  5  ORDER BY l.thread#,lf.group#, lf.member;

   THREAD#     GROUP# MEMBER                                                SIZE_MB STATUS           ARC TYPE    RDF  SEQUENCE#         FIRST_CHANGE#          NEXT_CHANGE#
---------- ---------- -------------------------------------------------- ---------- ---------------- --- ------- --- ---------- --------------------- ---------------------
         1          1 /oradata/redo1/redo11.log                                 200 INACTIVE         YES ONLINE  NO         105                822039                822042
         1          2 /oradata/redo1/redo12.log                                 200 CURRENT          NO  ONLINE  NO         106                822042       281474976710655
         1          3 /oradata/redo1/redo13.log                                 200 INACTIVE         YES ONLINE  NO         101                822002                822005

SQL>
SQL> --Archive Log 확인
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /log/arch/
Oldest online log sequence     101
Next log sequence to archive   106
Current log sequence           106
SQL>
SQL> --주요 Table Row수 확인
SQL> select count(*) from scott.big_emp;
  COUNT(*)
----------
   3440640
SQL>
SQL> --SCN Number 확인
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
                  823169
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol7 DATASYNCXML]$

참고문서

Raw Device 에서 File System 으로 데이타파일 변환하기 (문서 ID 1907460.1)

 

반응형
반응형

기존 상태 확인

[grid@one19c ~]$ id
uid=102(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1004(asmadmin),1005(asmoper),1006(asmdba)
[grid@one19c ~]$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         32G     0   32G   0% /dev
tmpfs                            32G  845M   31G   3% /dev/shm
tmpfs                            32G   17M   32G   1% /run
tmpfs                            32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/vg00-root           9.6G  2.9G  6.2G  32% /
/dev/sda2                       488M  237M  216M  53% /boot
/dev/mapper/vg00-var            5.7G  156M  5.3G   3% /var
/dev/mapper/vg00-home           960M  2.7M  891M   1% /home
/dev/mapper/vg00-var_log        3.8G   19M  3.6G   1% /var/log
/dev/mapper/vg00-opt             39G  1.9G   36G   6% /opt
/dev/mapper/vg00-var_log_audit  1.9G   13M  1.8G   1% /var/log/audit
/dev/sda1                       128M  7.5M  121M   6% /boot/efi
tmpfs                            32G  4.0K   32G   1% /var/tmp
tmpfs                            32G  256K   32G   1% /tmp
/dev/sdh                        196G   33G  154G  18% /u01
tmpfs                           6.3G     0  6.3G   0% /run/user/102
tmpfs                           6.3G     0  6.3G   0% /run/user/1000
/dev/asm/commonstore-62          10G  329M  9.7G   4% /opt/oracle/dcs/commonstore
/dev/asm/volume1-62              10G  329M  9.7G   4% /u02
tmpfs                           6.3G     0  6.3G   0% /run/user/0
[grid@one19c ~]$
[grid@one19c ~]$ crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.COMMONSTORE.advm
               ONLINE  ONLINE       one19c                   STABLE
ora.DATA.VOLUME1.advm
               ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       one19c                   STABLE
ora.chad
               ONLINE  ONLINE       one19c                   STABLE
ora.data.commonstore.acfs
               ONLINE  ONLINE       one19c                   mounted on /opt/orac
                                                             le/dcs/commonstore,S
                                                             TABLE
ora.data.volume1.acfs
               ONLINE  ONLINE       one19c                   mounted on /u02,STAB
                                                             LE
ora.net1.network
               ONLINE  ONLINE       one19c                   STABLE
ora.ons
               ONLINE  ONLINE       one19c                   STABLE
ora.proxy_advm
               ONLINE  ONLINE       one19c                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.RECO.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.cvu
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c.vip
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c_icn153.db
      1        ONLINE  ONLINE       one19c                   Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             .0/dbhome_1,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       one19c                   STABLE
ora.scan1.vip
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------
[grid@one19c ~]$
[grid@one19c ~]$ acfsutil info fs
/u02
    ACFS Version: 19.0.0.0.0
    on-disk version:       49.0
    compatible.advm:       19.0.0.0.0
    ACFS compatibility:    19.0.0.0.0
    flags:        MountPoint,Available,KiloSnap
    creation time:   Tue Sep 27 14:39:52 2022
    mount time:      Wed Sep 28 08:59:50 2022
    mount sequence number: 0
    number of nodes:       1
    allocation unit:       4096
    metadata block size:   4096
    volumes:      1
    total size:   10737418240  (  10.00 GB )
    total free:   10392436736  (   9.68 GB )
    file entry table allocation: 262144
    primary volume: /dev/asm/volume1-62
        label:
        state:                 Available
        major, minor:          251, 31746
        logical sector size:   512
        size:                  10737418240  (  10.00 GB )
        free:                  10392436736  (   9.68 GB )
        metadata read I/O count:         2090
        metadata write I/O count:        10
        total metadata bytes read:       8560640  (   8.16 MB )
        total metadata bytes written:    40960  (  40.00 KB )
        ADVM diskgroup:        DATA
        ADVM resize increment: 67108864
        ADVM redundancy:       unprotected
        ADVM stripe columns:   8
        ADVM stripe width:     1048576
    number of snapshots:  0
    snapshot space usage: 0  ( 0.00 )
    replication status: DISABLED
    compression status: DISABLED

/opt/oracle/dcs/commonstore
    ACFS Version: 19.0.0.0.0
    on-disk version:       49.0
    compatible.advm:       19.0.0.0.0
    ACFS compatibility:    19.0.0.0.0
    flags:        MountPoint,Available,KiloSnap
    creation time:   Mon Sep 26 09:59:48 2022
    mount time:      Wed Sep 28 08:59:50 2022
    mount sequence number: 1
    number of nodes:       1
    allocation unit:       4096
    metadata block size:   4096
    volumes:      1
    total size:   10737418240  (  10.00 GB )
    total free:   10392502272  (   9.68 GB )
    file entry table allocation: 262144
    primary volume: /dev/asm/commonstore-62
        label:
        state:                 Available
        major, minor:          251, 31745
        logical sector size:   512
        size:                  10737418240  (  10.00 GB )
        free:                  10392502272  (   9.68 GB )
        metadata read I/O count:         2111
        metadata write I/O count:        10
        total metadata bytes read:       8646656  (   8.25 MB )
        total metadata bytes written:    40960  (  40.00 KB )
        ADVM diskgroup:        DATA
        ADVM resize increment: 67108864
        ADVM redundancy:       unprotected
        ADVM stripe columns:   8
        ADVM stripe width:     1048576
    number of snapshots:  0
    snapshot space usage: 0  ( 0.00 )
    replication status: DISABLED
    compression status: DISABLED
[grid@one19c ~]$
[grid@one19c ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   236248                0          236248              0             Y  DATA/
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   257020                0          257020              0             N  RECO/
[grid@one19c ~]$
[grid@one19c ~]$ crsctl status res ora.data.volume1.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.data.volume1.acfs
               ONLINE  ONLINE       one19c                   mounted on /u02,STAB
                                                             LE
--------------------------------------------------------------------------------
[grid@one19c ~]$
[grid@one19c ~]$ sqlplus "/as sysasm"
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 28 09:24:08 2022 Version 19.16.0.0.0
Copyright (c) 1982, 2022, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.16.0.0.0
SQL> col volume_name for a20
SQL> col volume_device for a50
SQL> set linesize 150
SQL> SELECT volume_name, volume_device FROM V$ASM_VOLUME;
VOLUME_NAME          VOLUME_DEVICE
-------------------- --------------------------------------------------
COMMONSTORE          /dev/asm/commonstore-62
VOLUME1              /dev/asm/volume1-62
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.16.0.0.0
[grid@one19c ~]$
[grid@one19c ~]$

ACFS 삭제 

--ACFS FIlesystem Resources 중지
[grid@one19c ~]$ srvctl stop filesystem -volume VOLUME1 -diskgroup DATA
--ACFS Filesystem Resources 삭제
[root@one19c bin]# id
uid=0(root) gid=0(root) groups=0(root)
[root@one19c bin]#
[root@one19c bin]#
[root@one19c bin]# id
uid=0(root) gid=0(root) groups=0(root)
[root@one19c bin]# pwd
/u01/app/19.0.0.0/grid/bin
[root@one19c bin]# ./srvctl remove filesystem  -volume VOLUME1 -diskgroup DATA
[root@one19c bin]# ./crsctl status res ora.data.volume1.acfs -t
CRS-2613: Could not find resource 'ora.data.volume1.acfs'.
[root@one19c bin]# ./crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.COMMONSTORE.advm
               ONLINE  ONLINE       one19c                   STABLE
ora.DATA.VOLUME1.advm
               ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       one19c                   STABLE
ora.chad
               ONLINE  ONLINE       one19c                   STABLE
ora.data.commonstore.acfs
               ONLINE  ONLINE       one19c                   mounted on /opt/orac
                                                             le/dcs/commonstore,S
                                                             TABLE
ora.net1.network
               ONLINE  ONLINE       one19c                   STABLE
ora.ons
               ONLINE  ONLINE       one19c                   STABLE
ora.proxy_advm
               ONLINE  ONLINE       one19c                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.RECO.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.cvu
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c.vip
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c_icn153.db
      1        ONLINE  ONLINE       one19c                   Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             .0/dbhome_1,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       one19c                   STABLE
ora.scan1.vip
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------
[root@one19c bin]#
[root@one19c bin]#
[root@one19c bin]# ./asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   236248                0          236248              0             Y  DATA/
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   257020                0          257020              0             N  RECO/
[root@one19c bin]#
--ACFS Volume 삭제
[grid@one19c ~]$ id
uid=102(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1004(asmadmin),1005(asmoper),1006(asmdba)
[grid@one19c ~]$
[grid@one19c ~]$ asmcmd volinfo --all
Diskgroup Name: DATA
         Volume Name: COMMONSTORE
         Volume Device: /dev/asm/commonstore-62
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage: ACFS
         Mountpath: /opt/oracle/dcs/commonstore

         Volume Name: VOLUME1
         Volume Device: /dev/asm/volume1-62
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage: ACFS
         Mountpath: /u02
[grid@one19c ~]$
[grid@one19c ~]$ asmcmd voldelete -G DATA VOLUME1
[grid@one19c ~]$
[grid@one19c ~]$ asmcmd volinfo --all
Diskgroup Name: DATA

         Volume Name: COMMONSTORE
         Volume Device: /dev/asm/commonstore-62
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage: ACFS
         Mountpath: /opt/oracle/dcs/commonstore

[grid@one19c ~]$
[grid@one19c ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   246492                0          246492              0             Y  DATA/
MOUNTED  EXTERN  N         512             512   4096  4194304    262144   257020                0          257020              0             N  RECO/
[grid@one19c ~]$
[grid@one19c ~]$ exit
logout
[root@one19c /]# id
uid=0(root) gid=0(root) groups=0(root)
[root@one19c /]# rm -rf /u02
[root@one19c /]#

 

반응형
반응형

Patch전 사전 확인

[root@one19c ~]# cliadm update-dbcli
Job details
----------------------------------------------------------------
                     ID:  fe8c68e7-4f63-41af-bebb-23b0901ffccb
            Description:  DcsCli patching
                 Status:  Created
                Created:  September 26, 2022 11:17:59 AM KST
                Message:  Dcs cli will be updated
Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------

[root@one19c ~]#
[root@one19c ~]# dbcli describe-component
System Version
---------------
22.3.2.1.0
Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
GI                                        19.15.0.0.0           19.16.0.0
DB                                        19.15.0.0.0           19.16.0.0
[root@one19c ~]#
[root@one19c ~]# dbcli describe-latestpatch
componentType   availableVersion
--------------- --------------------
gi              12.2.0.1.220719
gi              12.1.0.2.220719
gi              18.16.0.0.0
gi              19.16.0.0.0
gi              21.7.0.0.0
db              11.2.0.4.220719
db              12.2.0.1.220719
db              12.1.0.2.220719
db              18.16.0.0.0
db              19.16.0.0.0
db              21.7.0.0.0
[root@one19c ~]#
[root@one19c ~]# su - grid
Last login: Mon Sep 26 11:17:11 KST 2022
[grid@one19c ~]$ cd $ORACLE_HOME/OPatch
[grid@one19c OPatch]$ pwd
/u01/app/19.0.0.0/grid/OPatch
[grid@one19c OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.32
OPatch succeeded.
[grid@one19c OPatch]$ ./opatch lspatches -oh /u01/app/19.0.0.0/grid
33610957;OCW Interim patch for 33610957
33912872;DATABASE PERL UPDATE IN 19C TO V5.32-1 (CVE-2022-23990 - LIBEXPAT UPDATE)
33810130;JDK BUNDLE PATCH 19.0.0.0.220419
33911149;TOMCAT RELEASE UPDATE 19.0.0.0.0 (33911149)
33815607;ACFS RELEASE UPDATE 19.15.0.0.0 (33815607)
33806152;Database Release Update : 19.15.0.0.220419 (33806152)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
OPatch succeeded.
[grid@one19c OPatch]$ exit
[root@one19c ~]#
[root@one19c ~]# su - oracle
Last login: Mon Sep 26 11:20:21 KST 2022 on pts/0
[oracle@one19c ~]$ cd $ORACLE_HOME/OPatch
[oracle@one19c OPatch]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch
[oracle@one19c OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.30
OPatch succeeded.
[oracle@one19c OPatch]$ ./opatch lspatches -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
34096213;Fix for Bug 34096213
33810360;CVE-2021-45943 REPORTED IN (OPEN SOURCE GEOSPATIAL FOUNDATION/GEOSPATIAL DATA ABSTRACTION LIBRARY/OPENGIS SIMPLE FEATURES REFERENCE IMPLEMENTATION (GDAL/OGR)/3.3.0)
34088989;ONE-OFF REQUEST FOR DELETE DIR FOR SUPTOOLS/TFA + SUPTOOLS/ORACHK + SUPTOOLS/ORACHK.ZIP FROM DB PSU/BP/RU/RUR
33809062;TRACKING BUG FOR REGRESSION RTI 24544369 CAUSED BY PKNAGGS_BUG-32472737 APPROVED/INCLUDED IN 21.0.0.0 ADBSBP
33613829;RDBMS - DSTV37 UPDATE - TZDATA2021E
32327201;RDBMS - DSTV36 UPDATE - TZDATA2020E
31335037;RDBMS - DSTV35 UPDATE - TZDATA2020A
30432118;MERGE REQUEST ON TOP OF 19.0.0.0.0 FOR BUGS 28852325 29997937
33808367;OJVM RELEASE UPDATE: 19.15.0.0.220419 (33808367)
31732095;UPDATE PERL IN 19C DATABASE ORACLE HOME TO V5.32
33810130;JDK BUNDLE PATCH 19.0.0.0.220419
33815596;OCW RELEASE UPDATE 19.15.0.0.0 (33815596)
33806152;Database Release Update : 19.15.0.0.220419 (33806152)
OPatch succeeded.
[oracle@one19c OPatch]$ exit
logout
[root@one19c ~]#

Oracle GRID Patch

[root@one19c ~]# dbcli update-server -h
Usage: update-server [options]
  Options:
    --component, -c
      Component to update
    --help, -h
      get help
    --json, -j
      json output
    --local, -l
      Update Server Components Locally
    --node, -n
      Node to be updated
    --precheck, -p
      Only Analyze the patch
    --version, -v
      Version to be updated
[root@one19c ~]#
[root@one19c ~]# dbcli update-server -p
{
  "jobId" : "88bb70c4-c738-43f2-875d-c643213ebc36",
  "status" : "Created",
  "message" : null,
  "errorCode" : "",
  "reports" : [ ],
  "createTimestamp" : "September 26, 2022 11:24:33 AM KST",
  "resourceList" : [ ],
  "description" : "Server Patching Prechecks",
  "updatedTime" : "September 26, 2022 11:24:33 AM KST",
  "percentageProgress" : "0%",
  "cause" : null,
  "action" : null
}
[root@one19c ~]#
[root@one19c ~]# dbcli update-server
{
  "jobId" : "2fd66f64-23ae-4db4-999d-2467d1c35981",
  "status" : "Created",
  "message" : null,
  "errorCode" : "",
  "reports" : [ ],
  "createTimestamp" : "September 26, 2022 11:25:26 AM KST",
  "resourceList" : [ ],
  "description" : "Server Patching",
  "updatedTime" : "September 26, 2022 11:25:26 AM KST",
  "percentageProgress" : "0%",
  "cause" : null,
  "action" : null
}
[root@one19c ~]#
[root@one19c ~]# dbcli describe-job -i 2fd66f64-23ae-4db4-999d-2467d1c35981
Job details
----------------------------------------------------------------
                     ID:  2fd66f64-23ae-4db4-999d-2467d1c35981
            Description:  Server Patching
                 Status:  Waiting
                Created:  September 26, 2022 11:25:26 AM KST
               Progress:  0%
                Message:
             Error Code:

Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------
[root@one19c ~]#
[root@one19c ~]# dbcli describe-job -i 2fd66f64-23ae-4db4-999d-2467d1c35981
Job details
----------------------------------------------------------------
                     ID:  2fd66f64-23ae-4db4-999d-2467d1c35981
            Description:  Server Patching
                 Status:  Success
                Created:  September 26, 2022 11:25:26 AM KST
               Progress:  100%
                Message:
             Error Code:

Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------
Pre-operations for Server Patching                                       September 26, 2022 11:29:14 AM KST  September 26, 2022 11:30:31 AM KST  Success
Server Patching                                                          September 26, 2022 11:30:31 AM KST  September 26, 2022 11:49:45 AM KST  Success
[root@one19c ~]#
[root@one19c ~]# dbcli describe-component
System Version
---------------
22.2.3.1.0
Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
GI                                        19.16.0.0.0           up-to-date
DB                                        19.15.0.0.0           19.16.0.0
[root@one19c ~]#

Oracle Database Patch

[root@one19c ~]# dbcli list-dbhomes
ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
5d519ce8-5ae6-4f4f-a4a6-bd0dd63a1612     OraDB19000_home1     19.15.0.0.0                              /u01/app/oracle/product/19.0.0.0/dbhome_1     Configured
[root@one19c ~]#
[root@one19c ~]# dbcli update-dbhome -h
Usage: update-dbhome [options]
  Options:
    --cloneOcid, -o
      clone OCID
    --cloneType, -cc
      Clone type
    --cloneVersion, -cv
      cloneVersion
  * --dbhomeid, -i
      Db home to be updated
    --help, -h
      get help
    --json, -j
      json output
    --local, -l
      Update Db home Locally
    --node, -n
      Node to be updated
    --parUrl, -pu
      par Url
    --precheck, -p
      Only Analyze the patch
    --sha256sum, -ss
      sha256sum
    --version, -v
      Patch version to be updated
[root@one19c ~]#
[root@one19c ~]# dbcli update-dbhome -i 5d519ce8-5ae6-4f4f-a4a6-bd0dd63a1612
{
  "jobId" : "9ab958f6-93bb-4238-b996-5b97f039ab1f",
  "status" : "Created",
  "message" : null,
  "errorCode" : "",
  "reports" : [ ],
  "createTimestamp" : "September 26, 2022 12:28:26 PM KST",
  "resourceList" : [ ],
  "description" : "Database inplace image patching with dbhomeId : 5d519ce8-5ae6-4f4f-a4a6-bd0dd63a1612",
  "updatedTime" : "September 26, 2022 12:28:27 PM KST",
  "percentageProgress" : "0%",
  "cause" : null,
  "action" : null
}
[root@one19c ~]#
[root@one19c ~]# dbcli describe-job -i 9ab958f6-93bb-4238-b996-5b97f039ab1f

Job details
----------------------------------------------------------------
                     ID:  9ab958f6-93bb-4238-b996-5b97f039ab1f
            Description:  Database inplace image patching with dbhomeId : 5d519ce8-5ae6-4f4f-a4a6-bd0dd63a1612
                 Status:  Success
                Created:  September 26, 2022 12:28:26 PM KST
               Progress:  100%
                Message:
             Error Code:

Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------
Precheck DBHome patching tasks                                           September 26, 2022 12:28:27 PM KST  September 26, 2022 12:31:53 PM KST  Success
DBHome patching                                                          September 26, 2022 12:31:53 PM KST  September 26, 2022 12:44:18 PM KST  Success
Post DBHome patching tasks                                               September 26, 2022 12:44:18 PM KST  September 26, 2022 12:49:31 PM KST  Success

[root@one19c ~]#
[root@one19c ~]#
[root@one19c ~]# dbcli describe-component
System Version
---------------
22.2.3.1.0
Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
GI                                        19.16.0.0.0           up-to-date
DB                                        19.16.0.0.0           up-to-date
[root@one19c ~]#

Patch결과 확인

[root@one19c ~]# dbcli describe-component
System Version
---------------
22.2.3.1.0
Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
GI                                        19.16.0.0.0           up-to-date
DB                                        19.16.0.0.0           up-to-date

[root@one19c ~]#
[root@one19c ~]# su - grid
Last login: Mon Sep 26 13:02:52 KST 2022 on pts/0
[grid@one19c ~]$ cd $ORACLE_HOME/OPatch
[grid@one19c OPatch]$ pwd
/u01/app/19.0.0.0/grid/OPatch
[grid@one19c OPatch]$ ./opatch lspatches -oh /u01/app/19.0.0.0/grid
34122773;OCW Interim patch for 34122773
34113634;JDK BUNDLE PATCH 19.0.0.0.220719
33912872;DATABASE PERL UPDATE IN 19C TO V5.32-1 (CVE-2022-23990 - LIBEXPAT UPDATE)
34318175;TOMCAT RELEASE UPDATE 19.0.0.0.0 (34318175)
34139601;ACFS RELEASE UPDATE 19.16.0.0.0 (34139601)
34133642;Database Release Update : 19.16.0.0.220719 (34133642)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
OPatch succeeded.
[grid@one19c OPatch]$
[grid@one19c OPatch]$ exit
logout
[root@one19c ~]# su - oracle
Last login: Mon Sep 26 13:03:09 KST 2022
[oracle@one19c ~]$ cd $ORACLE_HOME/OPatch
[oracle@one19c OPatch]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch
[oracle@one19c OPatch]$ ./opatch lspatches -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
33303486;UNPLUG/PLUG A PLUGGABLE DATABASE MOVE DO A COPY AND NEED DOUBLE SPACE IN ASM.
29780459;INCREASE _LM_RES_HASH_BUCKET AND BACK OUT CHANGES FROM THE BUG 29416368 FIX
34006650;DSTV38 UPDATE - TZDATA2022A - NEED OJVM FIX
34006614;RDBMS - DSTV38 UPDATE - TZDATA2022A
33613829;RDBMS - DSTV37 UPDATE - TZDATA2021E
34113634;JDK BUNDLE PATCH 19.0.0.0.220719
32327201;RDBMS - DSTV36 UPDATE - TZDATA2020E
31335037;RDBMS - DSTV35 UPDATE - TZDATA2020A
30432118;MERGE REQUEST ON TOP OF 19.0.0.0.0 FOR BUGS 28852325 29997937
33912872;DATABASE PERL UPDATE IN 19C TO V5.32-1 (CVE-2022-23990 - LIBEXPAT UPDATE)
34086870;OJVM RELEASE UPDATE: 19.16.0.0.220719 (34086870)
34160635;OCW RELEASE UPDATE 19.16.0.0.0 (34160635)
34133642;Database Release Update : 19.16.0.0.220719 (34133642)
OPatch succeeded.
[oracle@one19c OPatch]$
[oracle@one19c OPatch]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Sep 26 13:05:59 2022 Version 19.16.0.0.0
Copyright (c) 1982, 2022, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.16.0.0.0
SQL> SET LINESIZE 400
SQL> COLUMN ACTION_TIME FORMAT A20
SQL> COLUMN ACTION FORMAT A10
SQL> COLUMN STATUS FORMAT A10
SQL> COLUMN DESCRIPTION FORMAT A60
SQL> COLUMN VERSION FORMAT A10
SQL> SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME
  2  ,ACTION ,STATUS ,DESCRIPTION ,SOURCE_VERSION ,TARGET_VERSION ,PATCH_ID
  3  FROM DBA_REGISTRY_SQLPATCH
  4  ORDER BY ACTION_TIME;
ACTION_TIME          ACTION     STATUS     DESCRIPTION                                                  SOURCE_VERSION  TARGET_VERSION    PATCH_ID
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
20220501 20:01:24    APPLY      SUCCESS    OJVM RELEASE UPDATE: 19.15.0.0.220419 (33808367)             19.1.0.0.0      19.1.0.0.0        33808367
20220501 20:01:24    APPLY      SUCCESS    Database Release Update : 19.15.0.0.220419 (33806152)        19.1.0.0.0      19.15.0.0.0       33806152
20220926 12:48:24    ROLLBACK   SUCCESS    OJVM RELEASE UPDATE: 19.15.0.0.220419 (33808367)             19.16.0.0.0     19.16.0.0.0       33808367
20220926 12:48:26    APPLY      SUCCESS    OJVM RELEASE UPDATE: 19.16.0.0.220719 (34086870)             19.15.0.0.0     19.15.0.0.0       34086870
20220926 12:48:26    APPLY      SUCCESS    Database Release Update : 19.16.0.0.220719 (34133642)        19.15.0.0.0     19.16.0.0.0       34133642
SQL> exit
Disconnected from Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
[oracle@one19c OPatch]$
반응형
반응형

기존 상태 확인

[grid@one19c ~]$ id
uid=102(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1004(asmadmin),1005(asmoper),1006(asmdba)
[grid@one19c ~]$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         32G     0   32G   0% /dev
tmpfs                            32G  845M   31G   3% /dev/shm
tmpfs                            32G   25M   32G   1% /run
tmpfs                            32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/vg00-root           9.6G  2.9G  6.2G  32% /
/dev/sda2                       488M  237M  216M  53% /boot
/dev/mapper/vg00-home           960M  2.7M  891M   1% /home
/dev/mapper/vg00-var            5.7G  156M  5.3G   3% /var
/dev/mapper/vg00-opt             39G  1.9G   36G   6% /opt
/dev/sda1                       128M  7.5M  121M   6% /boot/efi
/dev/mapper/vg00-var_log        3.8G   19M  3.6G   1% /var/log
/dev/mapper/vg00-var_log_audit  1.9G   12M  1.8G   1% /var/log/audit
tmpfs                            32G  4.0K   32G   1% /var/tmp
tmpfs                            32G  256K   32G   1% /tmp
/dev/sdi                        196G   33G  154G  18% /u01
tmpfs                           6.3G     0  6.3G   0% /run/user/102
/dev/asm/commonstore-62         5.0G  319M  4.7G   7% /opt/oracle/dcs/commonstore
tmpfs                           6.3G     0  6.3G   0% /run/user/1000
[grid@one19c ~]$
[grid@one19c ~]$
[grid@one19c ~]$ crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.COMMONSTORE.advm
               ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       one19c                   STABLE
ora.chad
               ONLINE  ONLINE       one19c                   STABLE
ora.data.commonstore.acfs
               ONLINE  ONLINE       one19c                   mounted on /opt/orac
                                                             le/dcs/commonstore,S
                                                             TABLE
ora.net1.network
               ONLINE  ONLINE       one19c                   STABLE
ora.ons
               ONLINE  ONLINE       one19c                   STABLE
ora.proxy_advm
               ONLINE  ONLINE       one19c                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.RECO.dg(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       one19c                   STABLE
ora.cvu
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c.vip
      1        ONLINE  ONLINE       one19c                   STABLE
ora.one19c_icn153.db
      1        ONLINE  ONLINE       one19c                   Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             .0/dbhome_1,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       one19c                   STABLE
ora.scan1.vip
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------
[grid@one19c ~]$
[grid@one19c ~]$ acfsutil info fs
/opt/oracle/dcs/commonstore
    ACFS Version: 19.0.0.0.0
    on-disk version:       49.0
    compatible.advm:       19.0.0.0.0
    ACFS compatibility:    19.0.0.0.0
    flags:        MountPoint,Available,KiloSnap
    creation time:   Mon Sep 26 09:59:48 2022
    mount time:      Tue Sep 27 08:48:23 2022
    mount sequence number: 0
    number of nodes:       1
    allocation unit:       4096
    metadata block size:   4096
    volumes:      1
    total size:   5368709120  (   5.00 GB )
    total free:   5034442752  (   4.69 GB )
    file entry table allocation: 262144
    primary volume: /dev/asm/commonstore-62
        label:
        state:                 Available
        major, minor:          251, 31745
        logical sector size:   512
        size:                  5368709120  (   5.00 GB )
        free:                  5034442752  (   4.69 GB )
        metadata read I/O count:         2140
        metadata write I/O count:        10
        total metadata bytes read:       8765440  (   8.36 MB )
        total metadata bytes written:    40960  (  40.00 KB )
        ADVM diskgroup:        DATA
        ADVM resize increment: 67108864
        ADVM redundancy:       unprotected
        ADVM stripe columns:   8
        ADVM stripe width:     1048576
    number of snapshots:  0
    snapshot space usage: 0  ( 0.00 )
    replication status: DISABLED
    compression status: DISABLED
[grid@one19c ~]$

기존 ACFS Resize

[grid@one19c ~]$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         32G     0   32G   0% /dev
tmpfs                            32G  845M   31G   3% /dev/shm
tmpfs                            32G   25M   32G   1% /run
tmpfs                            32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/vg00-root           9.6G  2.9G  6.2G  32% /
/dev/sda2                       488M  237M  216M  53% /boot
/dev/mapper/vg00-home           960M  2.7M  891M   1% /home
/dev/mapper/vg00-var            5.7G  156M  5.3G   3% /var
/dev/mapper/vg00-opt             39G  1.9G   36G   6% /opt
/dev/sda1                       128M  7.5M  121M   6% /boot/efi
/dev/mapper/vg00-var_log        3.8G   19M  3.6G   1% /var/log
/dev/mapper/vg00-var_log_audit  1.9G   12M  1.8G   1% /var/log/audit
tmpfs                            32G  4.0K   32G   1% /var/tmp
tmpfs                            32G  256K   32G   1% /tmp
/dev/sdi                        196G   33G  154G  18% /u01
tmpfs                           6.3G     0  6.3G   0% /run/user/102
/dev/asm/commonstore-62         5.0G  319M  4.7G   7% /opt/oracle/dcs/commonstore
tmpfs                           6.3G     0  6.3G   0% /run/user/1000
[grid@one19c ~]$
[grid@one19c ~]$
[grid@one19c ~]$ acfsutil size 10G /opt/oracle/dcs/commonstore
acfsutil size: new file system size: 10737418240 (10240MB)
[grid@one19c ~]$
[grid@one19c ~]$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         32G     0   32G   0% /dev
tmpfs                            32G  845M   31G   3% /dev/shm
tmpfs                            32G   25M   32G   1% /run
tmpfs                            32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/vg00-root           9.6G  2.9G  6.2G  32% /
/dev/sda2                       488M  237M  216M  53% /boot
/dev/mapper/vg00-home           960M  2.7M  891M   1% /home
/dev/mapper/vg00-var            5.7G  156M  5.3G   3% /var
/dev/mapper/vg00-opt             39G  1.9G   36G   6% /opt
/dev/sda1                       128M  7.5M  121M   6% /boot/efi
/dev/mapper/vg00-var_log        3.8G   19M  3.6G   1% /var/log
/dev/mapper/vg00-var_log_audit  1.9G   12M  1.8G   1% /var/log/audit
tmpfs                            32G  4.0K   32G   1% /var/tmp
tmpfs                            32G  256K   32G   1% /tmp
/dev/sdi                        196G   33G  154G  18% /u01
tmpfs                           6.3G     0  6.3G   0% /run/user/102
/dev/asm/commonstore-62          10G  329M  9.7G   4% /opt/oracle/dcs/commonstore
tmpfs                           6.3G     0  6.3G   0% /run/user/1000
[grid@one19c ~]$
[grid@one19c ~]$ acfsutil info fs
/opt/oracle/dcs/commonstore
    ACFS Version: 19.0.0.0.0
    on-disk version:       49.0
    compatible.advm:       19.0.0.0.0
    ACFS compatibility:    19.0.0.0.0
    flags:        MountPoint,Available,KiloSnap
    creation time:   Mon Sep 26 09:59:48 2022
    mount time:      Tue Sep 27 08:48:23 2022
    mount sequence number: 0
    number of nodes:       1
    allocation unit:       4096
    metadata block size:   4096
    volumes:      1
    total size:   10737418240  (  10.00 GB )
    total free:   10392502272  (   9.68 GB )
    file entry table allocation: 262144
    primary volume: /dev/asm/commonstore-62
        label:
        state:                 Available
        major, minor:          251, 31745
        logical sector size:   512
        size:                  10737418240  (  10.00 GB )
        free:                  10392502272  (   9.68 GB )
        metadata read I/O count:         4278
        metadata write I/O count:        45
        total metadata bytes read:       17575936  (  16.76 MB )
        total metadata bytes written:    393216  ( 384.00 KB )
        ADVM diskgroup:        DATA
        ADVM resize increment: 67108864
        ADVM redundancy:       unprotected
        ADVM stripe columns:   8
        ADVM stripe width:     1048576
    number of snapshots:  0
    snapshot space usage: 0  ( 0.00 )
    replication status: DISABLED
    compression status: DISABLED
[grid@one19c ~]$

신규 ACFS 생성

[grid@one19c ~]$ id
uid=102(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1004(asmadmin),1005(asmoper),1006(asmdba)
[grid@one19c ~]$
[grid@one19c ~]$ asmcmd -p
ASMCMD [+] > volcreate -G DATA -s 10G VOLUME1
ASMCMD [+] >
ASMCMD [+] > volinfo -G DATA VOLUME1
Diskgroup Name: DATA

         Volume Name: VOLUME1
         Volume Device: /dev/asm/volume1-62
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage:
         Mountpath:

ASMCMD [+] > exit
[grid@one19c ~]$ sqlplus "/as sysasm"
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Sep 27 14:34:20 2022
Version 19.16.0.0.0
Copyright (c) 1982, 2022, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
SQL> col volume_name for a20
SQL> col volume_device for a50
SQL> set linesize 150
SQL> SELECT volume_name, volume_device FROM V$ASM_VOLUME;
VOLUME_NAME          VOLUME_DEVICE
-------------------- --------------------------------------------------
COMMONSTORE          /dev/asm/commonstore-62
VOLUME1              /dev/asm/volume1-62
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
[grid@one19c ~]$
[grid@one19c ~]$ which mkfs
/usr/sbin/mkfs
[grid@one19c ~]$ ls -al /usr/sbin/mkfs
-rwxr-xr-x 1 root root 11520 Dec 10  2021 /usr/sbin/mkfs
[grid@one19c ~]$
[grid@one19c ~]$
[grid@one19c ~]$ mkfs -t acfs /dev/asm/volume1-62
mkfs.acfs: version                   = 19.0.0.0.0
mkfs.acfs: on-disk version           = 46.0
mkfs.acfs: volume                    = /dev/asm/volume1-62
mkfs.acfs: volume size               = 10737418240  (  10.00 GB )
mkfs.acfs: Format complete.
[grid@one19c ~]$ exit
[root@one19c /]# id
uid=0(root) gid=0(root) groups=0(root)
[root@one19c bin]#
[root@one19c /]# mkdir /u02
[root@one19c /]# chown oracle:oinstall /u02
[root@one19c /]# cd /u01/app/19.0.0.0/grid/bin
[root@one19c bin]# pwd
/u01/app/19.0.0.0/grid/bin
[root@one19c bin]#
[root@one19c bin]# ./srvctl add filesystem -device /dev/asm/volume1-62 -path /u02
[root@one19c bin]# ./crsctl status res ora.data.volume1.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.data.volume1.acfs
               OFFLINE OFFLINE      one19c                   STABLE
--------------------------------------------------------------------------------
[root@one19c bin]# su - grid
[grid@one19c ~]$ srvctl start filesystem -d /dev/asm/volume1-62
[grid@one19c ~]$ crsctl status res ora.data.volume1.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.data.volume1.acfs
               ONLINE  ONLINE       one19c                   mounted on /u02,STAB
                                                             LE
--------------------------------------------------------------------------------
[grid@one19c ~]$
[grid@one19c ~]$ df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         32G     0   32G   0% /dev
tmpfs                            32G  845M   31G   3% /dev/shm
tmpfs                            32G   25M   32G   1% /run
tmpfs                            32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/vg00-root           9.6G  2.9G  6.2G  32% /
/dev/sda2                       488M  237M  216M  53% /boot
/dev/mapper/vg00-home           960M  2.7M  891M   1% /home
/dev/mapper/vg00-var            5.7G  156M  5.3G   3% /var
/dev/mapper/vg00-opt             39G  1.9G   36G   6% /opt
/dev/sda1                       128M  7.5M  121M   6% /boot/efi
/dev/mapper/vg00-var_log        3.8G   20M  3.6G   1% /var/log
/dev/mapper/vg00-var_log_audit  1.9G   12M  1.8G   1% /var/log/audit
tmpfs                            32G  4.0K   32G   1% /var/tmp
tmpfs                            32G  136M   32G   1% /tmp
/dev/sdi                        196G   33G  154G  18% /u01
tmpfs                           6.3G     0  6.3G   0% /run/user/102
/dev/asm/commonstore-62          10G  329M  9.7G   4% /opt/oracle/dcs/commonstore
tmpfs                           6.3G     0  6.3G   0% /run/user/1000
/dev/asm/volume1-62              10G  329M  9.7G   4% /u02
[grid@one19c ~]$
반응형

+ Recent posts