Академический Документы
Профессиональный Документы
Культура Документы
I have RMAN backup set under /u02/bkp directory, but nothing I have about these BACKUP SETS.
I am trying to find the way to recover the database from these backup sets.
Let’s simulate the scenario step by step.
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
$ vi inittesco.ora
db_name=tesco
:x ------------> Save & quit !
$ export ORACLE_SID=tesco
[oracle@RAC1 ~]$ rlrman target /
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
$ rlsqlplus / as sysdba
$ rlrman target /
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/23/2017 04:59:50
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
$ cd /u02/bkp/
[oracle@RAC1 bkp]$ ls -l
total 1138684
-rwxrwxr-x 1 oracle oinstall 48741888 Dec 22 21:53 o1_mf_annnn_TAG20171222T210946_f3sphcf1_.bkp
-rwxrwxr-x 1 oracle oinstall 1229312 Dec 22 21:53 o1_mf_annnn_TAG20171222T211344_f3sppr6m_.bkp
-rwxrwxr-x 1 oracle oinstall 9830400 Dec 22 21:53 o1_mf_ncsnf_TAG20171222T210951_f3spppc3_.bkp
-rwxrwxr-x 1 oracle oinstall 1109966848 Dec 22 21:56 o1_mf_nnndf_TAG20171222T210951_f3sphjsf_.bkp
OPTION 3
RMAN does NOT aware about these backup sets so that we need to register these RMAN backup files to the Control file using
following RMAN CATALOG command.
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/23/2017 05:09:07
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Here RMAN is trying to restore datafiles but path is NOT available on the TARGET Server.
So that RMAN is crying unable to restore Database files.
Create appropriate directory on the Target Server.
[oracle@RAC1 ~]$ mkdir -p /u02/app/oracle/oradata/tesco
[oracle@RAC1 ~]$ ls -l /u02/app/oracle/oradata/
total 8
drwxr-x--- 5 oracle oinstall 4096 Dec 23 04:35 ORCLDB
drwxr-xr-x 2 oracle oinstall 4096 Dec 23 05:10 tesco
$ tailf –f alert_tesco.log
OPEN_RESETL
-----------
REQUIRED
OPEN THE DATABASE
STATUS
------------
OPEN
NAME
---------
TESCO
MEMBER
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/tesco/redo03.log
/u02/app/oracle/oradata/tesco/redo02.log
/u02/app/oracle/oradata/tesco/redo01.log
NAME
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/tesco/system01.dbf
/u02/app/oracle/oradata/tesco/sysaux01.dbf
/u02/app/oracle/oradata/tesco/undotbs01.dbf
/u02/app/oracle/oradata/tesco/users01.dbf
/u02/app/oracle/oradata/tesco/example01.dbf
NAME
--------------------------------------------------------------------------------
/u02/app/oracle/product/11.2.0/dbhome_2/dbs/cntrltesco.dbf
SQL> show parameter pfile;
File created.
$ ls -l /tmp/init*
-rw-r--r-- 1 oracle oinstall 924 Dec 24 04:15 /tmp/inittesco.ora
$ vi /inittesco.ora
tesco.__db_cache_size=872415232
tesco.__java_pool_size=16777216
tesco.__large_pool_size=16777216
tesco.__pga_aggregate_target=419430400
tesco.__sga_target=1241513984
tesco.__shared_io_pool_size=0
tesco.__shared_pool_size=301989888
tesco.__streams_pool_size=16777216
*.audit_file_dest='/u02/app/oracle/admin/tesco/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u02/app/oracle/oradata/tesco/control01.ctl','/u02/app/oracle/flash_recovery_area/tesco/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='tesco'
*.db_recovery_file_dest='/u02/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/u02/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=tescoXDB)'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=413138944
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1241513984
*.undo_tablespace='UNDOTBS1'
$ mkdir –p /u02/app/oracle/admin/tesco/adump
$ mkdir –p /u02/app/oracle/flash_recovery_area/tesco
$ cd $ORACLE_HOME/dbs
$ ls -l cntr*
-rw-r----- 1 oracle oinstall 9748480 Dec 24 23:12 cntrltesco.dbf
RESTORING CONTROL FILES AS PER SERVER PARAMETER FILE
SQL> startup
SQL> show parameter pfile;
NAME
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/tesco/control01.ctl
/u02/app/oracle/flash_recovery_area/tesco/control02.ctl