urgent help with RMAN backup [message #136293] |
Wed, 07 September 2005 07:49 |
wirefusion
Messages: 5 Registered: September 2005 Location: us
|
Junior Member |
|
|
i'm DBA, but with little experience,
i'm explaining the whole situation
i had running oracle 9i database on a single hard disk , on windows 2003 server, which faced hard disk crash,
i had taken a backup few days ago on RMAN, along with control file,
now i've installed a new hard disk on my server, and also installed oracle 9i enterprise edition.
now RMAN back and control file i've are on a CD,
now from where do i start,
where to copy the RMAN backup and control file on hard disk
which RMAN command sto restore the database from RMAN backup.
my current oracle 9i database does not has previous control files, redo log files or database structure. it has default structure
regards
wire
|
|
|
Re: urgent help with RMAN backup [message #136299 is a reply to message #136293] |
Wed, 07 September 2005 08:00 |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
1. Where did u store the catalog information of the old database ? Is ur catalog is safe or its also lost ?
2. what kind of backup hav u taken last time ? was it an incremental backup or a full database backup ?
3. What was the name of old database ?
4. What is the name of new database ?
I dnt know the exact solution but as per my knowledge others might need this information to solve ur problem.
regads,
tarun
|
|
|
Re: urgent help with RMAN backup [message #136353 is a reply to message #136299] |
Wed, 07 September 2005 12:45 |
wirefusion
Messages: 5 Registered: September 2005 Location: us
|
Junior Member |
|
|
1. Where did u store the catalog information of the old database ? Is ur catalog is safe or its also lost ?
i did not had any RMAN catalogue.
2. what kind of backup hav u taken last time ? was it an incremental backup or a full database backup ?
RMAN backup of old database were stored in 'd:\backup'
3. What was the name of old database ?
old database name was pion
4. What is the name of new database ?
new database name is pioneer
regards
wire
|
|
|
Re: urgent help with RMAN backup [message #136364 is a reply to message #136353] |
Wed, 07 September 2005 14:27 |
wirefusion
Messages: 5 Registered: September 2005 Location: us
|
Junior Member |
|
|
kindly help, i'm receiving following error after successfulyy restoring control files
RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> restore database from tag 'd:\MRG_BACK_2IGNR8S_1_1';
7> }
allocated channel: t1
channel t1: sid=10 devtype=DISK
allocated channel: t2
channel t2: sid=11 devtype=DISK
allocated channel: t3
channel t3: sid=12 devtype=DISK
allocated channel: t4
channel t4: sid=13 devtype=DISK
Starting restore at 08-SEP-05
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 09/08/2005 00:50:47
RMAN-03002: failure during compilation of command
RMAN-03013: command type: restore
RMAN-03002: failure during compilation of command
RMAN-03013: command type: IRESTORE
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN>
RMAN backupfile is of 998M size, does it contains nothing
pl. advice wire
|
|
|
|
|
|
|
Re: urgent help with RMAN backup [message #137536 is a reply to message #136364] |
Thu, 15 September 2005 08:14 |
jouell
Messages: 2 Registered: September 2005
|
Junior Member |
|
|
Have you already created a new datbase with a new SID?
I think you might be better creating a "shell" of the database (folder structure, and pfile) and then doing something like:
startup mount the db
then in rman:
rman> connect target /;
run {
allocate channel d1 type disk;
restore database;
recover database;
}
then sql "alter database open resetlogs";
in the same rman block
|
|
|
Re: urgent help with RMAN backup [message #137590 is a reply to message #136293] |
Thu, 15 September 2005 11:11 |
alliejane
Messages: 59 Registered: July 2005 Location: Glasgow
|
Member |
|
|
Hi there,
The first thing you need to do is make sure you have an oracle service created, use the oradim utility to do that .. (ask if you need help).
2. Make sure that you have recreated the directory structure as it was on the old server.. you said you already did this.
3. Replace the initdb.ora file (or spfile). The password file will have been created by the oradim utility..
4. Open rman and connect to the target sid that you created using oradim.
CMD> rman target / (if your local on the server)
RMAN > startup
This will fail at the mounted stage because your controlfiles are not there.
Now as long as you have replaced your backup from cd to the C:\ORACLE\ORCLBKUP\ directory you can perform the next steps.
5. RMAN> SET DBID=(your database id..) if you don't know it, look at the backup of your controlfile, it should be part of the backupset name (as well as the timestamp)
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
6. RMAN> ALTER DATABASE MOUNT;
You will now be able to do a list backup because the restored controlfile is accessible.
7. RMAN> RESTORE DATABASE;
8. RMAN> RECOVER DATABASE;
9. RMAN> ALTER DATABASE OPEN RESETLOGS;
Fingers crossed that should be it.
PS In 9i you don't have to allocate channels unless you want to perform actions in parallel, and then it's easier if you just do.. CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
Get back to me if your still having problems.
Good luck.
Allie
|
|
|
Re: urgent help with RMAN backup [message #137681 is a reply to message #136293] |
Fri, 16 September 2005 02:00 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
I had such a test last week, below is the detail processes.
FYI
Enviroment:
Three Machine ip OS Oracle
A:prod db 172.16.100.31 RedHatES3 9.2.0.6
B:backup db 172.16.100.29 RedHatES3 9.2.0.6
--step1.backup database
ensure that Machine A prod db is under archivelog mode
Machin A:
rman nocatalog target /
Recovery Manager: Release 9.2.0.6.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: STD1 (DBID=3008016294)
using target database controlfile instead of recovery catalog
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/opt/oracle/rman/std31_cf_%F';
RMAN> configure channel 1 device type disk format '/opt/oracle/rman/std31_%U';
RMAN> backup database;
Starting backup at 09-SEP-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/opt/oracle/oradata/std1/system01.dbf
input datafile fno=00002 name=/opt/oracle/oradata/std1/undotbs01.dbf
input datafile fno=00005 name=/opt/oracle/oradata/std1/example01.dbf
input datafile fno=00011 name=/opt/oracle/oradata/rcat01.dbf
input datafile fno=00010 name=/opt/oracle/oradata/std1/xdb01.dbf
input datafile fno=00006 name=/opt/oracle/oradata/std1/indx01.dbf
input datafile fno=00009 name=/opt/oracle/oradata/std1/users01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/std1/cwmlite01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/std1/drsys01.dbf
input datafile fno=00007 name=/opt/oracle/oradata/std1/odm01.dbf
input datafile fno=00008 name=/opt/oracle/oradata/std1/tools01.dbf
channel ORA_DISK_1: starting piece 1 at 09-SEP-05
channel ORA_DISK_1: finished piece 1 at 09-SEP-05
piece handle=/opt/oracle/rman/std31_05gu6stc_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:58
Finished backup at 09-SEP-05
Starting Control File and SPFILE Autobackup at 09-SEP-05
piece handle=/opt/oracle/rman/std31_cf_c-3008016294-20050909-00 comment=NONE
Finished Control File and SPFILE Autobackup at 09-SEP-05
--setp2.make suer the path of datafiles, controlfiles and spfile
--all datafile under path /opt/oracle/oradata/
--spfile is /opt/oracle/product/9.2.0/dbs/spfilestd1.ora
--controlfile is /opt/oracle/oradata/std1/control01.ctl,
/opt/oracle/oradata/std1/control02.ctl,
/opt/oracle/oradata/std1/control03.ctl
--step3.recove backup to Machine B
--1.install database software and create the same directories
Machine B:
mkdir -p /opt/oracle/oradata/std1/
--2.cope files from Machine A to Machine B with the same paths.
cp /opt/oracle/rman/std31_03gu4uef_1_1 /opt/oracle/rman/std31_03gu4uef_1_1
cp /opt/oracle/rman/std31_cf_c-3008016294-20050908-01 /opt/oracle/rman/std31_cf_c-3008016294-20050908-01
--3.recover database
Machine B:
--set enviroment and create pwdfile
su - oracle
orapwd file=/opt/oracle/product/9.2.0/dbs/orapwstd1 password=oracle entries=10
lsnrctl start
rman nocatalog target /
RMAN> set dbid=3008016294
executing command: SET DBID
RMAN> startup force nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle/product/9.2.0/dbs/initstd1.ora'
trying to start the Oracle instance without parameter files ...
Oracle instance started
Total System Global Area 97588624 bytes
Fixed Size 451984 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
RMAN> restore spfile from '/opt/oracle/rman/std31_cf_c-3008016294-20050909-00';
RMAN> shutdown immediate
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 236000476 bytes
Fixed Size 451804 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
RMAN> restore controlfile from '/opt/oracle/rman/std31_cf_c-3008016294-20050909-00';
Starting restore at 09-SEP-05
using channel ORA_DISK_1
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=/opt/oracle/oradata/std1/control01.ctl
output filename=/opt/oracle/oradata/std1/control02.ctl
output filename=/opt/oracle/oradata/std1/control03.ctl
Finished restore at 09-SEP-05
RMAN> alter database mount;
database mounted
RMAN> restore database;
Starting restore at 09-SEP-05
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 /opt/oracle/oradata/std1/system01.dbf
restoring datafile 00002 to /opt/oracle/oradata/std1/undotbs01.dbf
restoring datafile 00003 to /opt/oracle/oradata/std1/cwmlite01.dbf
restoring datafile 00004 to /opt/oracle/oradata/std1/drsys01.dbf
restoring datafile 00005 to /opt/oracle/oradata/std1/example01.dbf
restoring datafile 00006 to /opt/oracle/oradata/std1/indx01.dbf
restoring datafile 00007 to /opt/oracle/oradata/std1/odm01.dbf
restoring datafile 00008 to /opt/oracle/oradata/std1/tools01.dbf
restoring datafile 00009 to /opt/oracle/oradata/std1/users01.dbf
restoring datafile 00010 to /opt/oracle/oradata/std1/xdb01.dbf
restoring datafile 00011 to /opt/oracle/oradata/rcat01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/oracle/rman/std31_05gu6stc_1_1 tag=TAG20050909T114652 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 09-SEP-05
RMAN> recover database noredo;
--RMAN> recover database;
--RMAN> recover database until sequence 28 thread 1;
Starting recover at 09-SEP-05
using channel ORA_DISK_1
starting media recovery
media recovery complete
Finished recover at 09-SEP-05
RMAN> alter database open resetlogs;
database opened
RMAN>
--4.add temp files
SQL> alter tablespace TEMP add tempfile '/opt/oracle/oradata/std1/temp01.dbf' size 50M;
Tablespace altered.
--step4.check the db status, done
...
|
|
|
|
Re: urgent help with RMAN backup [message #137931 is a reply to message #136293] |
Sun, 18 September 2005 22:48 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
you could follow the steps, only need change the path of the filenames.
The rman commands in Linux are the same as in Windows.
If you meet any errors, you can post it here, so we can help you.
Hope this helpful.
Alexzeng
|
|
|
|
|