Friday, August 11, 2023

restore rman

Team,



orase1:SE1C@sapse1c-db /var/tmp/SE1C > tail -100f se1c_pitr.log

Recovery Manager: Release 10.2.0.5.0 - Production on Wed Dec 11 16:39:38 2013

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

RMAN> connect target *
2> run
3> {
4> allocate channel c1 device type disk;
5> allocate channel c2 device type disk;
6> allocate channel c3 device type disk;
7> allocate channel c4 device type disk;
8> set until time "to_date('05-DEC-2013 13:00:00','dd-mm-yyyy hh24:mi:ss')";
9> restore database;
10> recover database;
11> }
12>
connected to target database: SE1 (DBID=305816433, not open)

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=1965 devtype=DISK

allocated channel: c2
channel c2: sid=1964 devtype=DISK

allocated channel: c3
channel c3: sid=1963 devtype=DISK

allocated channel: c4

This is what was done..

orase1:SE1C@sapse1c-db /var/tmp/SE1C > cat se1c_pitr.cmd
connect target /
run
{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
set until time "to_date('05-DEC-2013 13:00:00','dd-mm-yyyy hh24:mi:ss')";
restore database;
recover database;
}
orase1:SE1C@sapse1c-db /var/tmp/SE1C > rman checksyntax cmdfile=se1c_pitr.cmd

Recovery Manager: Release 10.2.0.5.0 - Production on Wed Dec 11 15:45:00 2013

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

RMAN> connect target *
2> run
3> {
4> allocate channel c1 device type disk;
5> allocate channel c2 device type disk;
6> allocate channel c3 device type disk;
7> allocate channel c4 device type disk;
8> set until time "to_date('05-DEC-2013 13:00:00','dd-mm-yyyy hh24:mi:ss')";
9> restore database;
10> recover database;
11> }
12>
The cmdfile has no syntax errors

Recovery Manager complete.

orase1:SE1C@sapse1c-db /var/tmp/SE1C > crontab -l > /var/tmp/crontab_bkup_12112013.txt
orase1:SE1C@sapse1c-db /var/tmp/SE1C > ls -l /var/tmp/crontab_bkup_12112013.txt
-rw-r--r--   1 orase1   dba          298 Dec 11 16:17 /var/tmp/crontab_bkup_12112013.txt
orase1:SE1C@sapse1c-db /var/tmp/SE1C > crontab -r
orase1:SE1C@sapse1c-db /var/tmp/SE1C > sqldba

SQL*Plus: Release 10.2.0.5.0 - Production on Wed Dec 11 16:17:17 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 5368709120 bytes
Fixed Size                  2059680 bytes
Variable Size            2046825056 bytes
Database Buffers         3305111552 bytes
Redo Buffers               14712832 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
orase1:SE1C@sapse1c-db /var/tmp/SE1C > rman cmdfile=se1c_pitr.cmd log=se1c_pitr.log
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>





No comments:

Post a Comment

How to Trouble shoot Logfile_sync wait event

   First  Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...