rman recovery of .dbf on unix [message #291795] |
Sun, 06 January 2008 23:05 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
I have already searched the previous message in forum, But could not find anything similar.
1) I had taken the backup using :
rman target=/ << EOF
RUN {
allocate channel ch1 type
disk format '/u00/oradata/backup/%d_DB_%u_%s_%p_%t';
backup database plus archivelog;
release channel ch1;
}
EXIT;
EOF
2) Then I removed system.dbf file (though copied somewhere else using mv command).
3) Then after around 30 mins, i ran
run {
allocate channel ch1 type disk;
restore database;
recover database;
release channel ch1;
}
But no success, and I am not able to get database functioning back even though i moved back that system.dbf file also. The sql queries throw error of "ORA-01122: database file 1 failed verification check".
Please suggest How can I perform the restoration/recovery?
|
|
|
|
Re: rman recovery of .dbf on unix [message #291802 is a reply to message #291800] |
Sun, 06 January 2008 23:37 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
I am new to RMAN and in order to learn I had removed one .dbf file. Now placing back or restore command does not seem to resolve the problem. also, I have last week's good backup pieces(4 files). could there any assistance possbile with them?
|
|
|
Re: rman recovery of .dbf on unix [message #291809 is a reply to message #291795] |
Sun, 06 January 2008 23:54 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
First are you in ARCHIVELOG or NOARCHIVELOG mode?
Next did you take a cold or a hot backup (was database open or not during backup)?
Finally did you try to restore/recover in open mode or in mount mode?
Copy and paste you session, don't describe it, we can see something in the output that you can't see.
Forgot: please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Always post your Oracle version (4 decimals).
Regards
Michel
[Updated on: Sun, 06 January 2008 23:55] Report message to a moderator
|
|
|
Re: rman recovery of .dbf on unix [message #291815 is a reply to message #291809] |
Mon, 07 January 2008 00:01 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
1) I was in archivelog mode as before taking backup everytime I was running this also - ALTER SYSTEM ARCHIVE LOG CURRENT;
2) The backups of previous days I have are hot ones i.e. while DB was online
3) I ran restore/recover in open and mounted mode.
I dont have any session open now, Let me know I will recollect what all I have been doing and tell you.
|
|
|
|
Re: rman recovery of .dbf on unix [message #291836 is a reply to message #291795] |
Mon, 07 January 2008 00:38 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
Please see:
$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Jan 7 06:34:43 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database close;
alter database close
*
ERROR at line 1:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/oradata/cal1/system.dbf'
ORA-01208: data file is an old version - not accessing current version
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
$ rman target=/
Recovery Manager: Release 10.2.0.2.0 - Production on Mon Jan 7 06:35:05 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: cal1 (DBID=882726563)
RMAN> restore database;
Starting restore at 07-JAN-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643348439_s37_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643342183_s36_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/07/2008 06:35:21
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000
ORA-19573: cannot obtain exclusive enqueue for datafile 1
RMAN>
|
|
|
|
Re: rman recovery of .dbf on unix [message #291861 is a reply to message #291795] |
Mon, 07 January 2008 01:40 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
Sorry for not previewing the message before sending. I missed it, being new to the forum. I shall follow the rules of it in future... The guide is certainly very clear.
SQL> shutdown
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/oradata/calypso1/system.dbf'
ORA-01208: data file is an old version - not accessing current version
SQL>
I am not able to shutdown db also. Is there a way to restore complete database by pointing yesterday's backup pieces?
|
|
|
|
Re: rman recovery of .dbf on unix [message #291875 is a reply to message #291869] |
Mon, 07 January 2008 02:07 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
Thank you, I can format & preview now. I hope lines do not cross 80 char limit here.
SQL> shutdown abort
ORACLE instance shut down.
SQL> quit
$ rman target=/
Recovery Manager: Release 10.2.0.2.0 - Production on Mon Jan 7 08:01:39 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> restore database;
Starting restore at 07-JAN-08
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/07/2008 08:01:45
RMAN-12010: automatic channel allocation initialization failed
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Intel SVR4 UNIX Error: 2: No such file or directory
RMAN> quit
|
|
|
Re: rman recovery of .dbf on unix [message #291881 is a reply to message #291875] |
Mon, 07 January 2008 02:22 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
I did now as below and backup command seems to be working fine. But not restore - Is it normal?
SQL> startup mount
ORACLE instance started.
Total System Global Area 1048576000 bytes
Fixed Size 1366116 bytes
Variable Size 520791964 bytes
Database Buffers 524288000 bytes
Redo Buffers 2129920 bytes
Database mounted.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
$ rman target=/
Recovery Manager: Release 10.2.0.2.0 - Production on Mon Jan 7 08:14:16 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: cal1 (DBID=882726563, not open)
RMAN> restore database;
Starting restore at 07-JAN-08
using target database control file instead of recovery catalog allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=544 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643348439_s37_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643342183_s36_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000
channel ORA_DISK_1: restored backup piece 1
piece handle=/u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000 tag=TAG20080107T020640
channel ORA_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 07-JAN-08
RMAN>
RMAN> restore database;
Starting restore at 07-JAN-08
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 /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643348439_s37_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643342183_s36_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
skipping datafile 1; already restored to file /u01/oradata/cal1/system.dbf
skipping datafile 2; already restored to file /u01/oradata/cal1/undotbs1
skipping datafile 3; already restored to file /u01/oradata/cal1/sysaux.dbf
Finished restore at 07-JAN-08
RMAN> backup database;
Starting backup at 07-JAN-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
input datafile fno=00001 name=/u01/oradata/cal1/system.dbf
input datafile fno=00002 name=/u01/oradata/cal1/undotbs1
input datafile fno=00003 name=/u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: starting piece 1 at 07-JAN-08
channel ORA_DISK_1: finished piece 1 at 07-JAN-08
piece handle=/u00/oradata/backup_cal1/ora_df643364189_s39_s1 tag=TAG20080107T081629 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 07-JAN-08
RMAN> restore database;
Starting restore at 07-JAN-08
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 /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643348439_s37_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643348439_s37_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19870: error reading backup piece /u00/oradata/backup_cal1/ora_df643342183_s36_s1
ORA-19505: failed to identify file "/u00/oradata/backup_cal1/ora_df643342183_s36_s1"
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3
failover to previous backup
skipping datafile 1; already restored to file /u01/oradata/cal1/system.dbf
skipping datafile 2; already restored to file /u01/oradata/cal1/undotbs1
skipping datafile 3; already restored to file /u01/oradata/cal1/sysaux.dbf
Finished restore at 07-JAN-08
RMAN>
|
|
|
Re: rman recovery of .dbf on unix [message #291886 is a reply to message #291881] |
Mon, 07 January 2008 02:27 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
What you did is meneaningless, what this bunch of "restore database" and "backup database"?
What are you trying to do?
It perfectly restore the database the first time:
restoring datafile 00001 to /u01/oradata/cal1/system.dbf
restoring datafile 00002 to /u01/oradata/cal1/undotbs1
restoring datafile 00003 to /u01/oradata/cal1/sysaux.dbf
channel ORA_DISK_1: reading from backup piece /u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000
channel ORA_DISK_1: restored backup piece 1
piece handle=/u00/oradata/backup_cal1/cal1_DB_12j5h7lg_34_1_643342000 tag=TAG20080107T020640
channel ORA_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 07-JAN-08
And when you tried again after it says it is already done:
skipping datafile 1; already restored to file /u01/oradata/cal1/system.dbf
skipping datafile 2; already restored to file /u01/oradata/cal1/undotbs1
skipping datafile 3; already restored to file /u01/oradata/cal1/sysaux.dbf
Finished restore at 07-JAN-08
Regards
Michel
[Updated on: Mon, 07 January 2008 03:57] Report message to a moderator
|
|
|
Re: rman recovery of .dbf on unix [message #291891 is a reply to message #291886] |
Mon, 07 January 2008 02:34 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
I was just checking IF restore command works fine. I think its not the right way.
My actual test scenario is IF system.dbf file is removed from original location. What is the way I can get that back from backed up database?
|
|
|
|
|
|
|
Re: rman recovery of .dbf on unix [message #292398 is a reply to message #291913] |
Tue, 08 January 2008 21:27 |
panchpan
Messages: 34 Registered: October 2007
|
Member |
|
|
Consider a scenario: I had taken 3 different times the backup in a day of complete database using backup database command. Then for some reasons .dbf file is deleted and I do restore/recovery of full database and which will fix the problem certainly as I did above. IF I understand correctly, restore/recover will do the restore/recovery from latest taken backup - (1) Am I right? (2) What IF I want to do a restore from 1st backup copy of the day?
Thank you!
|
|
|
|
|
|
|
|
|
Re: rman recovery of .dbf on unix [message #292814 is a reply to message #291795] |
Wed, 09 January 2008 23:15 |
nagnrik
Messages: 1 Registered: January 2008
|
Junior Member |
|
|
hi man....
az i knou ...
the restoration of systen.dbf file mus b done in mount stage ....
in ur skript ....
therez no mount stage
like ...
run
{
sql 'startup mount force'; (if the db in open stage)
restore database;
recover database;
sql 'alter database open';
}
naga raju
|
|
|
Re: rman recovery of .dbf on unix [message #292857 is a reply to message #292814] |
Thu, 10 January 2008 01:17 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
@nagnrik
please read and follow OraFAQ Forum Guide, especially sections "How to format your post?" and about IM speak.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button to verify.
Regards
Michel
|
|
|