Home » RDBMS Server » Backup & Recovery » I cant open my Database
I cant open my Database [message #245644] Mon, 18 June 2007 05:00 Go to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

-------------------
SQL> select * from tab;
select * from tab
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
------------------

------------------------

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
-------------------------------

---------------------
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/oradata/THERAP/system01.dbf'

-----------------------

RMAN> restore datafile 1 until time 'SYSDATE-5';

Starting restore at 18-JUN-07
using channel ORA_DISK_1

channel ORA_DISK_1: restoring datafile 00001
input datafile copy recid=42 stamp=624995190 filename=/oradata/THERAP/datafile/o1_mf_system_36tfdtbg_.dbf
destination for restore of datafile 00001: /oradata/oradata/THERAP/system01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00001
output filename=/oradata/oradata/THERAP/system01.dbf recid=50 stamp=625593738
Finished restore at 18-JUN-07
------------------

RMAN> recover datafile 1 until time 'SYSDATE-5';

Starting recover at 18-JUN-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /oradata/oradata/THERAP/system01.dbf
channel ORA_DISK_1: reading from backup piece /oradata/THERAP/backupset/2007_06_12/o1_mf_nnnd1_TAG20070612T020015_36vbgjrt_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/THERAP/backupset/2007_06_12/o1_mf_nnnd1_TAG20070612T020015_36vbgjrt_.bkp tag=TAG20070612T020015
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/18/2007 16:04:25
RMAN-06067: RECOVER DATABASE required with a backup or created control file
--------------



I have done <code>
rman>
startup force nomount
restore control file from autobackup
</code>

But it also does not work. What I should do to open the database?

[Updated on: Mon, 18 June 2007 05:06]

Report message to a moderator

Re: I cant open my Database [message #245709 is a reply to message #245644] Mon, 18 June 2007 10:34 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
Restore control file from autobackup


Did you enable autobackup ON?

Do you have full previous database backup Plus all archivelog files??

[Updated on: Mon, 18 June 2007 10:34]

Report message to a moderator

Re: I cant open my Database [message #245825 is a reply to message #245709] Mon, 18 June 2007 22:57 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

DreamzZ wrote on Mon, 18 June 2007 21:34
Quote:
Restore control file from autobackup


Did you enable autobackup ON?

Do you have full previous database backup Plus all archivelog files??


Yes my autobackup was on..



----------------

RMAN> restore controlfile from autobackup;

Starting restore at 19-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/19/2007 09:50:12
RMAN-06496: must use the TO clause when the database is mounted or open
---------------------

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/oradata/oradata/THERAP/control01.ctl
/oradata/oradata/THERAP/control02.ctl
/oradata/oradata/THERAP/control03.ctl
-------------------------------------


RMAN> restore controlfile to '/oradata/oradata/THERAP/control01.ctl' from autobackup;

Starting restore at 19-JUN-07
using channel ORA_DISK_1

recovery area destination: /oradata
database name (or database unique name) used for search: THERAP
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oradata/THERAP/autobackup/2007_06_13/o1_mf_s_625152567_36z76rck_.bkp
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/19/2007 09:52:56
ORA-19607: /oradata/oradata/THERAP/control01.ctl is an active control file

-----------------------

It is seen I have 3 control file. Will I do this operation by issuing command

SQL> startup force nomount;




I have done this ...
RMAN> startup force nomount;

Oracle instance started

Total System Global Area 1073741824 bytes

Fixed Size 1284292 bytes
Variable Size 268437308 bytes
Database Buffers 796917760 bytes
Redo Buffers 7102464 bytes

RMAN> restore controlfile to '/oradata/oradata/THERAP/control01.ctl' from autobackup;

Starting restore at 19-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

recovery area destination: /oradata
database name (or database unique name) used for search: THERAP
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oradata/THERAP/autobackup/2007_06_13/o1_mf_s_625152567_36z76rck_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
Finished restore at 19-JUN-07


But will it affect the rest two control files???

Now for full database recovery what I would do?

Just two commands ..Will that work?

rman> restore database and then recover database!!!





Re: I cant open my Database [message #245827 is a reply to message #245644] Mon, 18 June 2007 23:18 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Michel and Dream please see my procedure. I am on right way or not.. Correct me .....
Re: I cant open my Database [message #246026 is a reply to message #245825] Tue, 19 June 2007 10:47 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
RMAN> restore controlfile to '/oradata/oradata/THERAP/control01.ctl' from autobackup;

Starting restore at 19-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

recovery area destination: /oradata
database name (or database unique name) used for search: THERAP
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oradata/THERAP/autobackup/2007_06_13/o1_mf_s_625152567_36z76rck_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
Finished restore at 19-JUN-07



As your controlfile restored successfulluy now you can mount your database and then restart recovery.

Quote:
Now for full database recovery what I would do?


RMAN>run
{
restore database;
recover database;
sql 'alter databse open';
};
Re: I cant open my Database [message #246429 is a reply to message #245644] Wed, 20 June 2007 22:18 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Any way I tried all the way. It really does not work. Always it say may be log file missing . But I have not deleted any log file.
Re: I cant open my Database [message #246464 is a reply to message #246429] Thu, 21 June 2007 01:11 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
How bout an actual error message? Do you have all the required archive logs? Is it looking for the redo logs?
Re: I cant open my Database [message #246714 is a reply to message #246464] Thu, 21 June 2007 12:04 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
 Always it say may be log file missing . But I have not deleted any log file


verify it

select member from v$logfile;
Previous Topic: Image copy and Backupset Using.
Next Topic: Database Recovery using Image Copy
Goto Forum:
  


Current Time: Mon May 13 22:51:30 CDT 2024