This is an operation to restore the RAMN backup of a database in the RAC environment to a single database. The following error is reported when the data file is restored and the recovery is normal.
This is an operation to restore the RAMN backup of a database in the RAC environment to a single database. The following error is reported when the data file is restored and the recovery is normal.
Problem:
This is an operation to restore the RAMN backup of a database in the RAC environment to a single database. The following error is reported when data files and recovery are normal but the database is open.
-- Rman backup recovery
# Create a parameter file
Cd $ Oracle_HOME/dbs
$ Cat initntracdb. ora
*. Archive_lag_target = 0
*. Compatible = '11. 2.0.4.0'
*. Control_files = '/u01/oracle/oradata/ntracdb/controlfile1.dbf','/u01/oracle/oradata/ntracdb/controlfile2.dbf'
*. Db_block_size = 8192
*. Db_create_file_dest = '/u01/oracle/oradata/ntracdb'
*. Db_name = 'tracdb'
*. Db_recovery_file_dest = '/u01/oracle/fast_recovery_area'
*. Db_recovery_file_dest_size = 299000 M
*. Db_unique_name = 'tracdb'
*. Dg_broker_start = true
*. Local_listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = nticket3) (PORT = 1521 ))'
*. Log_archive_format = '% t _ % s _ % r. dbf'
*. Log_archive_max_processes = 4
*. Log_archive_min_succeed_dest = 1
*. Log_archive_trace = 0
*. Log_file_name_convert = 'null', 'null'
*. Nls_language = 'simplifiedchina'
*. Nls_territory = 'China'
*. Open_cursors = 300
*. Pga_aggregate_target = 429496729
*. Processses = 600
*. Remote_login_passwordfile = 'clusive'
*. Sga_max_size = 3435973836
*. Sga_target = 3221225472
*. Standby_file_management = 'auto'
*. Undo_tablespace = 'undotbs1'
Rman target/
Startup nomount;
Restore controlfile from '/home/oracle/rmanbak/ncnnf0_TAG20141110T011010_0.1205.863228449'; -- restore the control file first
Alter database mount;
Catalog start with '/home/oracle/rmanbak/'; -- batch register the copied rman backup. Assume that the copied backup is saved to the/u01/rmanbak/directory.
List backup; -- check whether the backup file is being restored.
Run {
Set newname for datafile '+ DATA01/ntracdb/datafile/users.295.855410331' to '/u01/oracle/oradata/ntracdb/users.295.855410331 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/undotbs1.263.855410331' to '/u01/oracle/oradata/ntracdb/undotbs1.263.855410331 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/sysaux.264.855410331' to '/u01/oracle/oradata/ntracdb/sysaux.264.855410331 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/system.265.855410331' to '/u01/oracle/oradata/ntracdb/system.265.855410331 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/undotbs2.293.8554000053' to '/u01/oracle/oradata/ntracdb/undotbs2.293.8554000053 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/undotbs3.292.8554000053' to '/u01/oracle/oradata/ntracdb/undotbs3.292.8554000053 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/sysaux.257.857772301' to '/u01/oracle/oradata/ntracdb/sysaux.257.857772301 ';
Set newname for datafile '+ DATA01/ntracdb/datafile/strategy.256.858008275' to '/u01/oracle/oradata/ntracdb/strategy.256.858008275'
Restore database;
Switch datafile all;
Recover database;
}
-- An error is reported when the database is opened.
$ Sqlplus/as sysdba
SQL> alter database open;
Alter database open
*
Error in row 1st
ORA-03113: End of the file for the communication channel
Process ID 6988
Session ID: 191 serial number: 3
-- View logs
Thu Nov 13 10:13:20 2014
Alter database open
Data Guard Brokerinitializing...
Data Guard Brokerinitialization complete
Data Guard: verifying databaseprimary role...
Thu Nov 13 10:13:20 2014
LGWR: STARTING ARCH PROCESSES
Thu Nov 13 10:13:20 2014
ARC0 started with pid = 21 and OSid = 26949
ARC0: Archival started
LGWR: STARTING ARCH PROCESSESCOMPLETE
ARC0: STARTING ARCH PROCESSES
LGWR: Primary database is inMAXIMUM AVAILABILITY mode
LGWR: DestinationLOG_ARCHIVE_DEST_1 is not serviced by LGWR
LGWR: Minimum of 1 LGWR standbydatabase required
Errors in file/u01/oracle/diag/rdbms/ntracdb/trace/ntracdb_lgwr_26870.trc:
The ORA-16072: a minimum of onestandby database destination is required
Thu Nov 13 10:13:21 2014
ARC1 started with pid = 22 and OSid = 26953
LGWR (ospid: 26870): terminating the instance due to error 16072
Thu Nov 13 10:13:21 2014
System statedump requested by (instance = 1, osid = 26870 (LGWR), summary = [abnormal instancetermination].
System Statedumped to trace file/u01/oracle/diag/rdbms/ntracdb/trace/ntracdb_diag_26846_20141113101321.trc
Dumpingdiagnostic data in directory = [cdmp_20141113101321], requested by (instance = 1, osid = 26870 (LGWR), summary = [abnormal instance termination].
Instanceterminated by LGWR, pid = 26870
Cause:
It may be caused by failure in controlling file backup
Solution:
Recreate the control file and then open the database.
STARTUP NOMOUNT
Create controlfile reusedatabase "ntracdb" NORESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 9344
LOGFILE
GROUP 1'/u01/oracle/oradata/ntracdb/NTRACDB/onlinelog/ow.mf_417b682j5nk _. log' SIZE 200 M,
GROUP 2'/u01/oracle/oradata/ntracdb/NTRACDB/onlinelog/o1_mf_2_b682j7gw _. log' SIZE 200 M,
GROUP 3 '/u01/oracle/oradata/ntracdb/NTRACDB/onlinelog/o1_mf_3_b682j98k _. log' SIZE 200 M,
GROUP 4'/u01/oracle/oradata/ntracdb/NTRACDB/onlinelog/o1_mf_4_b682jc2t _. log' SIZE 200 M
-- STANDBY LOGFILE
DATAFILE
'/U01/oracle/oradata/ntracdb/users.295.855410331 ',
'/U01/oracle/oradata/ntracdb/undotbs1.263.855410331 ',
'/U01/oracle/oradata/ntracdb/sysaux.264.855410331 ',
'/U01/oracle/oradata/ntracdb/system.265.855410331 ',
'/U01/oracle/oradata/ntracdb/undotbs2.293.855442653 ',
'/U01/oracle/oradata/ntracdb/undotbs3.292.855442653 ',
'/U01/oracle/oradata/ntracdb/sysaux.257.857772301 ',
'/U01/oracle/oradata/ntracdb/strategy.256.858008275 ',
'/U01/oracle/oradata/ntracdb/strategy.302.858008423'
Character set ZHS16GBK;
SQL> RECOVER DATABASE;
ORA-00283: resume session canceled due to an error
ORA-00264: recovery not required
-- The database can be opened normally.
SQL> alter database open;
The database has been changed.
# Creating temporary tablespace
Create temporary tablespace temp TEMPFILE '/u01/oracle/oradata/ntracdb/temp01.dbf'
SIZE 20 M REUSE
Extent management local uniform size 16 M;
-------------------------------------- Recommended reading --------------------------------------
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------