Wednesday, 22 May 2019

ALTER DATABASE BACKUP CONTROLFILE TO TRACE; OUTPUT


RMAN> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

SQLPLUS> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;


oracle@sgdcplm01:/u01/app/oracle/diag/rdbms/smrprodb_dr/SMRPRODB/trace> cat SMRPRODB_ora_194988.trc
Trace file /u01/app/oracle/diag/rdbms/smrprodb_dr/SMRPRODB/trace/SMRPRODB_ora_194988.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1
System name:    Linux
Node name:      sgdcplm01
Release:        3.0.101-63-default
Version:        #1 SMP Tue Jun 23 16:02:31 UTC 2015 (4b89d0c)
Machine:        x86_64
Instance name: SMRPRODB
Redo thread mounted by this instance: 1
Oracle process number: 219
Unix process pid: 194988, image: oracle@sgdcplm01 (TNS V1-V3)


*** 2019-05-03 11:22:53.668
*** SESSION ID:(1300.55285) 2019-05-03 11:22:53.668
*** CLIENT ID:() 2019-05-03 11:22:53.668
*** SERVICE NAME:(SYS$USERS) 2019-05-03 11:22:53.668
*** MODULE NAME:(sqlplus@sgdcplm01 (TNS V1-V3)) 2019-05-03 11:22:53.668
*** CLIENT DRIVER:(SQL*PLUS) 2019-05-03 11:22:53.668
*** ACTION NAME:() 2019-05-03 11:22:53.668

-- The following are current System-scope REDO Log Archival related
-- parameters and can be included in the database initialization file.
--
-- LOG_ARCHIVE_DEST=''
-- LOG_ARCHIVE_DUPLEX_DEST=''
--
-- LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
--
-- DB_UNIQUE_NAME="SMRPRODB_DR"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE'
-- LOG_ARCHIVE_CONFIG='DG_CONFIG=("SMRPRODB")'
-- LOG_ARCHIVE_MAX_PROCESSES=30
-- STANDBY_FILE_MANAGEMENT=AUTO
-- STANDBY_ARCHIVE_DEST=?/dbs/arch
-- FAL_CLIENT=SMRPRODB_DR
-- FAL_SERVER=SMRPRODB
--
-- LOG_ARCHIVE_DEST_2='SERVICE=SMRPRODB_DR'
-- LOG_ARCHIVE_DEST_2='OPTIONAL REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_2='LGWR NOAFFIRM NOVERIFY ASYNC=61440'
-- LOG_ARCHIVE_DEST_2='REGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_2='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'
-- LOG_ARCHIVE_DEST_2='DB_UNIQUE_NAME=SMRPRODB'
-- LOG_ARCHIVE_DEST_2='VALID_FOR=(STANDBY_LOGFILE,STANDBY_ROLE)'
-- LOG_ARCHIVE_DEST_STATE_2=ENABLE
--
-- LOG_ARCHIVE_DEST_1='LOCATION=/u04/MasterDB/oradata/SMRPRODB/ArchiveLog'
-- LOG_ARCHIVE_DEST_1='OPTIONAL REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='REGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'
-- LOG_ARCHIVE_DEST_1='DB_UNIQUE_NAME=SMRPRODB_DR'
-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
-- LOG_ARCHIVE_DEST_STATE_1=ENABLE
--
-- Below are two sets of SQL statements, each of which creates a new
-- control file and uses it to open the database. The first set opens
-- the database with the NORESETLOGS option and should be used only if
-- the current versions of all online logs are available. The second
-- set opens the database with the RESETLOGS option and should be used
-- if online logs are unavailable.
-- The appropriate set of statements can be copied from the trace into
-- a script file, edited as necessary, and executed when there is a
-- need to re-create the control file.
--
--     Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "SMRPRODB" NORESETLOGS FORCE LOGGING ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 584
LOGFILE
  GROUP 1 (
    '/u04/MasterDB/oradata/SMRPRODB/redo01a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log'
  ) SIZE 500M BLOCKSIZE 512,
  GROUP 2 (
    '/u04/MasterDB/oradata/SMRPRODB/redo02a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log'
  ) SIZE 500M BLOCKSIZE 512,
  GROUP 3 (
    '/u04/MasterDB/oradata/SMRPRODB/redo03a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log'
  ) SIZE 500M BLOCKSIZE 512
-- STANDBY LOGFILE
--   GROUP 4 '/u04/MasterDB/oradata/SMRPRODB/redo04.log'  SIZE 500M BLOCKSIZE 512,
--   GROUP 5 '/u04/MasterDB/oradata/SMRPRODB/redo_05.log'  SIZE 500M BLOCKSIZE 512,
--   GROUP 6 '/u04/MasterDB/oradata/SMRPRODB/redo_06.log'  SIZE 500M BLOCKSIZE 512,
--   GROUP 7 '/u04/MasterDB/oradata/SMRPRODB/redo_07.log'  SIZE 500M BLOCKSIZE 512
DATAFILE
  '/u04/MasterDB/oradata/SMRPRODB/system01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/sysaux01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/undotbs01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/idata01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/ilog01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/indx01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/idata02.dbf'
CHARACTER SET AL32UTF8
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 20 BACKUP TYPE TO BACKUPSET');
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_920915123.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951566293.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951569200.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951636504.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951647402.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951742929.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953099207.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953197508.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953222963.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953280789.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953289263.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_999587851.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_1005460847.arc';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u04/MasterDB/oradata/SMRPRODB/temp01.dbf'
     SIZE 10240M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/u04/MasterDB/oradata/SMRPRODB/temp02.dbf'
     SIZE 10240M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
--
--
----------------------------------------------------------
-- The following script can be used on the standby database
-- to re-populate entries for a standby controlfile created
-- on the primary and copied to the standby site.
----------------------------------------------------------
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo04.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo_05.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo_06.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 0 '/u04/MasterDB/oradata/SMRPRODB/redo_07.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
--     Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "SMRPRODB" RESETLOGS FORCE LOGGING ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 584
LOGFILE
  GROUP 1 (
    '/u04/MasterDB/oradata/SMRPRODB/redo01a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log'
  ) SIZE 500M BLOCKSIZE 512,
  GROUP 2 (
    '/u04/MasterDB/oradata/SMRPRODB/redo02a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log'
  ) SIZE 500M BLOCKSIZE 512,
  GROUP 3 (
    '/u04/MasterDB/oradata/SMRPRODB/redo03a.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log',
    '/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log'
  ) SIZE 500M BLOCKSIZE 512
-- STANDBY LOGFILE
--   GROUP 4 '/u04/MasterDB/oradata/SMRPRODB/redo04.log'  SIZE 500M BLOCKSIZE 512,
--   GROUP 5 '/u04/MasterDB/oradata/SMRPRODB/redo_05.log'  SIZE 500M BLOCKSIZE 512,
--   GROUP 6 '/u04/MasterDB/oradata/SMRPRODB/redo_06.log'  SIZE 500M BLOCKSIZE 512
DATAFILE
  '/u04/MasterDB/oradata/SMRPRODB/system01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/sysaux01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/undotbs01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/idata01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/ilog01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/indx01.dbf',
  '/u04/MasterDB/oradata/SMRPRODB/idata02.dbf'
CHARACTER SET AL32UTF8
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 20 BACKUP TYPE TO BACKUPSET');
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_920915123.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951566293.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951569200.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951636504.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951647402.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_951742929.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953099207.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953197508.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953222963.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953280789.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_953289263.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_999587851.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u04/MasterDB/oradata/SMRPRODB/ArchiveLog/1_1_1005460847.arc';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Create log files for threads other than thread one.
;
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u04/MasterDB/oradata/SMRPRODB/temp01.dbf'
     SIZE 10240M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/u04/MasterDB/oradata/SMRPRODB/temp02.dbf'
     SIZE 10240M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
--
--
----------------------------------------------------------
-- The following script can be used on the standby database
-- to re-populate entries for a standby controlfile created
-- on the primary and copied to the standby site.
----------------------------------------------------------
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo04.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo_05.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '/u04/MasterDB/oradata/SMRPRODB/redo_06.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 0 '/u04/MasterDB/oradata/SMRPRODB/redo_07.log'
 SIZE 500M BLOCKSIZE 512 REUSE;
oracle@sgdcplm01:/u01/app/oracle/diag/rdbms/smrprodb_dr/SMRPRODB/trace>

No comments:

Post a Comment