Friday, 26 July 2019

Rman Backup database plus archivelog sequences Execution


The execution will be as follows:

1. Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement

2. Run the BACKUP ARCHIVELOG ALL command

3. Back up the files specified in the BACKUPcommand

4. Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement

5. Back up any remaining archived redo log files


RMAN> backup database plus archivelog;


Starting backup at 26-JUL-19
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=86 instance=rac1 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=171 RECID=344 STAMP=1013984588
input archived log thread=1 sequence=179 RECID=342 STAMP=1013984560
input archived log thread=1 sequence=180 RECID=343 STAMP=1013984587
input archived log thread=1 sequence=181 RECID=345 STAMP=1013988631
input archived log thread=2 sequence=172 RECID=346 STAMP=1014018988
input archived log thread=1 sequence=182 RECID=347 STAMP=1014024631
input archived log thread=2 sequence=173 RECID=348 STAMP=1014057043
input archived log thread=1 sequence=183 RECID=349 STAMP=1014060610
input archived log thread=2 sequence=174 RECID=350 STAMP=1014069771
input archived log thread=1 sequence=184 RECID=351 STAMP=1014071046
input archived log thread=2 sequence=175 RECID=353 STAMP=1014078641
input archived log thread=1 sequence=185 RECID=352 STAMP=1014075035
input archived log thread=1 sequence=186 RECID=356 STAMP=1014104600
input archived log thread=2 sequence=176 RECID=354 STAMP=1014098518
input archived log thread=2 sequence=177 RECID=355 STAMP=1014104598
input archived log thread=2 sequence=178 RECID=357 STAMP=1014118213
input archived log thread=1 sequence=187 RECID=359 STAMP=1014139825
input archived log thread=2 sequence=179 RECID=358 STAMP=1014127420
input archived log thread=2 sequence=180 RECID=360 STAMP=1014141828
input archived log thread=1 sequence=188 RECID=362 STAMP=1014157547
input archived log thread=2 sequence=181 RECID=361 STAMP=1014156252
input archived log thread=2 sequence=182 RECID=364 STAMP=1014179432
input archived log thread=1 sequence=189 RECID=363 STAMP=1014161450
input archived log thread=1 sequence=190 RECID=366 STAMP=1014197456
input archived log thread=2 sequence=183 RECID=365 STAMP=1014184966
input archived log thread=2 sequence=184 RECID=367 STAMP=1014199604
input archived log thread=1 sequence=191 RECID=370 STAMP=1014228510
channel ORA_DISK_1: starting piece 1 at 26-JUL-19
channel ORA_DISK_1: finished piece 1 at 26-JUL-19
piece handle=/u01/Backup/ora_df1014640728_s121_s1 tag=TAG20190726T123846 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=185 RECID=368 STAMP=1014214097
input archived log thread=2 sequence=186 RECID=369 STAMP=1014228507
input archived log thread=2 sequence=187 RECID=371 STAMP=1014242973
input archived log thread=1 sequence=192 RECID=373 STAMP=1014260983
input archived log thread=2 sequence=188 RECID=372 STAMP=1014255018
input archived log thread=2 sequence=189 RECID=374 STAMP=1014291025
input archived log thread=1 sequence=193 RECID=375 STAMP=1014296469
input archived log thread=2 sequence=190 RECID=376 STAMP=1014306867
input archived log thread=1 sequence=194 RECID=377 STAMP=1014306868
input archived log thread=1 sequence=195 RECID=378 STAMP=1014307115
input archived log thread=2 sequence=191 RECID=379 STAMP=1014307116
input archived log thread=2 sequence=192 RECID=380 STAMP=1014307117
input archived log thread=1 sequence=196 RECID=381 STAMP=1014307123
input archived log thread=2 sequence=193 RECID=382 STAMP=1014307125
input archived log thread=2 sequence=194 RECID=383 STAMP=1014307126
input archived log thread=1 sequence=197 RECID=384 STAMP=1014310985
input archived log thread=2 sequence=195 RECID=385 STAMP=1014313363
input archived log thread=1 sequence=198 RECID=387 STAMP=1014313375
input archived log thread=2 sequence=196 RECID=386 STAMP=1014313370
input archived log thread=1 sequence=199 RECID=389 STAMP=1014315028
input archived log thread=2 sequence=197 RECID=388 STAMP=1014315028
input archived log thread=2 sequence=198 RECID=390 STAMP=1014316005
input archived log thread=1 sequence=200 RECID=391 STAMP=1014316010
input archived log thread=1 sequence=201 RECID=393 STAMP=1014321086
input archived log thread=2 sequence=199 RECID=392 STAMP=1014321085
input archived log thread=2 sequence=200 RECID=394 STAMP=1014321094
input archived log thread=1 sequence=202 RECID=395 STAMP=1014321095
input archived log thread=1 sequence=203 RECID=396 STAMP=1014321790
input archived log thread=2 sequence=201 RECID=398 STAMP=1014376807
input archived log thread=1 sequence=204 RECID=397 STAMP=1014376802
input archived log thread=2 sequence=202 RECID=399 STAMP=1014376811
input archived log thread=1 sequence=205 RECID=401 STAMP=1014376824
input archived log thread=2 sequence=203 RECID=400 STAMP=1014376823
input archived log thread=2 sequence=204 RECID=402 STAMP=1014376826
input archived log thread=1 sequence=206 RECID=403 STAMP=1014377286
input archived log thread=1 sequence=207 RECID=404 STAMP=1014409819
input archived log thread=1 sequence=208 RECID=405 STAMP=1014415384
input archived log thread=1 sequence=209 RECID=406 STAMP=1014435037
input archived log thread=1 sequence=210 RECID=407 STAMP=1014469488
input archived log thread=1 sequence=211 RECID=408 STAMP=1014483011
input archived log thread=2 sequence=205 RECID=410 STAMP=1014483020
input archived log thread=1 sequence=212 RECID=409 STAMP=1014483015
input archived log thread=2 sequence=206 RECID=411 STAMP=1014483780
input archived log thread=2 sequence=207 RECID=412 STAMP=1014483784
input archived log thread=1 sequence=213 RECID=414 STAMP=1014483796
input archived log thread=2 sequence=208 RECID=413 STAMP=1014483795
input archived log thread=2 sequence=209 RECID=415 STAMP=1014483797
input archived log thread=1 sequence=214 RECID=416 STAMP=1014487307
input archived log thread=2 sequence=210 RECID=417 STAMP=1014487314
input archived log thread=1 sequence=215 RECID=418 STAMP=1014487316
input archived log thread=2 sequence=211 RECID=419 STAMP=1014491334
input archived log thread=1 sequence=216 RECID=420 STAMP=1014491339
input archived log thread=1 sequence=217 RECID=422 STAMP=1014491348
input archived log thread=2 sequence=212 RECID=421 STAMP=1014491346
input archived log thread=2 sequence=213 RECID=423 STAMP=1014501726
input archived log thread=1 sequence=218 RECID=425 STAMP=1014525034
input archived log thread=2 sequence=214 RECID=424 STAMP=1014503924
input archived log thread=2 sequence=215 RECID=426 STAMP=1014539421
input archived log thread=1 sequence=219 RECID=427 STAMP=1014563397
input archived log thread=2 sequence=216 RECID=428 STAMP=1014563406
input archived log thread=2 sequence=217 RECID=429 STAMP=1014563411
input archived log thread=1 sequence=220 RECID=430 STAMP=1014563412
input archived log thread=1 sequence=221 RECID=432 STAMP=1014577234
input archived log thread=2 sequence=218 RECID=431 STAMP=1014574197
channel ORA_DISK_1: starting piece 1 at 26-JUL-19
channel ORA_DISK_1: finished piece 1 at 26-JUL-19
piece handle=/u01/Backup/ora_df1014640805_s122_s1 tag=TAG20190726T123846 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=219 RECID=435 STAMP=1014588134
input archived log thread=1 sequence=222 RECID=433 STAMP=1014577239
input archived log thread=1 sequence=223 RECID=434 STAMP=1014588132
input archived log thread=1 sequence=224 RECID=436 STAMP=1014588320
input archived log thread=2 sequence=220 RECID=437 STAMP=1014615026
input archived log thread=1 sequence=225 RECID=438 STAMP=1014622210
input archived log thread=2 sequence=221 RECID=440 STAMP=1014640268
input archived log thread=1 sequence=226 RECID=439 STAMP=1014640265
input archived log thread=1 sequence=227 RECID=442 STAMP=1014640378
input archived log thread=2 sequence=222 RECID=441 STAMP=1014640375
input archived log thread=2 sequence=223 RECID=444 STAMP=1014640403
input archived log thread=1 sequence=228 RECID=443 STAMP=1014640399
input archived log thread=1 sequence=229 RECID=446 STAMP=1014640411
input archived log thread=2 sequence=224 RECID=445 STAMP=1014640409
input archived log thread=2 sequence=225 RECID=448 STAMP=1014640425
input archived log thread=1 sequence=230 RECID=447 STAMP=1014640423
input archived log thread=1 sequence=231 RECID=449 STAMP=1014640436
input archived log thread=2 sequence=226 RECID=450 STAMP=1014640437
input archived log thread=1 sequence=232 RECID=452 STAMP=1014640646
input archived log thread=2 sequence=227 RECID=451 STAMP=1014640645
input archived log thread=2 sequence=228 RECID=453 STAMP=1014640719
input archived log thread=1 sequence=233 RECID=454 STAMP=1014640721
channel ORA_DISK_1: starting piece 1 at 26-JUL-19
channel ORA_DISK_1: finished piece 1 at 26-JUL-19
piece handle=/u01/Backup/ora_df1014640863_s123_s1 tag=TAG20190726T123846 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 26-JUL-19

Starting backup at 26-JUL-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/RAC/DATAFILE/sysaux.257.1011959959
input datafile file number=00001 name=+DATA/RAC/DATAFILE/system.258.1011960053
input datafile file number=00004 name=+DATA/RAC/DATAFILE/undotbs1.260.1011960171
input datafile file number=00005 name=+DATA/RAC/DATAFILE/undotbs2.265.1011960859
input datafile file number=00006 name=+DATA/RAC/DATAFILE/users.259.1011960169
channel ORA_DISK_1: starting piece 1 at 26-JUL-19
channel ORA_DISK_1: finished piece 1 at 26-JUL-19
piece handle=/u01/Backup/ora_df1014640890_s124_s1 tag=TAG20190726T124129 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:46
Finished backup at 26-JUL-19

Starting backup at 26-JUL-19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=229 RECID=456 STAMP=1014641118
input archived log thread=1 sequence=234 RECID=455 STAMP=1014641117
channel ORA_DISK_1: starting piece 1 at 26-JUL-19
channel ORA_DISK_1: finished piece 1 at 26-JUL-19
piece handle=/u01/Backup/ora_df1014641121_s125_s1 tag=TAG20190726T124521 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 26-JUL-19

Starting Control File and SPFILE Autobackup at 26-JUL-19
piece handle=+FRA/RAC/AUTOBACKUP/2019_07_26/s_1014641124.322.1014641127 comment=NONE
Finished Control File and SPFILE Autobackup at 26-JUL-19

RMAN>

Backing Up Control Files

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

RMAN> BACKUP TABLESPACE users INCLUDE CURRENT CONTROLFILE;

Starting backup at 25-JUL-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 25-JUL-19
channel ORA_DISK_1: finished piece 1 at 25-JUL-19
piece handle=+FRA/RAC/BACKUPSET/2019_07_25/ncnnf0_tag20190725t192423_0.401.1014578667 tag=TAG20190725T192423 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA/RAC/DATAFILE/users.259.1011960169
channel ORA_DISK_1: starting piece 1 at 25-JUL-19
channel ORA_DISK_1: finished piece 1 at 25-JUL-19
piece handle=+FRA/RAC/BACKUPSET/2019_07_25/nnndf0_tag20190725t192423_0.325.1014578671 tag=TAG20190725T192423 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-JUL-19

Starting Control File and SPFILE Autobackup at 25-JUL-19
piece handle=+FRA/RAC/AUTOBACKUP/2019_07_25/s_1014578672.326.1014578675 comment=NONE
Finished Control File and SPFILE Autobackup at 25-JUL-19

RMAN> BACKUP CURRENT CONTROLFILE;

Starting backup at 25-JUL-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 25-JUL-19
channel ORA_DISK_1: finished piece 1 at 25-JUL-19
piece handle=+FRA/RAC/BACKUPSET/2019_07_25/ncnnf0_tag20190725t194446_0.327.1014579891 tag=TAG20190725T194446 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 25-JUL-19

Starting Control File and SPFILE Autobackup at 25-JUL-19
piece handle=+FRA/RAC/AUTOBACKUP/2019_07_25/s_1014579893.328.1014579895 comment=NONE
Finished Control File and SPFILE Autobackup at 25-JUL-19



RMAN> BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/u01/Backup/control.bk';

Starting backup at 25-JUL-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/Backup/control.bk tag=TAG20190725T194626 RECID=11 STAMP=1014579993
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 25-JUL-19

Starting Control File and SPFILE Autobackup at 25-JUL-19
piece handle=+FRA/RAC/AUTOBACKUP/2019_07_25/s_1014579997.331.1014579999 comment=NONE
Finished Control File and SPFILE Autobackup at 25-JUL-19

RMAN>

####################### Snapshot Controlfile #####################



RMAN> SHOW SNAPSHOT CONTROLFILE NAME;

RMAN configuration parameters for database with db_unique_name RAC are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/RAC/CONTROLFILE/snapcf_rac1.f';

RMAN>

################  Backing Up the Control File to a Trace File ###########################

SQL> alter database backup controlfile to trace;

Database altered.

SQL>
SQL> sho parameter dump

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/product/12.1.0
                                                 /dbhome_2/rdbms/log
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/rac
                                                 /rac1/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      partial
user_dump_dest                       string      /u01/app/oracle/product/12.1.0
                                                 /dbhome_2/rdbms/log
SQL>
[oracle@srv1 trace]$ cat rac1_ora_22067.trc
Trace file /u01/app/oracle/diag/rdbms/rac/rac1/trace/rac1_ora_22067.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_2
System name:    Linux
Node name:      srv1.example.com
Release:        3.8.13-68.3.4.el6uek.x86_64
Version:        #2 SMP Tue Jul 14 15:03:36 PDT 2015
Machine:        x86_64
Instance name: rac1
Redo thread mounted by this instance: 1
Oracle process number: 39
Unix process pid: 22067, image: oracle@srv1.example.com (TNS V1-V3)


*** 2019-07-25 19:53:18.714
*** SESSION ID:(94.33629) 2019-07-25 19:53:18.714
*** CLIENT ID:() 2019-07-25 19:53:18.714
*** SERVICE NAME:(SYS$USERS) 2019-07-25 19:53:18.714
*** MODULE NAME:(sqlplus@srv1.example.com (TNS V1-V3)) 2019-07-25 19:53:18.714
*** CLIENT DRIVER:(SQL*PLUS) 2019-07-25 19:53:18.714
*** ACTION NAME:() 2019-07-25 19:53:18.714

-- 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.dbf
--
-- DB_UNIQUE_NAME="rac"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=4
-- STANDBY_FILE_MANAGEMENT=MANUAL
-- STANDBY_ARCHIVE_DEST=?/dbs/arch
-- FAL_CLIENT=''
-- FAL_SERVER=''
--
-- LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
-- LOG_ARCHIVE_DEST_1='MANDATORY REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='NOREGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'
-- 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 "RAC" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    MAXINSTANCES 32
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 (
    '+DATA/RAC/ONLINELOG/group_1.262.1011960239',
    '+FRA/RAC/ONLINELOG/group_1.257.1011960241'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 2 (
    '+DATA/RAC/ONLINELOG/group_2.263.1011960241',
    '+FRA/RAC/ONLINELOG/group_2.258.1011960245'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 3 (
    '+DATA/RAC/ONLINELOG/group_3.266.1011961119',
    '+FRA/RAC/ONLINELOG/group_3.259.1011961121'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 4 (
    '+DATA/RAC/ONLINELOG/group_4.267.1011961123',
    '+FRA/RAC/ONLINELOG/group_4.260.1011961125'
  ) SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '+DATA/RAC/DATAFILE/system.258.1011960053',
  '+DATA/RAC/DATAFILE/sysaux.257.1011959959',
  '+DATA/RAC/DATAFILE/undotbs1.260.1011960171',
  '+DATA/RAC/DATAFILE/undotbs2.265.1011960859',
  '+DATA/RAC/DATAFILE/users.259.1011960169'
CHARACTER SET AL32UTF8
;
-- Configure snapshot controlfile filename
EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME('+FRA/RAC/CONTROLFILE/snapcf_rac1.f');
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('SNAPSHOT CONTROLFILE NAME','TO ''+FRA/RAC/CONTROLFILE/snapcf_rac1.f''');
-- Configure RMAN configuration record 2
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RMAN OUTPUT','TO KEEP FOR 21 DAYS');
-- Configure RMAN configuration record 3
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON');
-- 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 '+FRA';
-- ALTER DATABASE REGISTER LOGFILE '+FRA';
-- 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 '+DATA/RAC/TEMPFILE/temp.264.1011960267'
     SIZE 224395264  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
-- End of tempfile additions.
--
--     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 "RAC" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    MAXINSTANCES 32
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 (
    '+DATA/RAC/ONLINELOG/group_1.262.1011960239',
    '+FRA/RAC/ONLINELOG/group_1.257.1011960241'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 2 (
    '+DATA/RAC/ONLINELOG/group_2.263.1011960241',
    '+FRA/RAC/ONLINELOG/group_2.258.1011960245'
  ) SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '+DATA/RAC/DATAFILE/system.258.1011960053',
  '+DATA/RAC/DATAFILE/sysaux.257.1011959959',
  '+DATA/RAC/DATAFILE/undotbs1.260.1011960171',
  '+DATA/RAC/DATAFILE/undotbs2.265.1011960859',
  '+DATA/RAC/DATAFILE/users.259.1011960169'
CHARACTER SET AL32UTF8
;
-- Configure snapshot controlfile filename
EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME('+FRA/RAC/CONTROLFILE/snapcf_rac1.f');
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('SNAPSHOT CONTROLFILE NAME','TO ''+FRA/RAC/CONTROLFILE/snapcf_rac1.f''');
-- Configure RMAN configuration record 2
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RMAN OUTPUT','TO KEEP FOR 21 DAYS');
-- Configure RMAN configuration record 3
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON');
-- 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 '+FRA';
-- ALTER DATABASE REGISTER LOGFILE '+FRA';
-- 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.
ALTER DATABASE ADD LOGFILE THREAD 2
  GROUP 3 (
    '+DATA/RAC/ONLINELOG/group_3.266.1011961119',
    '+FRA/RAC/ONLINELOG/group_3.259.1011961121'
  ) SIZE 50M BLOCKSIZE 512 REUSE,
  GROUP 4 (
    '+DATA/RAC/ONLINELOG/group_4.267.1011961123',
    '+FRA/RAC/ONLINELOG/group_4.260.1011961125'
  ) SIZE 50M BLOCKSIZE 512 REUSE;
-- 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 '+DATA/RAC/TEMPFILE/temp.264.1011960267'
     SIZE 224395264  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
-- End of tempfile additions.
--
[oracle@srv1 trace]$



Tuesday, 23 July 2019

Linux TO Window Restoration using RMAN Backup 12c (Doc ID 2003327.1)

Hi All we are performing rman full backup restoration on window machine.  As i have faced issue as while performing restoration using inconsistent backup using rman we can not recover using archivelog  for media recovery process on window machine case. As per oracle docs media recovery is not possible in cross platform case.
Redo application is not supported between Linux and Windows except with a standby database.



C:\Users\plmadmin>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue Jul 23 11:38:07 2019

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

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 8.2678E+10 bytes
Fixed Size                  7774968 bytes
Variable Size            1.3422E+10 bytes
Database Buffers         6.8988E+10 bytes
Redo Buffers              260657152 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

C:\Users\plmadmin>rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jul 23 11:39:28 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: SMRPRODB (not mounted)

RMAN>

RMAN> restore controlfile from 'D:\rman_backup_smrprodb\control_63_SMRPRODB_20190723_cf_D-SMRPRODB_id-3201394995_geu7c65j.bak';

Starting restore at 23-JUL-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=430 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\CONTROL01.CTL
output file name=D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\CONTROL02.CTL
Finished restore at 23-JUL-19

RMAN> alter database mount;

Statement processed
released channel: ORA_DISK_1

RMAN> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------

/u04/MasterDB/oradata/SMRPRODB/redo01a.log


/u04/MasterDB/oradata/SMRPRODB/redo02a.log


/u04/MasterDB/oradata/SMRPRODB/redo03a.log


/u04/MasterDB/oradata/SMRPRODB/redo04.log


/u04/MasterDB/oradata/SMRPRODB/redo_05.log


/u04/MasterDB/oradata/SMRPRODB/redo_06.log


/u04/MasterDB/oradata/SMRPRODB/redo_07.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log


/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log


13 rows selected

RMAN>

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo01a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01a.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo01a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01a.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo02a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02a.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo02a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02a.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo03a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03a.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo03a.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03a.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo04.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo04.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo04.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo04.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_05.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_05.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_05.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_05.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_06.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_06.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_06.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_06.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_07.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_07.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_07.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo_07.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01b.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01b.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01c.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo01c.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02b.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02b.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02c.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo02c.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03b.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03b.log''

RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03c.log'' ";

sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log''  to  ''D:\app\plmadmin\oradata\smrprodb\redo03c.log''

RMAN>

RMAN>

RMAN>

RMAN>

RMAN> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------

D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01A.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02A.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03A.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO04.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_05.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_06.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_07.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01B.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01C.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02B.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02C.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03B.LOG


D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03C.LOG


13 rows selected

RMAN> catalog start with 'D:\rman_backup_smrprodb\';

Starting implicit crosscheck backup at 23-JUL-19
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=430 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=456 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=469 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=482 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=495 device type=DISK
allocated channel: ORA_DISK_6
channel ORA_DISK_6: SID=508 device type=DISK
allocated channel: ORA_DISK_7
channel ORA_DISK_7: SID=521 device type=DISK
allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=534 device type=DISK
allocated channel: ORA_DISK_9
channel ORA_DISK_9: SID=547 device type=DISK
allocated channel: ORA_DISK_10
channel ORA_DISK_10: SID=560 device type=DISK
allocated channel: ORA_DISK_11
channel ORA_DISK_11: SID=573 device type=DISK
allocated channel: ORA_DISK_12
channel ORA_DISK_12: SID=586 device type=DISK
allocated channel: ORA_DISK_13
channel ORA_DISK_13: SID=599 device type=DISK
allocated channel: ORA_DISK_14
channel ORA_DISK_14: SID=612 device type=DISK
allocated channel: ORA_DISK_15
channel ORA_DISK_15: SID=625 device type=DISK
allocated channel: ORA_DISK_16
channel ORA_DISK_16: SID=638 device type=DISK
allocated channel: ORA_DISK_17
channel ORA_DISK_17: SID=651 device type=DISK
allocated channel: ORA_DISK_18
channel ORA_DISK_18: SID=664 device type=DISK
allocated channel: ORA_DISK_19
channel ORA_DISK_19: SID=677 device type=DISK
allocated channel: ORA_DISK_20
channel ORA_DISK_20: SID=690 device type=DISK
Crosschecked 33 objects
Finished implicit crosscheck backup at 23-JUL-19

Starting implicit crosscheck copy at 23-JUL-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
using channel ORA_DISK_11
using channel ORA_DISK_12
using channel ORA_DISK_13
using channel ORA_DISK_14
using channel ORA_DISK_15
using channel ORA_DISK_16
using channel ORA_DISK_17
using channel ORA_DISK_18
using channel ORA_DISK_19
using channel ORA_DISK_20
Crosschecked 2 objects
Finished implicit crosscheck copy at 23-JUL-19

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_05\O1_MF_1_13_GBGGMS1R_.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_05\O1_MF_1_14_GBGGMS83_.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_05\O1_MF_1_15_GBGGN5CL_.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_05\O1_MF_1_16_GBGNCNB6_.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_10_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_11_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_12_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_13_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_14_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_15_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_16_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_17_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_18_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_19_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_1_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_20_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_21_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_22_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_23_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_24_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_25_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_26_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_27_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_28_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_29_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_2_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_3_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_4_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_5_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_6_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_7_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_8_1005460847.ARC
File Name: D:\APP\PLMADMIN\FAST_RECOVERY_AREA\SMRPRODB\ARCHIVELOG\2019_04_15\1_9_1005460847.ARC

searching for all files that match the pattern D:\rman_backup_smrprodb\

List of Files Unknown to the Database
=====================================
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004601_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004733_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004752_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004833_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004834_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004835_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004836_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004838_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004839_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004842_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004843_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004854_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004885_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004898_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004919_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004951_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004981_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004984_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005007_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005031_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005039_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005062_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005069_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005083_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005095_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G2U7C64V_9730_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G3U7C64V_9731_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G4U7C64V_9732_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G5U7C64V_9733_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G6U7C650_9734_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_GDU7C65I_9741_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\CONTROL_63_SMRPRODB_20190723_CF_D-SMRPRODB_ID-3201394995_GEU7C65J.BAK
File Name: D:\RMAN_BACKUP_SMRPRODB\RMAN_SMRPRODB_FULL.LOG
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G7U7C651_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G8U7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G9U7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GAU7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GBU7C653_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GCU7C653_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\STANDBYCONTROL_SMRPRODB_20190723_GFU7C65K_1_1.CTL

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004601_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004733_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004752_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004833_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004834_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004835_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004836_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004838_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004839_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004842_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004843_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004854_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004885_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004898_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004919_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004951_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004981_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000004984_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005007_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005031_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005039_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005062_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005069_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005083_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005095_1010514318.0001
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G2U7C64V_9730_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G3U7C64V_9731_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G4U7C64V_9732_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G5U7C64V_9733_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_G6U7C650_9734_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_GDU7C65I_9741_1_20190723
File Name: D:\RMAN_BACKUP_SMRPRODB\CONTROL_63_SMRPRODB_20190723_CF_D-SMRPRODB_ID-3201394995_GEU7C65J.BAK
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G7U7C651_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G8U7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G9U7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GAU7C652_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GBU7C653_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GCU7C653_1_1.BCKP
File Name: D:\RMAN_BACKUP_SMRPRODB\STANDBYCONTROL_SMRPRODB_20190723_GFU7C65K_1_1.CTL

List of Files Which Were Not Cataloged
=======================================
File Name: D:\RMAN_BACKUP_SMRPRODB\RMAN_SMRPRODB_FULL.LOG
  RMAN-07517: Reason: The file header is corrupted

RMAN> RUN
2> {
3> set newname for datafile 1 to "D:\app\plmadmin\oradata\smrprodb\system01.dbf";
4> set newname for datafile 2 to "D:\app\plmadmin\oradata\smrprodb\sysaux01.dbf";
5> set newname for datafile 3 to "D:\app\plmadmin\oradata\smrprodb\undotbs01.dbf";
6> set newname for datafile 4 to "D:\app\plmadmin\oradata\smrprodb\idata01.dbf";
7> set newname for datafile 5 to "D:\app\plmadmin\oradata\smrprodb\ilog01.dbf";
8> set newname for datafile 6 to "D:\app\plmadmin\oradata\smrprodb\indx01.dbf";
9> set newname for datafile 7 to "D:\app\plmadmin\oradata\smrprodb\idata02.dbf";
10> set newname for tempfile 1 to "D:\app\plmadmin\oradata\smrprodb\temp01.dbf";
11> set newname for tempfile 2 to "D:\app\plmadmin\oradata\smrprodb\temp02.dbf";
12> RESTORE DATABASE;
13> SWITCH DATAFILE ALL;
14> SWITCH TEMPFILE ALL;
15> }

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 23-JUL-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
using channel ORA_DISK_11
using channel ORA_DISK_12
using channel ORA_DISK_13
using channel ORA_DISK_14
using channel ORA_DISK_15
using channel ORA_DISK_16
using channel ORA_DISK_17
using channel ORA_DISK_18
using channel ORA_DISK_19
using channel ORA_DISK_20

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00003 to D:\app\plmadmin\oradata\smrprodb\undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00006 to D:\app\plmadmin\oradata\smrprodb\indx01.dbf
channel ORA_DISK_1: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GAU7C652_1_1.BCKP
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00001 to D:\app\plmadmin\oradata\smrprodb\system01.dbf
channel ORA_DISK_2: restoring datafile 00005 to D:\app\plmadmin\oradata\smrprodb\ilog01.dbf
channel ORA_DISK_2: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G8U7C652_1_1.BCKP
channel ORA_DISK_3: starting datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_DISK_3: restoring datafile 00002 to D:\app\plmadmin\oradata\smrprodb\sysaux01.dbf
channel ORA_DISK_3: restoring datafile 00007 to D:\app\plmadmin\oradata\smrprodb\idata02.dbf
channel ORA_DISK_3: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G9U7C652_1_1.BCKP
channel ORA_DISK_4: starting datafile backup set restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
channel ORA_DISK_4: restoring datafile 00004 to D:\app\plmadmin\oradata\smrprodb\idata01.dbf
channel ORA_DISK_4: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G7U7C651_1_1.BCKP
channel ORA_DISK_1: piece handle=D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_GAU7C652_1_1.BCKP tag=TAG20190723T100833
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_2: piece handle=D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G8U7C652_1_1.BCKP tag=TAG20190723T100833
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:46
channel ORA_DISK_3: piece handle=D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G9U7C652_1_1.BCKP tag=TAG20190723T100833
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:00:46
channel ORA_DISK_4: piece handle=D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_G7U7C651_1_1.BCKP tag=TAG20190723T100833
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_4: restore complete, elapsed time: 00:01:16
Finished restore at 23-JUL-19

datafile 1 switched to datafile copy
input datafile copy RECID=653 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\SYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy RECID=654 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\SYSAUX01.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=655 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\UNDOTBS01.DBF
datafile 4 switched to datafile copy
input datafile copy RECID=656 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\IDATA01.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=657 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\ILOG01.DBF
datafile 6 switched to datafile copy
input datafile copy RECID=658 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\INDX01.DBF
datafile 7 switched to datafile copy
input datafile copy RECID=659 STAMP=1014378450 file name=D:\APP\PLMADMIN\ORADATA\SMRPRODB\IDATA02.DBF

renamed tempfile 1 to D:\app\plmadmin\oradata\smrprodb\temp01.dbf in control file
renamed tempfile 2 to D:\app\plmadmin\oradata\smrprodb\temp02.dbf in control file

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/23/2019 11:47:55
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'D:\APP\PLMADMIN\ORADATA\SMRPRODB\SYSTEM01.DBF'

RMAN> recover database;

Starting recover at 23-JUL-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
using channel ORA_DISK_11
using channel ORA_DISK_12
using channel ORA_DISK_13
using channel ORA_DISK_14
using channel ORA_DISK_15
using channel ORA_DISK_16
using channel ORA_DISK_17
using channel ORA_DISK_18
using channel ORA_DISK_19
using channel ORA_DISK_20

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=5139
channel ORA_DISK_1: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_GDU7C65I_9741_1_20190723
channel ORA_DISK_1: piece handle=D:\RMAN_BACKUP_SMRPRODB\BACKUP_SMRPRODB_DB_GDU7C65I_9741_1_20190723 tag=TAG20190723T100850
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=D:\RMAN_BACKUP_SMRPRODB\28_APRIL_2019\ARCHIVE_LOG\ARC0000005139_1010514318.0001 thread=1 sequence=5139
unable to find archived log
archived log thread=1 sequence=5140
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/23/2019 11:48:12
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5140 and starting SCN of 507051307

RMAN> alter database open resetlogs;

Statement processed

RMAN> select name,open_mode,databse_role from v$database;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/23/2019 11:49:32
ORA-00904: "DATABSE_ROLE": invalid identifier

RMAN> select name,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
SMRPRODB  READ WRITE           PRIMARY

RMAN>