RMAN Restore on new host
Hey, I am trying to create a manual standby using this metalink article:
Alternative for standby database in standard edition [ID 333749.1]
First I create a hotbackup from my rac configuration
then
SQL>alter database backup controlfile to '/tmp/standby.ctl';
copy all over to the standby database.
startup nomount pfile=init<sid>.ora
alter database mount
--> rman target /
restore database --> all files are getting restored.
Then I try to recover the database by applying the archivelogs - thats not working.
I added the archivelog backup to the rman --> start catalog with '/tmp/.......'
Both configurations are using ASM: diskgroup DATA & RECO
So no file name convert neccessary
Any ideas whats wrong ?
Now I get these messages
QL> recover database using backup controlfile until cancel;
ORA-00279: Anderung 1079665, erstellt von 02/15/2011 13:26:56. Erforderlich fur
Thread 1
ORA-00289: Vorschlag: +RECO
ORA-00280: Anderung 1079665 fur Thread 1 in Sequenz #53
Log angeben: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00308: Archiviertes Log '+RECO' kann nicht geoffnet werden
ORA-17503: ksfdopn:2 konnte Datei +RECO nicht offnen
ORA-15045: ASM-Dateiname "+RECO" hat nicht das Format fur Referenzen
ORA-00308: Archiviertes Log '+RECO' kann nicht geoffnet werden
ORA-17503: ksfdopn:2 konnte Datei +RECO nicht offnen
ORA-15045: ASM-Dateiname "+RECO" hat nicht das Format fur Referenzen
Chris
I added the archivelog backup to the rman --> start catalog with '/tmp/.......'but 'recover database using backup controlfile until cancel;' is a command issued in sqlplus,'catalog' does not apply.
The controlfile expects the archivelogs in diskgroup +RECO, but these are physically located under /tmp.
When prompted you have to provide these logfiles from /tmp, this has to be done manually. After the last available archivelog,stop with 'cancel'.
Werner
Similar Messages
-
RMAN full DB restore on New Host
Hi There,
My RMAN full backup script is like this:
RMAN> CONNECT TARGET *
CONNECT CATALOG *
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=db1,OB2BARLIST=Off-site,OB2BARHOSTNAME=db1.blah.tr)';
backup incremental level 0
format 'Off-site<db1_%s:%t:%p>.dbf'
cumulative
database;
backup
format 'Off-site<db1_%s:%t:%p>.dbf'
archivelog all;
backup
format 'Off-site<db1_%s:%t:%p>.dbf'
current controlfile;
EXITCan you help writing a full restore/recover script...
Thanks
Edited by: user642423 on Jan 24, 2009 11:11 PMI want to restore to a New Host and the above script will not work for me...
Doing this procedure "http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov.htm#i1007814" I get an error like this:
PS: I've set "maxdays 30" but again same "no autobackup found or specified handle is not a valid copy or piece" error...
channel dev_0: looking for autobackup on day: 20090125
channel dev_0: looking for autobackup on day: 20090124
channel dev_0: looking for autobackup on day: 20090123
channel dev_0: looking for autobackup on day: 20090122
channel dev_0: looking for autobackup on day: 20090121
channel dev_0: looking for autobackup on day: 20090120
channel dev_0: looking for autobackup on day: 20090119
channel dev_0: no autobackup in 7 days found
released channel: dev_0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2009 00:27:00
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece -
Restore to new host - starting RMAN fails
Server host A died today and took along with it my database "prod", so I restored from tape all of the archive logs and datafiles onto Sever host b. Host b also happens to be the host where my RMAN catalog exists. Now that I have all of the files in place, I plan to restore "prod" to host b using the following script:
run {
until sequence 66774 thread 1;
restore database;
recover database;
alter database open resetlogs:}
However, when I try to get into RMAN to issue this command I get errors. I know I am missing something here, and I suspect it is something small. From the windows command line I set the database sid:
$> set ORACLE_SID=prod
$> echo %ORACLE_SID%
prod
$>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Apr 26 15:45:24 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12560: TNS:protocol adapter error
I've updated host b to so that the tnsnames and listener files point "prod" to server B instead.
What am I doing wrong here?
Thanks, Tonyyou need to recovery your controlfiles first in a nomount stage, usually connecting to your catalog.
Then you can do the restore while the db is mounted.
look something like this:
connect target /
connect catalog un/pw
run {
startup nomount;
allocate channel t1 type 'SBT_TAPE' ;
set until sequence 1430422 thread 1;
RESTORE CONTROLFILE TO '/orcctl1/oradata/control01.ctl';
REPLICATE CONTROLFILE FROM '/orcctl1/oradata/control01.ctl';
alter database mount;
in a seperate script:
connect target /
connect catalog un/pw
run {
allocate channel t97 type 'SBT_TAPE';
allocate channel t98 type 'SBT_TAPE';
allocate channel t99 type 'SBT_TAPE';
allocate channel t100 type 'SBT_TAPE';
set until sequence 1424320 thread 1;
restore database;
recover database DELETE ARCHIVELOG MAXSIZE 200G;
alter database open resetlogs;
you may need to add a SEND command for nb_ora_serv and nb_ora_client if you use them. -
Listener error while restoring to new host
I'm trying to restore a production database to a new host using a complete RMAN backup following these instructions:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov.htm#i1006453
I'm trying to force the database to start in NOMOUNT so I can restore the control files, then the data files. I took a crack at editing the initialization file, but I'm not sure I got things right, as I'm trying to restore a single-node RAC to a non-RAC system. Both servers are Windows.
I'm getting the following error:
RMAN> startup force nomount pfile='D:\Oracle\product\10.2.0\TSBAK\database\initt
sbak.ora';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/21/2010 14:01:19
RMAN-04014: startup failed: ORA-01078: failure in processing system parameters
RMAN-04017: startup error description: ORA-00119: invalid specification for syst
em parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_TSBAK'This is the listener (I just ran the net configuration wizard)
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\TSBAK\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER_TSBAK =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\TSBAK)
(PROGRAM = extproc)
LISTENER_TSBAK =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TSSQL2008B)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)This is the init.ora file
*.__db_cache_size=343932928
*.__java_pool_size=209715200
*.__large_pool_size=8388608
*.__shared_pool_size=209715200
*.__streams_pool_size=8388608
*._optimizer_connect_by_cost_based=false
*.audit_file_dest='D:\Oracle\product\10.2.0\admin\TSBAK\ADUMP'
*.background_dump_dest='D:\Oracle\product\10.2.0\admin\TSBAK\BDUMP'
*.cluster_database=FALSE
*.cluster_database_instances=1
*.compatible='10.2.0.1.0'
*.control_files='+DATA/tsbak/controlfile/current.260.591973329'
*.core_dump_dest='D:\Oracle\product\10.2.0\admin\TSBAK\CDUMP'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_file_multiblock_read_count=16
*.db_files=1024# INITIAL
*.db_name='TS'
*.global_names=FALSE
##clustdb1.instance_name='TS1'
*.instance_number=1
##clustdb1.instance_number=1
*.java_pool_size=209715200
*.job_queue_processes=10
*.large_pool_size=8388608
##clustdb1.local_listener='LISTENER_TSBAK'
*.local_listener='LISTENER_TSBAK'
*.log_archive_dest_1='LOCATION=+DATA/TSBAK/'
*.log_archive_format='ARC%S_%R.%T'
*.log_buffer=8192# INITIAL
*.log_checkpoint_interval=10000
*.max_dump_file_size='10240'# limit trace file size to 10 K each
*.nls_timestamp_format='YYYY-MM-DD HH24:MI.SS.FF'
*.open_cursors=300
*.open_links=4
*.parallel_max_servers=5
*.pga_aggregate_target=203423744
*.processes=250# INITIAL
*.remote_listener='LISTENER_TSBAK'
*.remote_login_passwordfile='EXCLUSIVE'
##clustdb1.remote_login_passwordfile='exclusive'
*.sga_max_size=1317011456
*.sga_target=788529152
*.shared_pool_size=209715200
*.smtp_out_server='mail.mt.net:25'
*.thread=1
##clustdb1.thread=1
*.undo_management='AUTO'# For automatic undo management
*.undo_tablespace='UNDOTBS1'
##clustdb1.undo_tablespace='UNDOTBS1'
*.user_dump_dest='D:\Oracle\product\10.2.0\admin\TSBAK\UDUMP'I am not sure which piece has the error, but would appreciate some help. This is one of the few steps that there isn't much mention of in the guide.okay moving on. I got previous error corrected (the directories hadn't been created yet). Now, I'm facing a new one and I did a copy/paste of the directory string, so I know it's valid.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/22/2010 12:13:34
RMAN-04014: startup failed: ORA-16024: parameter LOG_ARCHIVE_DEST_1 cannot be parsedthe parameter is:
*.log_archive_dest_1='D:\Oracle\product\10.2.0\TSBAK\database\archive'Can someone see what I'm doing wrong here? -
Restore to new host from tape, can't find autobackups
Thankfully this is just a test, but I'm having trouble restoring a cold backup from a production host to a test/dev host. I tried the following:
rman target /
RMAN> set dbid 1600196320;
executing command: SET DBID
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/app/oracle/product/10.2/dbs/initedi.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2069720 bytes
Variable Size 67111720 bytes
Database Buffers 83886080 bytes
Redo Buffers 6316032 bytes
RMAN> run
2> {
3> allocate channel t1 device type sbt;
4> send 'NB_ORA_SERV=pobackup01, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
5> restore spfile to pfile '/dbexport/oracle/bckup/test_restore/edipfile_new.ora' from autobackup;
6> shutdown abort;
7> }
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 6.5 (2008052301)
sent command to channel: t1
Starting restore at 14-MAY-09
channel t1: looking for autobackup on day: 20090514
channel t1: looking for autobackup on day: 20090513
channel t1: looking for autobackup on day: 20090512
channel t1: looking for autobackup on day: 20090511
channel t1: looking for autobackup on day: 20090510
channel t1: looking for autobackup on day: 20090509
channel t1: looking for autobackup on day: 20090508
channel t1: no autobackup in 7 days found
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/14/2009 10:27:37
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
Here is the log file from when the backup was taken on 5/10, that was the last backup of this db.
RMAN> connect target *
2>
3> show all;
4> run {
5> shutdown immediate;
6> startup mount;
7> backup database;
8> alter database open;
9> }
10>
connected to target database: EDI (DBID=1600196320)
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' SEND 'NB_ORA_SERV=pobackup01, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/sapp/oracle/product/10.2/dbs/snapcf_edi.f'; # default
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 356515840 bytes
Fixed Size 2070976 bytes
Variable Size 314574400 bytes
Database Buffers 33554432 bytes
Redo Buffers 6316032 bytes
Starting backup at may-10-2009 08:00:19
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=157 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Veritas NetBackup for Oracle - Release 6.5 (2008052301)
channel ORA_SBT_TAPE_1: starting full datafile backupset
channel ORA_SBT_TAPE_1: specifying datafile(s) in backupset
input datafile fno=00007 name=/sdb4/oradata/edi/data01.dbf
input datafile fno=00006 name=/sdb5/oradata/edi/indx01.dbf
input datafile fno=00008 name=/sdb2/oradata/edi/undo01.dbf
input datafile fno=00001 name=/sdb1/oradata/edi/system01.dbf
input datafile fno=00004 name=/sdb2/oradata/edi/sysaux01.dbf
input datafile fno=00002 name=/sdb4/oradata/edi/tools01.dbf
input datafile fno=00005 name=/sdb4/oradata/edi/users01.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at may-10-2009 08:00:20
channel ORA_SBT_TAPE_1: finished piece 1 at may-10-2009 08:08:55
piece handle=2jkeljgl_1_1 tag=TAG20090510T080020 comment=API Version 2.0,MMS Version 5.0.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:08:34
Finished backup at may-10-2009 08:08:55
Starting Control File and SPFILE Autobackup at may-10-2009 08:08:55
piece handle=c-1600196320-20090510-00 comment=API Version 2.0,MMS Version 5.0.0.0
Finished Control File and SPFILE Autobackup at may-10-2009 08:09:50
database opened
Recovery Manager complete.
Do I need to pass in the source host name when configuring the channel? So instead of
send 'NB_ORA_SERV=pobackup01, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
i would need,
send 'NB_ORA_SERV=pobackup01, NB_ORA_CLIENT=newhost, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
??Ok, problem solved. Here's the complete process for recovering a non-archivelog mode data base to a new host from a cold backup from veritas 6.5 tape library.
I used the "until time 'SYSDATE-5'" option because the cold backup was taken 5 days ago, and while rman will look back up to 7 days, it was taking forever to search for the autobackup. This let it start searching on the day the backup was made. The original problem I was having was due to the fact that the backup was taken from one host and the restore was going to another and I wasn't sending the old host name as the NB_ORA_CLIENT parameter. So it was searching backups from the new host for the data.
oracle_sandbox1> rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Thu May 14 14:05:02 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> set dbid 1600196320;
executing command: SET DBID
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/app/oracle/product/10.2/dbs/initedi.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2069720 bytes
Variable Size 67111720 bytes
Database Buffers 83886080 bytes
Redo Buffers 6316032 bytes
RMAN>run {
2> allocate channel t1 device type 'SBT_TAPE';
3> send 'NB_ORA_SERV=pobackup01, NB_ORA_CLIENT=sent1, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
4> restore spfile to pfile '/dbexport/oracle/bckup/test_restore/edipfile_new.ora' from autobackup until time 'SYSDATE-5';
5> }
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 6.5 (2008052301)
sent command to channel: t1
Starting restore at 15-MAY-09
channel t1: looking for autobackup on day: 20090510
channel t1: autobackup found: c-1600196320-20090510-00
channel t1: SPFILE restore from autobackup complete
Finished restore at 15-MAY-09
released channel: t1
RMAN> shutdown abort;
Oracle instance shut down
\/\/\\/\/\//\//\/\/\/\/\ edit pfile from another session to remove references to old host
RMAN> startup force nomount pfile='/dbexport/oracle/bckup/test_restore/edipfile_new.ora';
Oracle instance started
Total System Global Area 356515840 bytes
Fixed Size 2070976 bytes
Variable Size 314574400 bytes
Database Buffers 33554432 bytes
Redo Buffers 6316032 bytes
RMAN> run {
2> allocate channel t1 device type 'SBT_TAPE';
3> send 'NB_ORA_SERV=pobackup01, NB_ORA_CLIENT=sent1, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
4> restore controlfile from autobackup until time 'SYSDATE-5';
5> }
allocated channel: t1
channel t1: sid=156 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 6.5 (2008052301)
sent command to channel: t1
Starting restore at 14-MAY-09
channel t1: looking for autobackup on day: 20090510
channel t1: autobackup found: c-1600196320-20090510-00
channel t1: control file restore from autobackup complete
output filename=/dbexport/oracle/bckup/test_restore/control01.ctl
output filename=/dbexport/oracle/bckup/test_restore/control02.ctl
Finished restore at 15-MAY-09
released channel: t1
RMAN> alter database mount;
database mounted
RMAN> @reco_2.rman
RMAN> run
2> {
3> allocate channel t1 device type 'SBT_TAPE';
4> send 'NB_ORA_SERV=pobackup01, NB_ORA_CLIENT=sent1, NB_ORA_POLICY=jdeoracle, NB_ORA_SCHED=hotfull';
5> set newname for datafile 1 to '/dbexport/oracle/bckup/test_restore/system01.dbf';
6> set newname for datafile 2 to '/dbexport/oracle/bckup/test_restore/tools01.dbf';
7> set newname for datafile 4 to '/dbexport/oracle/bckup/test_restore/sysaux01.dbf';
8> set newname for datafile 5 to '/dbexport/oracle/bckup/test_restore/users01.dbf';
9> set newname for datafile 6 to '/dbexport/oracle/bckup/test_restore/indx01.dbf';
10> set newname for datafile 7 to '/dbexport/oracle/bckup/test_restore/data01.dbf';
11> set newname for datafile 8 to '/dbexport/oracle/bckup/test_restore/undo01.dbf';
12> sql "ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo03.log'' TO ''/dbexport/oracle/bckup/test_restore/redo3.rdo'' ";
13> sql "ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo02.log'' TO ''/dbexport/oracle/bckup/test_restore/redo2.rdo'' ";
14> sql "ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo01.log'' TO ''/dbexport/oracle/bckup/test_restore/redo1.rdo'' ";
15> sql "ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo05.log'' TO ''/dbexport/oracle/bckup/test_restore/redo5.rdo'' ";
16> sql "ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo04.log'' TO ''/dbexport/oracle/bckup/test_restore/redo4.rdo'' ";
17> restore database;
18> switch datafile all;
19> recover database noredo;
20> }
allocated channel: t1
channel t1: sid=156 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 6.5 (2008052301)
sent command to channel: t1
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
sql statement: ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo03.log'' TO ''/dbexport/oracle/bckup/test_restore/redo3.rdo''
sql statement: ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo02.log'' TO ''/dbexport/oracle/bckup/test_restore/redo2.rdo''
sql statement: ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo01.log'' TO ''/dbexport/oracle/bckup/test_restore/redo1.rdo''
sql statement: ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo05.log'' TO ''/dbexport/oracle/bckup/test_restore/redo5.rdo''
sql statement: ALTER DATABASE RENAME FILE ''/sdb1/oradata/edi/redo04.log'' TO ''/dbexport/oracle/bckup/test_restore/redo4.rdo''
Starting restore at 15-MAY-09
channel t1: starting datafile backupset restore
channel t1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /dbexport/oracle/bckup/test_restore/system01.dbf
restoring datafile 00002 to /dbexport/oracle/bckup/test_restore/tools01.dbf
restoring datafile 00004 to /dbexport/oracle/bckup/test_restore/sysaux01.dbf
restoring datafile 00005 to /dbexport/oracle/bckup/test_restore/users01.dbf
restoring datafile 00006 to /dbexport/oracle/bckup/test_restore/indx01.dbf
restoring datafile 00007 to /dbexport/oracle/bckup/test_restore/data01.dbf
restoring datafile 00008 to /dbexport/oracle/bckup/test_restore/undo01.dbf
channel t1: reading from backup piece 2jkeljgl_1_1
channel t1: restored backup piece 1
piece handle=2jkeljgl_1_1 tag=TAG20090510T080020
channel t1: restore complete, elapsed time: 00:04:55
Finished restore at 15-MAY-09
datafile 1 switched to datafile copy
input datafile copy recid=8 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=9 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/tools01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=10 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/sysaux01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=11 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/users01.dbf
datafile 6 switched to datafile copy
input datafile copy recid=12 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/indx01.dbf
datafile 7 switched to datafile copy
input datafile copy recid=13 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/data01.dbf
datafile 8 switched to datafile copy
input datafile copy recid=14 stamp=686913242 filename=/dbexport/oracle/bckup/test_restore/undo01.dbf
Starting recover at 15-MAY-09
Finished recover at 15-MAY-09
released channel: t1
RMAN> **end-of-file**
RMAN> alter database open resetlogs;
database opened
RMAN> exit
Edited by: PktAces on May 18, 2009 8:04 AM -
Hello!
Oracle 10.2.0.2
Linux x86 Red Hat Enterprise
Netbackup 6.0
Netbackup 6.0 MP5
Netbackup Oracle Agent
Production server; 2,5 TB
Hello
Id like to restore a backup from tape to another host
But i am having doubts regarding the restore script, ive done a channel for maintenance with success, so i think netbackup is okey installed.
Now i want to restore a backup to the new host, witch has been pre-configured with same catalogues, and oracle binaries.
Before this script i will manually restore spfile and put the database in nomount, and set DBID
run
ALLOCATE CHANNEL ch0 type 'SBT_TAPE';
ALLOCATE CHANNEL ch1 type 'SBT_TAPE';
RESTORE controlfile from autobackup;
ALTER DATABASE mount;
RESTORE database;
RECOVER database;
ALTER DATABASE OPEN RESETLOGS;
RELEASE CHANNEL ch0;
RELEASE CHANNEL ch1;
}When i enter this script, i guess netbackup wont allow me to come and claim a backup from someone else, so i have configured netbackup master server to cllow restore to alternate host, and i have configured this new host to trick netbackup that he is the old one (NB_ORA_CLIENT), but im having doubts about the parms parameter in rman, i think i need to define the policy somewhere, but i dont know where. Have any of you completet a similiar task once, then maybe u can shed light on me.
Thanks!siva_pappu wrote:
Hi,
Have you tried the restore? If yes and any errors received, post them to get the help.
Some information is required to finalize the script.
Up to what time you want to restore and recover? depending on it, you have to use "set the until time " clause.
you are trying to restore control file from backup, so "RECOVER database" will not work. have to use "recover database using backup control file until scn/until time '<time>'/until scn". To know about all the options, refer manuals, metalink, etc.
in the env params, I guess policy is not required.
example script:
run
set until time "to_date('10-apr-2010 10:00:00','DD-mon-YYYY hh24:mi:ss')" ;
ALLOCATE CHANNEL ch0 TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_SERV=master_serv, NB_ORA_CLIENT=client_where_backup_was_taken)';
ALLOCATE CHANNEL ch1 TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_SERV=see above, NB_ORA_CLIENT=see above)';
RESTORE controlfile from autobackup;
ALTER DATABASE mount;
RESTORE database;
restore archive log from seq <start number> until seq <end seq> ;
RECOVER database using backup control file;
ALTER DATABASE OPEN RESETLOGS;
RELEASE CHANNEL ch0;
RELEASE CHANNEL ch1;
The archive logs required for recovery can be identified from your source database v$archived_log based on the recove until time.
Thanks,
SivaOk, i didnt think about that, i guess what i want to do is using backup controlfile until cancel. Wont he go into the tape and find the needed redo logs himself, i did not know that i needed to restore them to my disk before? -
Restoring Rman backup on New Host with different directory structure
Hi,
I have a following scenario to clone the database.
1. clone the database on new server
2. source is non - ASM and target is ASM
3. On source incremental level 0 backup taken on disk connecting to catalog, the backup is moved to target host to different directory structure
4. source is running on 32-bit Linux two node Rac and Target is running on 64-bit Linux two node Rac
I did the following steps and getting below error:
1. I copied incremental Level 0 backup to target server(where we need to build new db) to different directory structure
2. On target i created pfile and build the instance, as dbf file are in multiple locations in source i put following tow parameters in init.ora of target database
*.db_file_name_convert =(/u02/oradata/app1p/,+QADATA2/udev/datafile),(/u03/oradata/app1p/,+QADATA1/udev/datafile),(/u12/oradata/app1p/,+QADATA1/udev/datafile,),(/u99/oradata/app1p/,+QADATA1/udev/datafile),(/u09/oradata/app1p/,+QADATA1/udev/datafile),(/u14/oradata/app1p/,+QADATA1/udev/datafile),(/u07/oradata/app1p/,+QADATA1/udev/datafile),(/u06/oradata/prod/,+QADATA1/udev/datafile'),(/u05/oradata/app1p/,+QADATA1/udev/datafile)
*.log_file_name_convert =("/u99/oradata/app1p/","+QADATA2/udev/onlinelog/")
3. connected to rman -->> started db in nomount -->> restored the controlfile --> cataloged the backup piece and then i am trying to restore
All the above steps i did using the Doc id *How To Restore Rman Backups On A Different Node When The Directory Structures Are Different [ID 419137.1]*
script i am using is :
RMAN> run {
2> set until time "to_date('DEC/20/2010 05:30:00','Mon/DD/YYYY HH24:MI:SS')";
3> allocate channel c1 device type disk;
4> allocate channel c2 device type disk;
5> allocate channel c3 device type disk;
6> allocate channel c4 device type disk;
7> set newname for datafile 1 to '+QADATA1/UDEV/DATAFILE';
8> set newname for datafile 2 to '+QADATA1/UDEV/DATAFILE';
9> set newname for datafile 3 to '+QADATA1/UDEV/DATAFILE';
10> set newname for datafile 4 to '+QADATA1/UDEV/DATAFILE';
11> set newname for datafile 5 to '+QADATA1/UDEV/DATAFILE';
12> set newname for datafile 6 to '+QADATA1/UDEV/DATAFILE';
13> set newname for datafile 54 to '+QADATA1/UDEV/DATAFILE';
set newname for datafile 63 to '+QADATA1/UDEV/DATAFILE';
14> 15> set newname for datafile 67 to '+QADATA1/UDEV/DATAFILE';
16> set newname for datafile 68 to '+QADATA1/UDEV/DATAFILE';
17> set newname for datafile 50 to '+QADATA1/UDEV/DATAFILE';
18> set newname for datafile 39 to '+QADATA1/UDEV/DATAFILE';
19> set newname for datafile 38 to '+QADATA1/UDEV/DATAFILE';
20> set newname for datafile 7 to '+QADATA1/UDEV/DATAFILE';
21> set newname for datafile 9 to '+QADATA1/UDEV/DATAFILE';
22> set newname for datafile 8 to '+QADATA1/UDEV/DATAFILE';
23> set newname for datafile 11 to '+QADATA1/UDEV/DATAFILE';
24> set newname for datafile 10 to '+QADATA1/UDEV/DATAFILE';
25> set newname for datafile 66 to '+QADATA1/UDEV/DATAFILE';
26> set newname for datafile 48 to '+QADATA1/UDEV/DATAFILE';
27> set newname for datafile 47 to '+QADATA1/UDEV/DATAFILE';
28> set newname for datafile 12 to '+QADATA1/UDEV/DATAFILE';
29> set newname for datafile 13 to '+QADATA1/UDEV/DATAFILE';
30> set newname for datafile 14 to '+QADATA1/UDEV/DATAFILE';
31> set newname for datafile 15 to '+QADATA1/UDEV/DATAFILE';
32> set newname for datafile 16 to '+QADATA1/UDEV/DATAFILE';
33> set newname for datafile 18 to '+QADATA1/UDEV/DATAFILE';
34> set newname for datafile 17 to '+QADATA1/UDEV/DATAFILE';
35> set newname for datafile 19 to '+QADATA1/UDEV/DATAFILE';
36> set newname for datafile 69 to '+QADATA1/UDEV/DATAFILE';
37> set newname for datafile 60 to '+QADATA1/UDEV/DATAFILE';
38> set newname for datafile 59 to '+QADATA1/UDEV/DATAFILE';
39> set newname for datafile 55 to '+QADATA1/UDEV/DATAFILE';
40> set newname for datafile 53 to '+QADATA1/UDEV/DATAFILE';
41> set newname for datafile 44 to '+QADATA1/UDEV/DATAFILE';
set newname for datafile 22 to '+QADATA2/UDEV/DATAFILE';
42> 43> set newname for datafile 21 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 20 to '+QADATA2/UDEV/DATAFILE';
44> 45> set newname for datafile 72 to '+QADATA2/UDEV/DATAFILE';
46> set newname for datafile 70 to '+QADATA2/UDEV/DATAFILE';
47> set newname for datafile 65 to '+QADATA2/UDEV/DATAFILE';
48> set newname for datafile 64 to '+QADATA2/UDEV/DATAFILE';
49> set newname for datafile 57 to '+QADATA2/UDEV/DATAFILE';
50> set newname for datafile 56 to '+QADATA2/UDEV/DATAFILE';
51> set newname for datafile 49 to '+QADATA2/UDEV/DATAFILE';
52> set newname for datafile 45 to '+QADATA2/UDEV/DATAFILE';
53> set newname for datafile 26 to '+QADATA2/UDEV/DATAFILE';
54> set newname for datafile 25 to '+QADATA2/UDEV/DATAFILE';
55> set newname for datafile 24 to '+QADATA2/UDEV/DATAFILE';
56> set newname for datafile 23 to '+QADATA2/UDEV/DATAFILE';
57> set newname for datafile 27 to '+QADATA2/UDEV/DATAFILE';
58> set newname for datafile 28 to '+QADATA2/UDEV/DATAFILE';
59> set newname for datafile 29 to '+QADATA2/UDEV/DATAFILE';
60> set newname for datafile 30 to '+QADATA2/UDEV/DATAFILE';
61> set newname for datafile 73 to '+QADATA2/UDEV/DATAFILE';
62> set newname for datafile 32 to '+QADATA2/UDEV/DATAFILE';
63> set newname for datafile 31 to '+QADATA2/UDEV/DATAFILE';
64> set newname for datafile 34 to '+QADATA2/UDEV/DATAFILE';
65> set newname for datafile 33 to '+QADATA2/UDEV/DATAFILE';
66> set newname for datafile 35 to '+QADATA2/UDEV/DATAFILE';
67> set newname for datafile 36 to '+QADATA2/UDEV/DATAFILE';
68> set newname for datafile 37 to '+QADATA2/UDEV/DATAFILE';
69> set newname for datafile 51 to '+QADATA2/UDEV/DATAFILE';
70> set newname for datafile 43 to '+QADATA2/UDEV/DATAFILE';
71> set newname for datafile 40 to '+QADATA2/UDEV/DATAFILE';
72> set newname for datafile 41 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 71 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 58 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 52 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 46 to '+QADATA2/UDEV/DATAFILE';
set newname for datafile 42 to '+QADATA2/UDEV/DATAFILE';
73> 74> 75> 76> 77> 78> set newname for datafile 62 to '+QADATA2/UDEV/DATAFILE';
79> set newname for datafile 61 to '+QADATA2/UDEV/DATAFILE';
80> set newname for datafile 74 to '+QADATA2/UDEV/DATAFILE';
81> restore database;
82> switch datafile all;
83> recover database;
84> alter database open resetlogs;
85>
86> release channel c1;
87> release channel c2;
88> release channel c3;
89> release channel c4;
90> }
Getting the following error, copied lines from the error i am getting.
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 27-DEC-10
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/27/2010 08:09:08
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 74
RMAN-06100: no channel to restore a backup or copy of datafile 73
Please advice...
Thanks,
Tanveer MohammedIf you would like, please refer the link:-
http://gavinsoorma.com/2010/04/creating-an-asm-duplicate-database-from-a-non-asm-database/ -
Rman restore in new server?
My linux machine hardisk has crashed, i am rebuilt entire thing from begining, we have the rman backup & controlfiles & init.ora, pwd file in the tape.
How to rebuild the database from the new catalog. appreciate any body provide a rman step to restore & rebuild...
Adv thanks>>
Whether i need to create catalog first?. Steps pls
>>
Tell us onething, were was the catalog kept? Was it in the same database? or any other database? or you were using controlfile instead catalog to backup your database?
Lets, catalog is maintained in another database or nocatalog (controlfile) is used to backup.
set oracle_sid
startup nomount
rman target /
run {
allocate channel t1 type 'sbt_tape';
restore controlfile to '<destination>';
sql "alter database mount";
restore database;
recover database;
sql "alter database open resetlogs";
}Jaffar -
I have a complete backup of the source server and I would like to restore it to target server.
Problem is that on my source server I have the complete backup on "E" Drive.
On My target server I just have C and D Drives.
When I try to run Restore database command I get
RMAN-06023: no backup or copy of datafile 1 found to restore
for all the data files as it is looking for my backups on "E" drive which does not exist on Target Server.
Is there a way I can guide RMAN to look on D: drive when restoring?
Thanks
Edited by: user12180649 on May 16, 2012 8:07 AMuser12180649 wrote:
I have a complete backup of the source server and I would like to restore it to target server.
Problem is that on my source server I have the complete backup on "E" Drive.
On My target server I just have C and D Drives.
When I try to run Restore database command I get
RMAN-06023: no backup or copy of datafile 1 found to restore
for all the data files as it is looking for my backups on "E" drive which does not exist on Target Server.
Is there a way I can guide RMAN to look on D: drive when restoring?
Thanks
Edited by: user12180649 on May 16, 2012 8:07 AMOnce you have your controlfile, you can connect to RMAN, delete all the backup piece, and add the new with the new position.
The syntax is:
delete backup; -- to delete all the backups information
catalog start with 'PATH'; -- to add all the backup piece to the "catalog" that in this case could is in the controlfiles.
Other syntax:
http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta011.htm
Hope this helps.
Nunzio -
RMAN Restore Database vs Duplicate Database
Currently we have Dev Database which runs on its own Server and registered in Dev Catalog Database for RMAN backups. We also have production Database which runs on own server and register to Prod Catalog Database for RMAN backups.(Both databases 10g running on AIX servers)
We are in process of developing new process which allows us to refresh Dev Database from Production couple times per week.
Here are my questions. Since Production Database is utilizing RMAN for backups I want to use RMAN Duplicate to new host or restore to new host
1. Would duplicate command auto register newly re created Dev Database in Prod Catalog ? I really do not want to.
2. Would Duplicate will generate new DBID for re created Dev Database? I do not want to ..
3. Since Dev Database registered in its own RMAN Catalog. We would want to continue to run regular backups every night. Do we need to do anything special or just run regular backup script?
4. Also should we look at regular RMAN recovery/restore option to new host instead of RMAN Duplicate for what we need to accomplish?
Any input would be really appreciated.If you need "up-to-date" data in your dev environment, you have no choice but to duplicate your prod database.
Restoring would only apply if you wanted the same data as was in your dev database as of a certain point in time.
RMAN is pretty straight forward and if that works for you, I would continue with that method.
If you also do hot/cold backups (O/S copies), then the question of speed comes into play (is it faster to copy the O/S files to your dev servers and apply the needed archivelogs or is RMAN faster). We have scenarios when RMAN is twice as fast as O/S copies and others when O/S copies are better. Testing should tell you which would be best in your case.
I hope that answers your question. -
Restore Database with Oracle 9i with a New Host using RMAN
Gurus,
I am trying to restore a database from some RMAN created files on a new host with a new directory structure for some testing. I do not have access to the source database.
The database is Oracle 9i.
The files that have been created are the following:
'C-2995630462-20110214-00' is the control file and SP file backup.
'B_ABM4KAJ5_1_1' is the database backup.
B_ACM4KARS_1_1 and B_AAM4KAIV_1_1 are archived redo logs
Here is the RMAN listing from when the files were created:
BS Key Size Device Type Elapsed Time Completion Time
329 56M DISK 00:00:02 14/FEB/11
BP Key: 329 Status: AVAILABLE Tag: TAG20110214T050015
Piece Name: D:\BACKUPS\CRYSTAL\B_AAM4KAIV_1_1
List of Archived Logs in backup set 329
Thrd Seq Low SCN Low Time Next SCN Next Time
1 184 4602414767 13/FEB/11 4602533494 14/FEB/11
BS Key Type LV Size Device Type Elapsed Time Completion Time
330 Full 13G DISK 00:04:33 14/FEB/11
BP Key: 330 Status: AVAILABLE Tag: TAG20110214T050021
Piece Name: D:\BACKUPS\CRYSTAL\B_ABM4KAJ5_1_1
List of Datafiles in backup set 330
File LV Type Ckp SCN Ckp Time Name
1 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\SYSTEM01.DBF
2 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\UNDOTBS01.DBF
3 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\USERS01.DBF
BS Key Size Device Type Elapsed Time Completion Time
331 37K DISK 00:00:01 14/FEB/11
BP Key: 331 Status: AVAILABLE Tag: TAG20110214T050500
Piece Name: D:\BACKUPS\CRYSTAL\B_ACM4KARS_1_1
List of Archived Logs in backup set 331
Thrd Seq Low SCN Low Time Next SCN Next Time
1 185 4602533494 14/FEB/11 4602533686 14/FEB/11
BS Key Type LV Size Device Type Elapsed Time Completion Time
332 Full 3M DISK 00:00:01 14/FEB/11
BP Key: 332 Status: AVAILABLE Tag:
Piece Name: D:\BACKUPS\CRYSTAL\C-2995630462-20110214-00
SPFILE Included: Modification time: 23/NOV/10
I am new to using RMAN and I'm hoping someone could point me in a direction of some documentation to assist with the scenario described above. I've looked at several Oracle documents but have been unable to find a way to separate out the spfile from the control file.
Any help you can provide would be greatly appreciated.
Thanks.Thanks Meeran.
I have attempted to follow the directions from the RMAN document that you posted and have run into the following error:
C:\>rman target / nocatalog
Recovery Manager: Release 9.2.0.6.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: DUMMY (not mounted)
using target database controlfile instead of recovery catalog
RMAN> startup force nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\ORACLE\ORA92\DATABASE\INITCRYSTAL.O
RA'
trying to start the Oracle instance without parameter files ...
Oracle instance started
Total System Global Area 97591104 bytes
Fixed Size 454464 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
RMAN> RESTORE SPFILE TO 'C:\oracle\admin\crystal\pfile\init.ora' from 'C:\oracle
\ora92\CRYSTALbk\C-2995630462-20110214-00';
Starting restore at 30-MAR-11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/30/2011 11:30:07
ORA-00600: internal error code, arguments: [1866], [0x41AA450], [6144], [0x41BAD
B4], [], [], [], []
RMAN>
Am I not correctly connected to the target?
It looks like it correctly tried to create a dummy spfile, but when attempting the restore from the file it breaks.
Any suggestions? Thanks. -
Using RMAN restore the database on a new host in ASM
Hello All,
I am trying to restore a database without using RMAN database duplicate. I want to do set new name for datafile and rename log file for online logs and change database name at last using NID.
here are details
source database - APSPROD / server - X
target database - EMERALD / Server -Y
Compressed backup is copied to destination server and I am trying to restore database using RMAN. Here is my init.ora file
cat initAPSPROD1.ora
DB_NAME=APSPROD
compatible=11.2.0.3
sga_target=8G
CONTROL_FILES='+DATA_DM01/EMERALD/controlfile/cntrl01.dbf','+RECO_DM01/EMERALD/controlfile/cntrl02.dbf','+DATA_DM01/EMERALD/controlfile/cntrl03.dbf'
DB_BLOCK_SIZE=8192
db_file_name_convert=(+DATA_DM01/APSPROD,+DATA_DM01/EMERALD)
log_file_name_convert=(+DATA_DM01/APSPROD,+DATA_DM01/EMERALD,+RECO_DM01/APSPROD,+RECO_DM01/EMERALD)
DB_RECOVERY_FILE_DEST='+RECO_DM01'
DB_RECOVERY_FILE_DEST_SIZE=5500G
So from above you can see that control file should be restored to +DATA_DM01/EMERALD and +RECO_DM01/EMERALD path.
Question -
when I am trying to restore control file. It creates an ASM alias name in +DATA_DM01/EMERALD/controlfile/cntrl01.dbf',+RECO_DM01/EMERALD/controlfile/cntrl02.dbf',' and +DATA_DM01/EMERALD/controlfile/cntrl03.dbf' but It creates fully Qualified ASM Filename under +DATA_DM01/APSPROD and +RECO_DM01/
Here is output
RMAN> restore controlfile from '/dbfs_direct/FS1/RMAN_APSPROD/cf_APSPROD_i4p4b62m_1_1
2> ;
Starting restore at 02-APR-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=+DATA_DM01/emerald/controlfile/cntrl01.dbf
output file name=+RECO_DM01/emerald/controlfile/cntrl02.dbf
output file name=+DATA_DM01/emerald/controlfile/cntrl03.dbf
Finished restore at 02-APR-14
output at ASM level
SMCMD [+RECO_DM01/EMERALD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
N cntrl02.dbf => +RECO_DM01/APSPROD/CONTROLFILE/current.17006.843826701
ASMCMD [+RECO_DM01/EMERALD/CONTROLFILE] > cd +RECO_DM01/APSPROD/CONTROLFILE/
ASMCMD [+RECO_DM01/APSPROD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE APR 02 12:00:00 Y current.17006.843826701
ASMCMD [+RECO_DM01/APSPROD/CONTROLFILE] > cd +DATA_DM01
ASMCMD [+DATA_DM01] > cd EMERALD/CONTROLFILE
ASMCMD [+DATA_DM01/EMERALD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
N cntrl01.dbf => +DATA_DM01/APSPROD/CONTROLFILE/current.3678.843826699
N cntrl03.dbf => +DATA_DM01/APSPROD/CONTROLFILE/current.3679.843826701
ASMCMD [+DATA_DM01/EMERALD/CONTROLFILE] > cd +DATA_DM01/APSPROD/CONTROLFILE
ASMCMD [+DATA_DM01/APSPROD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE APR 02 12:00:00 Y current.3678.843826699
CONTROLFILE HIGH FINE APR 02 12:00:00 Y current.3679.843826701
How can I ensure that every thing gets created in +DATA_DM01/EMERALD/ or [+RECO_DM01/EMERALD?? similary for datafile restore even I have used set new file name ASM fully quilified OMF datafile gets created under +DATA_DM01/APSPROD/
ASMCMD [+DATA_DM01/EMERALD/DATAFILE]
N undots5_01.dbf => +DATA_DM01/APSPROD/DATAFILE/APPS_UNDOTS5.3669.843818269
Thanks
PVEven If I explicitly say
rman target / nocatalog
RMAN> restore controlfile to '+DATA_DM01/emerald/controlfile/cntrl01.dbf' from '/dbfs_direct/FS1/RMAN_APSPROD/cf_APSPROD_i4p4b62m_1_1';
Starting restore at 02-APR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=64 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 02-APR-14
It create as alias name +DATA_DM01/emerald/controlfile/cntrl01.dbf' pointing to +DATA_DM01/APSPROD/CONTROLFILE/
ASMCMD [+DATA_DM01/EMERALD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
N cntrl01.dbf => +DATA_DM01/APSPROD/CONTROLFILE/current.3679.843828927
ASMCMD [+DATA_DM01/EMERALD/CONTROLFILE] > cd +DATA_DM01/APSPROD
ASMCMD [+DATA_DM01/APSPROD] > cd CONTROLFILE
ASMCMD [+DATA_DM01/APSPROD/CONTROLFILE] > ls -l
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE APR 02 12:00:00 Y current.3679.843828927
ASMCMD [+DATA_DM01/APSPROD/CONTROLFILE] > -
9i Database - Restore to a new host, validating RMAN backup
Hi all,
I could use your help, for any of you who remember how to do this in 9i. On one of my production databases, running 9.2.0.6.0, I have a nightly RMAN script that writes the backup to a large shared drive (this is on a Windows 2003 server). This backup uses a recovery catalog.
I have a test server, and I want to try and restore last night's backup on this test server, without touching the recovery catalog - purely as a means to go through the recovery process, and to validate our backups (this is also for SOX compliance, as this database is for the financial system).
I have been looking through the 9i documentation, and was hoping to have some detailed steps here: http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmrecov.htm#1007514
but I don't see a lot of information there.
I believe that this should be a rather simple process. On the test server, I have installed the 9.2.0.6 software, and created the Oracle Service using the same name as production. The test server can also see the shared drive that houses the backup files from the production system.
Here are the steps I am trying, please let me know what I need to change. Thanks all!!
rman target / nocatalog
RMAN> set DBID 3679803977
RMAN> startup nomount
RMAN> restore controlfile from autobackup; --- this throws errors, see below
Starting restore at 11-NOV-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20081111
channel ORA_DISK_1: looking for autobackup on day: 20081110
channel ORA_DISK_1: looking for autobackup on day: 20081109
channel ORA_DISK_1: looking for autobackup on day: 20081108
channel ORA_DISK_1: looking for autobackup on day: 20081107
channel ORA_DISK_1: looking for autobackup on day: 20081106
channel ORA_DISK_1: looking for autobackup on day: 20081105
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/11/2008 16:43:18
RMAN-06172: no autobackup found or specified handle is not a valid copy or pieceMany thanks for the helpful replies so far, Hemant!! I had to shelve this issue for a few days, back at it today.
I have made some progress, I am able to restore the control file now - what I am doing, is copying the autobackup controlfile from the network drive over onto the server locally (E:\oracle\ora92\database\BACKUPCONTROL.ORA), then I am able to restore the controlfile with this:
restore controlfile from 'E:\oracle\ora92\database\BACKUPCONTROL.ORA';
And I can see that it restores all 3 of my controlfiles.
The next step would be to do the database restore. When I issue the "restore database;" command, I can see that it lists out all of the datafiles that it needs to restore from the backup set, but then after about a minute, I see these error messages pop up:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/19/2008 10:55:54
ORA-19587: error occurred reading 0 bytes at block number 1
ORA-27091: skgfqio: unable to queue I/O
ORA-27067: skgfdisp: size of buffer is invalid
OSD-04026: Invalid parameter passed.
When I looked up those last 2 error codes on Metalink, I see document ID 213858.1 that looks like this normally happens when the backup piece that has Read-Only permissions. I have confirmed that the backup files on the network drive are not Read-Only, I have full Read/Write privileges on them. So once again, I am stumped.
Any thoughts? I might go ahead and log an SR for this, to try and get it resolved.
Thanks! -
[HELP] Problem with restore and recovery to new host
Hi, guys!
I have been trying for two days, but still cannot get it to work.
I have taken a full hot(online) backup with archive logs as well as the control file and SPFILE, and then copied the backup to the new host with the same directory structure and settings. Finally, I have tried to restore & recover the database on the new host but failed during the restore process.
Both the original host and the new host have the same Oracle installed down to the patch level. I couldn't figure out the proper solution to this problem base on my limited knowledge about Oracle DB.
Could anyone help me out here? Any advice would be appreciated!
RMAN> restore database until sequence 10 thread 1;
Starting restore at 08-NOV-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\DBDATA\PRODDB\SYSTEM01.DBF
restoring datafile 00002 to D:\DBDATA\PRODDB\UNDOTBS01.DBF
restoring datafile 00003 to D:\DBDATA\PRODDB\SYSAUX01.DBF
restoring datafile 00004 to D:\DBDATA\PRODDB\USERS01.DBF
restoring datafile 00005 to D:\ORA_DATADATA01.DBF
restoring datafile 00006 to D:\ORA_DATA\DATA02.DBF
restoring datafile 00007 to D:\ORA_DATA\INDX01.DBF
restoring datafile 00008 to D:\ORA_DATA\INDX02.DBF
channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\PRODDB\BACKUPSET\2011_11_07\O1_MF_NNNDF_TAG20111107T175037_7CH6YYVJ_.BK
P
failover to previous backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/08/2011 11:41:33
RMAN-06026: some targets not found - aborting 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 is some extra information that you might want to know about:
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 PRODDB 3774691295 PARENT 1 17-APR-07
2 2 PRODDB 3774691295 PARENT 521803 06-OCT-11
3 3 PRODDB 3774691295 PARENT 1595143 20-OCT-11
4 4 PRODDB 3774691295 PARENT 1600974 20-OCT-11
5 5 PRODDB 3774691295 PARENT 1952053 27-OCT-11
6 6 PRODDB 3774691295 CURRENT 2146951 07-NOV-11
RMAN> list backup recoverable;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
37 Full 822.34M DISK 00:29:47 07-NOV-11
BP Key: 37 Status: AVAILABLE Compressed: NO Tag: TAG20111107T175037
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\BACKUPSET\
2011_11_07\O1_MF_NNNDF_TAG20111107T175037_7CH6YYVJ_.BKP
List of Datafiles in backup set 37
File LV Type Ckp SCN Ckp Time Name
1 Full 2149673 07-NOV-11 D:\DBDATA\PRODDB\SYSTEM01.DBF
2 Full 2149673 07-NOV-11 D:\DBDATA\PRODDB\UNDOTBS01.DBF
3 Full 2149673 07-NOV-11 D:\DBDATA\PRODDB\SYSAUX01.DBF
4 Full 2149673 07-NOV-11 D:\DBDATA\PRODDB\USERS01.DBF
5 Full 2149673 07-NOV-11 D:\ORA_DATA\DATA01.DBF
6 Full 2149673 07-NOV-11 D:\ORA_DATA\DATA02.DBF
7 Full 2149673 07-NOV-11 D:\ORA_DATA\INDX01.DBF
8 Full 2149673 07-NOV-11 D:\ORA_DATA\INDX02.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
38 Full 6.95M DISK 00:00:03 07-NOV-11
BP Key: 38 Status: AVAILABLE Compressed: NO Tag: TAG20111107T182034
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\AUTOBACKUP
\2011_11_07\O1_MF_S_766606834_7CH8Q439_.BKP
Control File Included: Ckp SCN: 2151141 Ckp time: 07-NOV-11
SPFILE Included: Modification time: 07-NOV-11
BS Key Size Device Type Elapsed Time Completion Time
39 18.46M DISK 00:00:05 08-NOV-11
BP Key: 39 Status: AVAILABLE Compressed: NO Tag: TAG20111108T093359
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\BACKUPSET\
2011_11_08\O1_MF_ANNNN_TAG20111108T093359_7CJY7TG1_.BKP
List of Archived Logs in backup set 39
Thrd Seq Low SCN Low Time Next SCN Next Time
1 1 2146951 07-NOV-11 2149493 07-NOV-11
1 2 2149493 07-NOV-11 2149519 07-NOV-11
1 3 2149519 07-NOV-11 2149565 07-NOV-11
1 4 2149565 07-NOV-11 2149641 07-NOV-11
1 5 2149641 07-NOV-11 2172859 07-NOV-11
1 6 2172859 07-NOV-11 2197851 07-NOV-11
1 7 2197851 07-NOV-11 2220349 08-NOV-11
1 8 2220349 08-NOV-11 2222621 08-NOV-11
1 9 2222621 08-NOV-11 2222729 08-NOV-11
1 10 2222729 08-NOV-11 2223088 08-NOV-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
40 Full 6.95M DISK 00:00:00 08-NOV-11
BP Key: 40 Status: AVAILABLE Compressed: NO Tag: TAG20111108T093411
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\AUTOBACKUP
\2011_11_08\O1_MF_S_766661651_7CJY84LK_.BKP
Control File Included: Ckp SCN: 2223097 Ckp time: 08-NOV-11
SPFILE Included: Modification time: 08-NOV-11
Thanks in advance!
JayThank you for your reply,Hemant K Chitale!
>
a) Does the directory structur exist on the new server :
D:\DBDATA\PRODDB\ --- for files 1 to 4
D:\ --- for file 5
D:\ORA_DATA\ --- for files 6 to 8
>
Yep, I have doubled check the directory structure that get in the way, and they are all exist.
Would it be something to do with the folder permissions?
>
b) Apparently a RESETLOGS has been issued on 07-Nov. Which controflile backup do you have restored and mounted on the new server ? It should be the one after the RESETLOGS.
>
I restored the one included with the backup. Should I take another backup of controlfile seperately and restore from it instead?
>
(I assume that you did a RESTORE CONTROLFILE followed by sql "alter database mount" before the attempt to RESTORE DATABASE)
>
Yep, that's exactly what I did.
//executed @ RMAN prompt of the new host
startup nomount; 'the new host has the right SPFILE to start with so i didn''t bother to RESTORE SPFILE first.
restore controlfile from autobackup;
alter database mount;
restore database sequence 10 thread 1;
//get stucked here with RMAN-06026, 06023
//...the following is not executed yet.... :-(
recover database until sequence 10;
alter database open resetlogs;Edited by: HappyJay on 2011/11/08 13:25
I have made several attemps with your advice, but still get the same type of errors.
Here is the output:
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
38 Full 6.95M DISK 00:00:03 07-NOV-11
BP Key: 38 Status: AVAILABLE Compressed: NO Tag: TAG20111107T182034
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\AUTOBACKUP
\2011_11_07\O1_MF_S_766606834_7CH8Q439_.BKP
Control File Included: Ckp SCN: 2151141 Ckp time: 07-NOV-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
40 Full 6.95M DISK 00:00:00 08-NOV-11
BP Key: 40 Status: AVAILABLE Compressed: NO Tag: TAG20111108T093411
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\AUTOBACKUP
+\2011_11_08\O1_MF_S_766661651_7CJY84LK_.BKP+
Control File Included: Ckp SCN: 2223097 Ckp time: 08-NOV-11
as you suggested, this backup piece of controlfile should be right one to be restored.
RMAN> shutdown;
database dismounted
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 490733568 bytes
Fixed Size 1291360 bytes
Variable Size 364907424 bytes
Database Buffers 121634816 bytes
Redo Buffers 2899968 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 08-NOV-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
recovery area destination: C:\oracle\product\10.2.0\flash_recovery_area
database name (or database unique name) used for search: PRODDB
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AR
EA\PRODDB\AUTOBACKUP\2011_11_08\O1_MF_S_766661651_7CJY84LK_.BKP
channel ORA_DISK_1: control file restore from autobackup complete
output filename=D:\DBDATA\PRODDB\CONTROL01.CTL
output filename=D:\DBDATA\PRODDB\CONTROL02.CTL
output filename=D:\DBDATA\PRODDB\CONTROL03.CTL
Finished restore at 08-NOV-11
tried shutdown normally and mount again instead.
RMAN> shutdown;
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
C:\>rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Nov 8 13:49:42 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup mount;
Oracle instance started
database mounted
Total System Global Area 490733568 bytes
Fixed Size 1291360 bytes
Variable Size 369101728 bytes
Database Buffers 117440512 bytes
Redo Buffers 2899968 bytes
RMAN> restore database until sequence 10 thread 1;
Starting restore at 08-NOV-11
Starting implicit crosscheck backup at 08-NOV-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 08-NOV-11
Starting implicit crosscheck copy at 08-NOV-11
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 08-NOV-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRODDB\AUTOBACKUP\2011_11_
08\O1_MF_S_766661651_7CJY84LK_.BKP
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\DBDATA\PRODDB\SYSTEM01.DBF
restoring datafile 00002 to D:\DBDATA\PRODDB\UNDOTBS01.DBF
restoring datafile 00003 to D:\DBDATA\PRODDB\SYSAUX01.DBF
restoring datafile 00004 to D:\DBDATA\PRODDB\USERS01.DBF
restoring datafile 00005 to D:\ORA_DATA\DATA01.DBF
restoring datafile 00006 to D:\ORA_DATA\DATA02.DBF
restoring datafile 00007 to D:\ORA_DATA\INDX01.DBF
restoring datafile 00008 to D:\ORA_DATA\INDX02.DBF
channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\PRODDB\BACKUPSET\2011_11_07\O1_MF_NNNDF_TAG20111107T175037_7CH6YYVJ_.BK
P
failover to previous backup
//however, still get the same results(ended up with errors)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/08/2011 13:50:29
RMAN-06026: some targets not found - aborting 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
Edited by: HappyJay on 2011/11/08 13:59 -
Help is needed in restoring DB to new host
Hello ,
I posted new thread two days ago , but yet, haven't succedded in restore my DB from host A to host b .
I need to do a test case , backup database at 11:00 , make some changes , (create / drop tables , whatever ) , take incremental level 1 at 11:15 , make more changes , plus another incremental level 1 backup at 11:30 .
At the end of that , I should try to to restore the Database called DB1 , into host b , for the changes made before the backup of 11:15 (that is , set until time ... 11:15) .
the problem is that I sit on that thing for about a week ,
and each time get another error at the end of the process when trying to run :
"recover database / recover database noredo" .
Here is what I do in host a :
[b]% setenv ORACLE_SID DB1
% sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jan 25 10:29:46 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> select to_char (sysdate,'dd-mm-yyyy hh24:mi') From dual ;
TO_CHAR(SYSDATE,
25-01-2007 10:34
exit;
% rman target / catalog rman/rman@RCVCAT
Recovery Manager: Release 10.2.0.2.0 - Production on Thu Jan 25 10:32:33 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DB1 (DBID=1206648960)
connected to recovery catalog database
RMAN> register database ;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> configure controlfile autobackup on ;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> backup database ;
Starting backup at 25-JAN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=198 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00002 name=/u03/oradata/DB1/dbf/t_undo_01_DB1.ora
input datafile fno=00001 name=/u03/oradata/DB1/dbf/t_system_01_DB1.ora
input datafile fno=00003 name=/u03/oradata/DB1/dbf/t_sysaux_01_DB1.ora
input datafile fno=00005 name=/u02/oradata/DB1/dbf/t_common_data_01_DB1.ora
input datafile fno=00006 name=/u02/oradata/DB1/dbf/t_common_ix_01_DB1.ora
input datafile fno=00004 name=/u03/oradata/DB1/dbf/t_users_01_DB1.ora
input datafile fno=00007 name=/u02/oradata/DB1/dbf/t_cipher_data_01_DB1.ora
input datafile fno=00008 name=/u02/oradata/DB1/dbf/t_cipher_ix_01_DB1.ora
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_nnndf_TAG20070125T103356_2vjtvnsz_.bkp tag=TAG20070125T103356 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612786863_2vjtwhsb_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
RMAN> backup archivelog all ;
Starting backup at 25-JAN-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=11 recid=1 stamp=612786900
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_annnn_TAG20070125T103501_2vjtxq1g_.bkp tag=TAG20070125T103501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612786907_2vjtxvrj_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
BACK TO SQLPLUS
> SQL> select to_char (sysdate,'dd-mm-yyyy hh24:mi') From dual ;
TO_CHAR(SYSDATE,
25-01-2007 10:39
SQL> create user newuser identified by nweuser ;
User created.
SQL> grant connect , resource , create table to newuser ;
Grant succeeded.
SQL> create table newuser.tab (col number) ;
Table created.
BACK TO RMAN
RMAN> backup archivelog all ;
Starting backup at 25-JAN-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=11 recid=1 stamp=612786900
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_annnn_TAG20070125T103501_2vjtxq1g_.bkp tag=TAG20070125T103501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612786907_2vjtxvrj_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
RMAN> backup incremental level 1 all database ;
Starting backup at 25-JAN-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00002 name=/u03/oradata/DB1/dbf/t_undo_01_DB1.ora
input datafile fno=00001 name=/u03/oradata/DB1/dbf/t_system_01_DB1.ora
input datafile fno=00003 name=/u03/oradata/DB1/dbf/t_sysaux_01_DB1.ora
input datafile fno=00005 name=/u02/oradata/DB1/dbf/t_common_data_01_DB1.ora
input datafile fno=00006 name=/u02/oradata/DB1/dbf/t_common_ix_01_DB1.ora
input datafile fno=00004 name=/u03/oradata/DB1/dbf/t_users_01_DB1.ora
input datafile fno=00007 name=/u02/oradata/DB1/dbf/t_cipher_data_01_DB1.ora
input datafile fno=00008 name=/u02/oradata/DB1/dbf/t_cipher_ix_01_DB1.ora
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T104227_2vjvcnpg_.bkp tag=TAG20070125T104227 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:46
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612787395_2vjvf3rp_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
RMAN> backup archivelog all ;
Starting backup at 25-JAN-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=11 recid=1 stamp=612786900
input archive log thread=1 sequence=12 recid=2 stamp=612787440
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_annnn_TAG20070125T104401_2vjvglw5_.bkp tag=TAG20070125T104401 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612787447_2vjvgqog_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
BACK TO SQLPLUS
SQL> select to_char (sysdate,'dd-mm-yyyy hh24:mi') From dual ;
TO_CHAR(SYSDATE,
25-01-2007 10:45
SQL> create user userb identified by userb ;
User created.
SQL> grant create table , connect , resource to userb ;
Grant succeeded.
SQL> create table userb.userb_tab (col number) ;
Table created.
BACK TO RMAN
RMAN> backup incremental level 1 database ;
Starting backup at 25-JAN-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00002 name=/u03/oradata/DB1/dbf/t_undo_01_DB1.ora
input datafile fno=00001 name=/u03/oradata/DB1/dbf/t_system_01_DB1.ora
input datafile fno=00003 name=/u03/oradata/DB1/dbf/t_sysaux_01_DB1.ora
input datafile fno=00005 name=/u02/oradata/DB1/dbf/t_common_data_01_DB1.ora
input datafile fno=00006 name=/u02/oradata/DB1/dbf/t_common_ix_01_DB1.ora
input datafile fno=00004 name=/u03/oradata/DB1/dbf/t_users_01_DB1.ora
input datafile fno=00007 name=/u02/oradata/DB1/dbf/t_cipher_data_01_DB1.ora
input datafile fno=00008 name=/u02/oradata/DB1/dbf/t_cipher_ix_01_DB1.ora
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T104750_2vjvoqb0_.bkp tag=TAG20070125T104750 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612787707_2vjvpw09_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
RMAN> backup archivelog all ;
Starting backup at 25-JAN-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=11 recid=1 stamp=612786900
input archive log thread=1 sequence=12 recid=2 stamp=612787440
input archive log thread=1 sequence=13 recid=3 stamp=612787722
channel ORA_DISK_1: starting piece 1 at 25-JAN-07
channel ORA_DISK_1: finished piece 1 at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/backupset/2007_01_25/o1_mf_annnn_TAG20070125T104843_2vjvqdpf_.bkp tag=TAG20070125T104843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 25-JAN-07
Starting Control File Autobackup at 25-JAN-07
piece handle=/u01/oradata/DB1/rman_admin/DB1/autobackup/2007_01_25/o1_mf_n_612787727_2vjvqhk7_.bkp comment=NONE
Finished Control File Autobackup at 25-JAN-07
exit host a
Now I create same directories I have in host a , also in host b ,
I have my init.ora file from host a and put it in host b ,
and have all backups taken in host a , available in host b (got them through ftp) .
here comes my question , I look at the pdf books of oracle and do somthing like that in host b :
setenv ORACLE_SID DB1
% sqlplus "/ as sysdba"
SQL> startup nomount pfile=initDB1.ora
SQL> exit
% rman target / nocatalog
RMAN > set dbid 1206648960 ;
RMAN > restore controlfile from autobackup until time "to_date ('25-01-2007 10:35','dd-mm-yyyy hh24:mi')";
## to get back in time to the changes made before userb was created !
RMAN > alter database mount ;
RMAN > restore database ;
RMAN > recover database noredo ;
RMAN > alter database open resetlogs ;
I don't run the whole process in host b , cause the restore is written somewhere , and I don't know where , and in the next time I try to run the restore operation , I get another kind of error message , and have to start the whole thing from the begining .
what's wrong in my process ? it's either I got errors about my files that are older than the last time of the resetlogs , or the DB is recovered to its most current state , after the creation of userb .
please advice . what should I change in my process ? it has been 3 days that I fail to recover my DB , and all I do is taken from oracle tecnet or metalink site .
Thanks in advanced ,
Lior .I think I found what was wrong .
when I use restore controlfile until time , it means that if I wrote 13:00 the recover should be at least to 13:01 (for example) .
meanwhile it works , I'm going to do some more tests to be sure .
Maybe you are looking for
-
Trying to connect Canon MD101 camera to MacBook Pro
I am trying to connect my Canon MD101 video camera to my MacBook Pro so I can get the videos off it. I have connected the camera and laptop using a 9-Pin to 4-Pin firewire cable: http://www.amazon.co.uk/dp/B001IUM20C/ref=pe_385721_37038051_pe_217191_
-
Can't open files saved from Safari
In SL, I have a new problem with files that are saved from Safari. I first noticed it with an Automator service I made, which took selected text and made a text file out of it. But I eventually discovered the problem seemed to be with Safari. Any tim
-
Hello, hope someone can help. I recently made the mistake of adding a new website in iWeb '09 and was going to administer 2 sites using Godaddy as my host and publishing using ftp. Unfortunately I deleted the first site I had on there in iWeb and can
-
Stored Procedure takes forever
Hi! I'm pretty new to stored procedures, but I was told it was a smart thing to implement in you application. So I tried. I wrote a simple procedure with two inputs and one output as ref_cursor. I then bind it to a datagrid. Here's the procedure: ( B
-
Hi I have posted price change document and now analyzing which GL accounts are hit. Its bit strange but GL accounts which are hit are not defined in OBYC. I am not able to understand which GL are picked by the system and from where are they picked if