wat is using backup controlfile option [message #258377] |
Sat, 11 August 2007 06:38 |
pramodgaree
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
If i am recreating controlfile,how i can use recover database option ?bcoz all the contents in current controlfile will be lost na???
Another question is if i use recover database using backup controlfile option after recreating controlfile ,exactly wat does it mean by backup controlfile
whether it is the one before i recreated the controlfile or what???
then where we are getting information for recovery i.e where the info req for recovery is maintained after recreation of controlfile????
|
|
|
|
|
|
|
|
|
|
Re: wat is using backup controlfile option [message #258402 is a reply to message #258401] |
Sat, 11 August 2007 10:09 |
pramodgaree
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Basic concept of recovery is that..it will compare checkpoint cnt n checkpoint SCNs from control file n then it will compare it with datafile headers....
any how in datafile headers that info will be there...but when i recreate controlfile or use backup controlfile wat will happen???
|
|
|
|
|
Re: wat is using backup controlfile option [message #258405 is a reply to message #258404] |
Sat, 11 August 2007 10:22 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | And if you have all the archive and redo logs available, you can do a full recovery without a "cancel" or "until"
|
There is no end with a backup control file, so I don't think you can avoid a "cancel" or "until" as Oracle always asks for the next log.
Regards
Michel
[Updated on: Sat, 11 August 2007 10:23] Report message to a moderator
|
|
|
Re: wat is using backup controlfile option [message #258409 is a reply to message #258405] |
Sat, 11 August 2007 11:48 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
A cancel is not always needed with a recreated controlfile. You can actually do an 'alter database backup controlfile to trace' and view it's contents for the recovery steps in each situation.
SQL> alter database backup controlfile to trace as 'e:\ctrlbackup.ctl';
Database altered.
SQL> select * from v$controlfile;
STATUS NAME
------- --------------------------------------------
E:\ORACLE\ORADATA\WIN9I\CONTROL01.CTL
E:\ORACLE\ORADATA\WIN9I\CONTROL02.CTL
E:\ORACLE\ORADATA\WIN9I\CONTROL03.CTL
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host del e:\ORACLE\ORADATA\WIN9I\*.ctl
SQL> -- After removing comments from backed up controlfile
SQL> -- and the RESETLOGS section
SQL> host type e:\ctrlbackup.ctl
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "WIN9I" NORESETLOGS ARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 'E:\ORACLE\ORADATA\WIN9I\REDO01.LOG' SIZE 50M,
GROUP 2 'E:\ORACLE\ORADATA\WIN9I\REDO02.LOG' SIZE 50M,
GROUP 3 'E:\ORACLE\ORADATA\WIN9I\REDO03.LOG' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'E:\ORACLE\ORADATA\WIN9I\SYSTEM01.DBF',
'E:\ORACLE\ORADATA\WIN9I\UNDOTBS01.DBF',
'E:\ORACLE\ORADATA\WIN9I\CWMLITE01.DBF',
'E:\ORACLE\ORADATA\WIN9I\DRSYS01.DBF',
'E:\ORACLE\ORADATA\WIN9I\EXAMPLE01.DBF',
'E:\ORACLE\ORADATA\WIN9I\INDX01.DBF',
'E:\ORACLE\ORADATA\WIN9I\ODM01.DBF',
'E:\ORACLE\ORADATA\WIN9I\TOOLS01.DBF',
'E:\ORACLE\ORADATA\WIN9I\USERS01.DBF',
'E:\ORACLE\ORADATA\WIN9I\XDB01.DBF',
'E:\ORACLE\ORADATA\WIN9I\TEST_RESTORE.DBF'
CHARACTER SET WE8MSWIN1252
;
RECOVER DATABASE
ALTER SYSTEM ARCHIVE LOG ALL;
ALTER DATABASE OPEN;
SQL> @e:\ctrlbackup.ctl
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 100663296 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Control file created.
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
System altered.
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> select * from v$controlfile;
STATUS NAME
------- ----------------------------------
E:\ORACLE\ORADATA\WIN9I\CONTROL01.CTL
E:\ORACLE\ORADATA\WIN9I\CONTROL02.CTL
E:\ORACLE\ORADATA\WIN9I\CONTROL03.CTL
[Updated on: Sat, 11 August 2007 11:56] Report message to a moderator
|
|
|
Re: wat is using backup controlfile option [message #258410 is a reply to message #258409] |
Sat, 11 August 2007 12:18 |
pramodgaree
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Thx for ur valuable opinions...i hav one more doubt here..if i recreate controlfile with same DB name and NORESETLOGS..obviously i can use recover database..so,when i am using recover database obviously DB will use current controlfile...So,it is nothin but recover database in normal scenario only coz im recreating controlfile immediately after DB shutdown...But even after NORESETLOGS controlfile creation y it is asking for recovery for a clean backup n y not in normal case..in recreation of controlfile is there any creation of any SCN s or what??/
|
|
|
|
|
|
Re: wat is using backup controlfile option [message #258467 is a reply to message #258437] |
Sun, 12 August 2007 05:52 |
pramodgaree
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
One more final doubt in this regard..in one scenario i have recreated controlfile with NORESETLOGS and then i have used recover database.So it will use current controlfile for recovery and it should use online redolog files contents if at all it going for recovery..but in my scenario i have used empty online redo files..but when i opened DB after recreating controlfile with NORESETLOGS it asked recovery n when i used recover databse it performed recovery and said media recovery complete.!!!!But as i dont have anythin in my online redo lo files i wonder how it performed recovery..how it might have performed recovery???plz help me in this regard.
|
|
|
|
Re: wat is using backup controlfile option [message #258739 is a reply to message #258482] |
Mon, 13 August 2007 08:52 |
pramodgaree
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
My scenario is that i have redo log files intact but the contents are different.To be exact i am taking a backup from my physical standby database which uses rcovery from archived logs.So for my physiacl standby databse redo log files are always empty or it don't have any info whatever.when i take backup from that n when i recreate controlfile with same name,NORESETLOGS it asked recovery while opening database.When i giver recover databse recovery was complete. I wonder how recover Databse statement worked when the there r no contents in online redo logfiles.
|
|
|
|
|
Re: wat is using backup controlfile option [message #258837 is a reply to message #258739] |
Mon, 13 August 2007 11:43 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
pramodgaree wrote on Mon, 13 August 2007 07:52 | My scenario is that i have redo log files intact but the contents are different.To be exact i am taking a backup from my physical standby database which uses rcovery from archived logs.So for my physiacl standby databse redo log files are always empty or it don't have any info whatever.when i take backup from that n when i recreate controlfile with same name,NORESETLOGS it asked recovery while opening database.When i giver recover databse recovery was complete. I wonder how recover Databse statement worked when the there r no contents in online redo logfiles.
|
Quote: | When i giver recover databse recovery was complete. I wonder how recover Databse statement worked when the there r no contents in online redo logfiles.
|
I asked on the basis of this question.
From v$log i guess we will kno whats the status of the log files.
like active
unused
stale
current
correct me if i'm wrong.
|
|
|
|
|