-
RMAN-BACKUP and RECOVERY
Hi Geeks,I have very little knowledge about oracle 11g and probably database as a whole.I am asking very primitive question here.I am just explaining the complete scenario from start.please help.
I want to carry out this simple test.
Create database.Fill it with entries.Take backup using RMAN.Do some changes.Then restore database to revert to original database.
I created a database through "Database Configuration Assistant" named "testingdb".
Then through RMAN,I took the cold backup as mentioned in one document.
run {
shutdown immediate
startup nomount;
sql 'alter database mount';
backup full
tag full_offline_backup
format '\app\Administrator\flash_recovery_area\TESTINGDB\%d_%U_%T'
(database);
sql 'alter database open';
}
(I am backing up "testingdb" here.But where this name is specified in the above code?should I replace (database) with any name?only format thing I changed according to my requirement.Do I need to change anything more above.)
So in "\app\Administrator\flash_recovery_area\TESTINGDB\",I got 2 backup files(It is backing up all DBF files from "testingdb" directory).All goes well here.
Now,I should change some data so that I can confirm that restore,recover operation takes place successfully.Is it correct way to check recovery,restore?
If I do,"select * from testingdb;",table doesn't exist by this name.
Then using web-based database control,choosing database instance as "testingdb",I created table under "Data Movement->Move Row data->Load data from user files",now this I can see using "select * from table_under_testingdb?".
Now I will restore to retain to my previous state using,
run {
shutdown immediate
startup nomount
set until SCN=348981;
restore controlfile;
alter database mount;
restore database;
recover database noredo;
alter database open resetlogs;
}
(Is this the correct code for recovery,restore?)
Now "table_under_testingdb?" created above should not be present as at the backup time it was not there.Right?
Am I going on the right track?Or there is any other way of backup/recovery using RMAN.
As I am not manually creating tables,this GUI style of creating tables made me confused totally...:(
Last edited by HimanshuMakhu; 01-28-2009 at 09:14 AM.
-
set until SCN=348981;
Is this change number after table creation or before table creation
-
How to get SCN
Yeah...Thnx my mistake...
It should be retrieved using
select max(next_change#)-1 from v$archived_log;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|