Sie sind auf Seite 1von 7

Code tree: *** Use Latest PBABEI standard hot backup - so Friday 6th September

22:00 BST ***


rman: there is a daily archival backup configured for 23:00 BST - so use the fil
es from
/rman_backup in llohsbabe01 (should be from about 6th Sep 23:45 BST)
-bash-3.2$ ksh
$ . ./set_xxonline
$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ cat initSBAB3I.ora
spfile='/sbab3i/oradata/data01/spfileSBAB3I.ora'
$ ls -ld /sbab3i/oradata/data01/spfileSBAB3I.ora
-rw-r----- 1 orsbab3i dbsbab3i 6656 Aug 16 15:53 /sbab3i/oradata/data01/spfileSB
AB3I.ora
$ ^Rsqlpl
$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 7 13:09:22 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 4175568896
Fixed Size
2233088
Variable Size
2063600896
Database Buffers
2097152000
Redo Buffers
12582912
SQL> shut abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

bytes
bytes
bytes
bytes
bytes

Total System Global Area 4175568896


Fixed Size
2233088
Variable Size
2063600896
Database Buffers
2097152000
Redo Buffers
12582912
Database mounted.
SQL> shut immedaite
SP2-0717: illegal SHUTDOWN option
SQL> shut immediate
ORA-01109: database not open

bytes
bytes
bytes
bytes
bytes

Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64
bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ ps -ux

Warning: bad syntax, perhaps a bogus '-'? See


USER
PID %CPU %MEM
VSZ RSS TTY
orsbab3i 3355 0.0 0.0 63768 864 pts/6
orsbab3i 28786 0.0 0.0 72472 9692 pts/6
orsbab3i 30721 0.0 0.0 70048 6656 pts/6
$ pwd
/sbab3i/oracle/product/11202/dbs
$

/usr/share/doc/procps-3.2.7/FAQ
STAT START TIME COMMAND
R+ 13:10 0:00 ps -ux
S
10:19 0:00 -bash
S
10:27 0:00 ksh

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ pwd
/rman_bkup
$
ls -ltra
-rwxr-xr-x 1
10000
10000 12173385728
EI_825465358_35457_1
-rwxr-xr-x 1
10000
10000 12393332736
EI_825465358_35455_1
-rwxr-xr-x 1
10000
10000 13040091136
EI_825465358_35456_1
-rwxr-xr-x 1
10000
10000 14324850688
EI_825465359_35458_1
-rwxr-xr-x 1
10000
10000
98304
EI_825468105_35459_1
-rwxr-xr-x 1
10000
10000
99972096
EI_825468109_35463_1
-rwxr-xr-x 1
10000
10000 114180608
EI_825468108_35460_1
-rwxr-xr-x 1
10000
10000 106503680
EI_825468109_35462_1
-rwxr-xr-x 1
10000
10000 121801728
EI_825468108_35461_1
-rwxr-xr-x 1
10000
10000
6635520
EI_825468145_35464_1
-rwxr-xr-x 1
10000
10000
15162
ep_on_disk_Sep_06_2013_23.successful.log
drwxrwxrwx 8
10000
10000
291
drwxrwxrwx 3 ortbabei dborgrid
191
drwxr-xr-x 60 root
root
4096
$

Sep 7 00:35 archival_backupset_PBAB


Sep 7 00:37 archival_backupset_PBAB
Sep 7 00:38 archival_backupset_PBAB
Sep 7 00:41 archival_backupset_PBAB
Sep 7 00:41 archival_backupset_PBAB
Sep 7 00:42 archival_backupset_PBAB
Sep 7 00:42 archival_backupset_PBAB
Sep 7 00:42 archival_backupset_PBAB
Sep 7 00:42 archival_backupset_PBAB
Sep 7 00:42 archival_backupset_PBAB
Sep 7 00:42 GIT_RMAN_backupset_0_ke
Sep 7 00:48 .
Sep 7 01:05 TBABEI
Sep 7 09:41 ..

$ cd $ONLINE_LOG/
$ ls -ltra rman*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@llohsbabe07 ~]# cd /rman_bkup
[root@llohsbabe07 rman_bkup]# chmod -R 777 *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ cd $XXONLINE_TOP/bin
$ rman_restore.sh -sourcedb PBABEI -disk_archival -backuplogs /rman_bkup -config
only
Processing options ......................................... completed

Generic log: $ONLINE_LOG/rman_restore.log_07092013-132047 ..


Not able to find any Rman backup scripts for SBAB3I
It is not mandatory to have the Rman backup script present
in order to do the restore, but things like register/unregister
new/old dbid and a possible level0 backup will not be performed.
Location of work files: $CLONE_BACK/rman/07092013-132047 ...
Restart file restart.log created/updated ...................
SBAB3I: Target instance (Rman terms: auxiliary) ............
PBABEI_SBAB3I_RTMP: Source instance (Rman terms: target) ...
(NB: from now on referred to as RTMP:) .....................
SBAB3I: checking status(mounted) of instance ............... running
When checking if SID SBAB3I is mounted found that:
ORA-01034: ORACLE not available

Do you want SBAB3I mounted Y/N ?: [N] Y


SBAB3I: checking status(mounted) of instance ...............
Retrieveing spfile .........................................
SBAB3I: checking status(nomounted) of instance .............
CCF used: archival_backupset_PBABEI_825468145_35464_1 ......
SBAB3I: checking status(mounted) of instance ...............
SBAB3I: getting temp file names ............................
SBAB3I: getting Archive mode ...............................
SBAB3I: getting DBID .......................................
SBAB3I: Getting Rman configuration .........................
SBAB3I: saving current controlfile .........................
SBAB3I: getting BCT information ............................
SBAB3I: getting FB information .............................
SBAB3I: getting db_unique_name .............................
SBAB3I: Creating scripts for cleanup .......................
Copying TargetInit.Ora to $CLONE_BACK/rman/07092013-132047 .
Updating $CLONE_BACK/rman/07092013-132047/initSBAB3I.ora ...
RTMP: getting threads and temp tablespaces .................
RTMP: getting BCT information ..............................
RTMP: getting data file names ..............................
RTMP: getting log file members .............................
RTMP: creating controlfile trace ...........................
RTMP: 'set newname' commands/matching DATA_HOMEs ...........
RTMP: Creating/matching REDO_HOMEs .........................
SBAB3I: creating controlfile script ........................
RTMP: restore/validate until SCN=5972497441959 .............
RTMP: restore channels: 10 .................................
RTMP: creating RR07092013-132047.sh & RC07092013-132047.sh .

succeded
succeded
succeded
succeded
completed
completed
completed
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
completed
completed
completed
completed
completed
succeded
completed
completed

$
$ rman_restore.sh -sourcedb PBABEI -disk_archival -backuplogs /rman_bkup
Processing options ......................................... completed
Generic log: $ONLINE_LOG/rman_restore.log_07092013-132307 ..

Not able to find any Rman backup scripts for SBAB3I


It is not mandatory to have the Rman backup script present
in order to do the restore, but things like register/unregister
new/old dbid and a possible level0 backup will not be performed.
Restart file found in $CLONE_BACK/rman/07092013-132047
Following options/parameters in use:
'-sourcedb PBABEI -disk_archival -backuplogs /rman_bkup -configonly'
Do you want to continue previous session Y/N ?: Y
Location of work files: $CLONE_BACK/rman/07092013-132047 ...
Restart file restart.log created/updated ...................
SBAB3I: Target instance (Rman terms: auxiliary) ............
PBABEI_SBAB3I_RTMP: Source instance (Rman terms: target) ...
(NB: from now on referred to as RTMP:) .....................
Already extracted TmpCtl.dbf ...............................
Already retrieved Target information .......................
CCF used: archival_backupset_PBABEI_825468145_35464_1 ......
Already created restore script RR07092013-132047.sh ........
Already created control file script cre_ctrl.sql ...........
Not able to source /sbab3i/oracle/bin/rman_SBAB3I.env
You are about to shutdown the SBAB3I instance, is that okay Y/N ?: [N] Y
SBAB3I: cleaning up data, temp, redos started at Sat Sep 7 13:23:38 BST 2013
SBAB3I: cleaning up data, temp, redos ended at Sat Sep 7 13:23:39 BST 2013
RTMP: disabling flashback .................................. succeded
RTMP: disabling block change tracking ...................... succeded
RTMP: restoring at Sat Sep 7 13:23:47 ......................
RR07092013-132047.sh running at pid 7594 ...................
do you want to exit Y/N ?: [Y] Y
Plz restart this script later, accepting to continue...
$ cd $CLONE_BACK
$ cd rman/
$ ls
06032013-162846 07092013-132047 22042013-112143
$ ls -lta
total 41
drwxr-xr-x 3 orsbab3i dbsbab3i 60 Sep 7 13:23 07092013-132047
drwxrwxrwx 5 orsbab3i dbsbab3i 5 Sep 7 13:21 .
drwxr-xr-x 3 orsbab3i dbsbab3i 62 Apr 22 12:15 22042013-112143
drwxrwxrwx 3 orsbab3i dbsbab3i 61 Mar 6 2013 06032013-162846
drwxrwxrwx 5 orsbab3i dbsbab3i 5 Mar 6 2013 ..
$ cd 07092013-132047
$ pwd
/ood_repository/xxonline/clone_base/SBAB3I_llohsbabe07/rman/07092013-132047
$
################################################

rman_restore.sh
ly
rman_restore.sh
do you want to
rman_restore.sh
do you want to
rman_restore.sh
do you want to

-sourcedb PBABEI -disk_archival -backuplogs /rman_bkup -configon


-sourcedb PBABEI
exit Y/N ?: [Y]
-sourcedb PBABEI
exit Y/N ?: [Y]
-sourcedb PBABEI
exit Y/N ?: [Y]

-disk_archival -backuplogs /rman_bkup [ recover


Y ] {restore}
-disk_archival -backuplogs /rman_bkup [ recover
Y ] {recover}
-disk_archival -backuplogs /rman_bkup [ recover
Y ] {contolfile , Tempfiles and final bounce }

################################################
$ tail -f RmanRestore.log
released channel: c5
released channel: c6
released channel: c7
released channel: c8
released channel: c9
released channel: c10
RMAN>
################################################
$ rman_restore.sh -sourcedb PBABEI -disk_archival -backuplogs /rman_bkup
Processing options ......................................... completed
Generic log: $ONLINE_LOG/rman_restore.log_07092013-145456 ..
Not able to find any Rman backup scripts for SBAB3I
It is not mandatory to have the Rman backup script present
in order to do the restore, but things like register/unregister
new/old dbid and a possible level0 backup will not be performed.
Restart file found in $CLONE_BACK/rman/07092013-132047
Following options/parameters in use:
'-sourcedb PBABEI -disk_archival -backuplogs /rman_bkup -configonly'
Do you want to continue previous session Y/N ?: Y
Location of work files: $CLONE_BACK/rman/07092013-132047 ...
Restart file restart.log created/updated ...................
SBAB3I: Target instance (Rman terms: auxiliary) ............
PBABEI_SBAB3I_RTMP: Source instance (Rman terms: target) ...
(NB: from now on referred to as RTMP:) .....................
Already extracted TmpCtl.dbf ...............................
Already retrieved Target information .......................
CCF used: archival_backupset_PBABEI_825468145_35464_1 ......
Already created restore script RR07092013-132047.sh ........
Already created control file script cre_ctrl.sql ...........
RTMP: recover at Sat Sep 7 14:56:01 ........................
Checking status of Rman recover ............................
Deleting DBID in SID PBABEI_SBAB3I_RTMP ....................
SBAB3I: Creating control files and starting DB .............
SBAB3I OPEN at Sat Sep 7 14:56:42 BST 2013 ................

completed
succeded
completed
completed

SBAB3I: adding temporary files ............................. succeded


SBAB3I: getting DBID ....................................... completed
SBAB3I: Executing Rman commands ............................
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
CONFIGURE
SBAB3I:
SBAB3I:
SBAB3I:
Found 0

RETENTION POLICY TO REDUNDANCY 1 .................


BACKUP OPTIMIZATION OFF ..........................
DEFAULT DEVICE TYPE TO DISK ......................
CONTROLFILE AUTOBACKUP OFF .......................
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK
DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACK
DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1 .
ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1
MAXSETSIZE TO UNLIMITED ..........................
ENCRYPTION FOR DATABASE OFF ......................
ENCRYPTION ALGORITHM 'AES128' ....................
COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAU
ARCHIVELOG DELETION POLICY TO NONE ...............
SNAPSHOT CONTROLFILE NAME TO '/sbab3i/oracle/produ

succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded
succeded

Executing Rman commands ............................ completed


Checking for read only filenames ................... succeded
Building RenameMissing.sql ......................... Completed
datafile(s) to be read only ........................

===============================================================<>xxonline<>==
SBAB3I: shutting down ...................................... succeded
SBAB3I: starting up ........................................ succeded
rman_restore.sh finished at Sat Sep 7 14:57:26 .............
===============================================================<>xxonline<>==
################################################
$ rman_restore.sh -sourcedb PBABEI -disk_archival -backuplogs /rman_bkup
Processing options ......................................... completed
Generic log: $ONLINE_LOG/rman_restore.log_07092013-144332 ..
Not able to find any Rman backup scripts for SBAB3I
It is not mandatory to have the Rman backup script present
in order to do the restore, but things like register/unregister
new/old dbid and a possible level0 backup will not be performed.
Restart file found in $CLONE_BACK/rman/07092013-132047
Following options/parameters in use:
'-sourcedb PBABEI -disk_archival -backuplogs /rman_bkup -configonly'
Do you want to continue previous session Y/N ?: y
Location of work files: $CLONE_BACK/rman/07092013-132047 ...
Restart file restart.log created/updated ...................
SBAB3I: Target instance (Rman terms: auxiliary) ............
PBABEI_SBAB3I_RTMP: Source instance (Rman terms: target) ...
(NB: from now on referred to as RTMP:) .....................

Already extracted TmpCtl.dbf ...............................


Already retrieved Target information .......................
CCF used: archival_backupset_PBABEI_825468145_35464_1 ......
Already created restore script RR07092013-132047.sh ........
Already created control file script cre_ctrl.sql ...........
RC07092013-132047.sh running at pid 2198 ...................
do you want to exit Y/N ?: [Y]
################################################
$ pwd
/ood_repository/xxonline/clone_base/SBAB3I_llohsbabe07/rman/07092013-132047
$ ls -ltra
total 158415
drwxrwxrwx 5
-rw-r--r-- 1 orsbab3i dbsbab3i
24586 Sep 7 14:12 RmanRestore.log
drwxr-xr-x 3 orsbab3i dbsbab3i
61 Sep 7 14:43 .
-rw-r--r-- 1 orsbab3i dbsbab3i
4148 Sep 7 14:44 restart.log
-rw-r----- 1 orsbab3i dbsbab3i 105594880 Sep 7 14:44 TmpCtl.dbf
-rw-r--r-- 1 orsbab3i dbsbab3i
3434 Sep 7 14:44 RmanRecover.log
$ tail -f RmanRecover.log
archived log thread=1 sequence=174237
channel c4: restoring archived log
archived log thread=1 sequence=174238
channel c4: restoring archived log
archived log thread=1 sequence=174239
channel c4: restoring archived log
archived log thread=1 sequence=174240
channel c4: restoring archived log
archived log thread=1 sequence=174241
channel c4: reading from backup piece /rman_bkup/archival_backupset_PBABEI_82546
8109_35463_1
################################################
Finished
released
released
released
released
released
released
released
released
released
released

recover at 07-SEP-2013 14:48:01


channel: c1
channel: c2
channel: c3
channel: c4
channel: c5
channel: c6
channel: c7
channel: c8
channel: c9
channel: c10

RMAN>
Recovery Manager complete.
################################################

Das könnte Ihnen auch gefallen