Home » RDBMS Server » Backup & Recovery » full backup using RMAN help me!!!!!!!!!!!!
full backup using RMAN help me!!!!!!!!!!!! [message #155711] Wed, 18 January 2006 02:09 Go to next message
quytc
Messages: 81
Registered: November 2005
Location: Viet Nam
Member

Hi all,
I backup database by script
RMAN>run{
allocate channel d1 type disk;
setlimit channel d1 kbytes 2097150 maxopenfiles 32 readrate 200;
backup
filesperset 20
format 'D:/backup/al_t%t_s%s_p%p'
archivelog all
delete input;
release channel d1;
}
Then I insert some row into Table Test in database
SQL> insert into TEST values('A');
1 row insert

then, I restore database by script

run {
allocate channel d1 type disk;
setlimit channel d1 kbytes 2097150 maxopenfiles 32 readrate 200;
restore database;
recover database;
release channel d1;
}

but I run SQL;

SQL> select * from TEST

data
____
A

if I am not wrong. A is not in TEST

can anybody tell me why???
Re: full backup using RMAN help me!!!!!!!!!!!! [message #155731 is a reply to message #155711] Wed, 18 January 2006 03:54 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>if I am not wrong. A is not in TEST
You mean, did you expect the table to be empty but found the table to be having the record you inserted?

It is the expected behaviour.
Read documentation.
You have to do a TSPITR ( tablespace point-in-time recovery) to a TIME before you inserted the record.
What you did is a complete recovery.
Means, all the datafiles are recreated and the insert statement is run again using the information in archived logs.
So your database is in a state exactly as before you did the restore.


Re: full backup using RMAN help me!!!!!!!!!!!! [message #156151 is a reply to message #155711] Mon, 23 January 2006 02:22 Go to previous messageGo to next message
chj733
Messages: 11
Registered: October 2005
Location: CHINA
Junior Member
Hi
pls note the script you write:
recover database;

what dose it mean???
you restore the backup datafiles,and the datafiles now don't contain the value "A" of table TEST,but the transaction you have commited,and the redo record has went into the logfile,now you recover database,the recover process will find out that the SCN of datafile header is lower then the control file's datafile SCN,it will using the RBA of the right SCN to look for redo recoder,and apply the record to the datafile,and the value "A" come in.If you don't want to see the value,you can record the time before the transaction begin,restore all backup datafiles,and using recover database until time '....'
Re: full backup using RMAN help me!!!!!!!!!!!! [message #156263 is a reply to message #155711] Tue, 24 January 2006 04:03 Go to previous messageGo to next message
quytc
Messages: 81
Registered: November 2005
Location: Viet Nam
Member

if My database in automatic archivelog.

I backup archivelog frequently.
When I restore then recover database. archivelog backup is used for Backup database??
Re: full backup using RMAN help me!!!!!!!!!!!! [message #156549 is a reply to message #156263] Wed, 25 January 2006 12:26 Go to previous messageGo to next message
croK
Messages: 170
Registered: April 2002
Senior Member
Sure.
Archived redolog might be necessary by the recover process, also any online redolog might be necessary, because the recover process will need to sync datafiles SCN with controlfile's SCN.
Re: full backup using RMAN help me!!!!!!!!!!!! [message #156568 is a reply to message #156263] Wed, 25 January 2006 19:57 Go to previous message
chj733
Messages: 11
Registered: October 2005
Location: CHINA
Junior Member
quytc wrote on Tue, 24 January 2006 18:03

if My database in automatic archivelog.

I backup archivelog frequently.
When I restore then recover database. archivelog backup is used for Backup database??


If you backup your archived log by using RMAN,when your recover need the archived log,RMAN will restore them(relevant) automatic.
If you backup your archived log by using OS copy,you should copy back the archived log,and apply them to your database,you can offer the key word "AUTO",or the real physical path of the archived file.
Previous Topic: Backup through exports (CRONTAB)
Next Topic: importing data error
Goto Forum:
  


Current Time: Mon Dec 23 03:57:28 CST 2024