I'm having some issues restoring an Oracle 12C database from one server into another one.
After trying this procedure:
1>Connect to the ORIGIN Database server
2> Create an rman script file:
CROSSCHECK ARCHIVELOG ALL;
CROSSCHECK BACKUP;
DELETE EXPIRED
ARCHIVELOG ALL;
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 3 DAYS;
DELETE NOPROMPT EXPIRED BACKUP;
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG TAG DAILY_BKP DELETE INPUT MAXSETSIZE=5G KEEP UNTIL TIME 'sysdate+3';
spool log to '<bkp_logfile>';
EXIT;
-
Run the command:
export ORACLE_SID=;rman target / @ -
After the backup finished, copy the files to the DESTINATION database server. Also copy the backup control files.
-
Connect to the DESTINATION database server
-
Create pfile:
*.audit_file_dest='<Path1>\adump'
*.audit_trail='db'
*.compatible='12.2.0.0.0'
*.control_files='<Path2>\control01.ctl','<Path2>\control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='CAODB01U'
*.db_recovery_file_dest='<Path2>'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='<PAth Diagnostic>'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=CDBXDB)'
*.enable_pluggable_database=true
*.memory_target=2729m
*.open_cursors=300
*.processes=500
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
-
rman> target /
-
rman>startup nomount pfile='< pfile >'
-
rman>restore controlfile from '< Path of datafile >';
-
rman>Alter database mount;
-
rman>catalog start with '';
-
rman>restore database;
-
rman>recover database;
-
rman>alter database open resetlogs;
After the last step the message i get the message:
> RMAN-00571:
> =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
> =============== RMAN-00571: =========================================================== RMAN-03002: failure of sql statement command at 05/20/2021 12:21:30
> ORA-01152: file 1 was not restored from a sufficiently old backup
> ORA-01110: data file 1: '<Path DB >\SYSTEM01.DBF'
As ive seen in all the procedures to restore it, that should be the way to do it , but it doesnt seems to be working. Does anyone have an idea of what im doing wrong?
Also, when i try with
restore database;
recover database;
it tells that there are some datafiles missing, but there shouldnt be missing because its supposed to be a full backup.
Best Answer
The error message is a bit confusing. Normally this is solved by feeding a few extra archives to the recovery process and issue a cancel. Do this using sqlplus. Let it recover an archive and when it asks for the next archive issue 'cancel'. Most of the times the database will open.