Recover Oracle DB 11.1.0.7 using target database controlfile RMAN Hot Backu
Hi All,
DB:11.1.0.7
OS:RHEL Linux 4 64-bit
Could anyone please share the "Steps to recover Oracle DB 11.1.0.7 using target database control file RMAN of previous Hot Backup"
We are not using Recovery Catalog.
Thanks for your time!
Regards,
If the current control file is still present on disk, you can merely issue a RESTORE DATABASE followed by a RECOVER DATABASE.
If you are not attempting a Complete Recovery (i.e. upto the last transaction in the online redo logs) and/or the online redo logs are not available, you would also include a SET UNTIL (scn or log sequence or time) clause in you RESTORE and RECOVER.
If the current control file is not available, you would STARTUP NOMOUNT, then restore the controlfile, then MOUNT the database before proceeding with the RESTORE and RECOVER.
Oracle will automatically identify and restore and apply the necessary archivelogs when you issue the RECOVER DATABASE. You don't need to manually restore them in advance. However, you will need sufficient disk space to restore the archivelogs (e.g. if the backup is 3 days old, Oracle will attempt to restore 3 days of archivelogs).
The standard documentation is at
http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmcomre.htm#i1009223
I have numerous examples at
http://hemantoracledba.blogspot.com
and
https://sites.google.com/site/hemantswebsite/oracle-diagnostics/MyOracleBlogBackup_and_RecoveryPosts.pdf
Hemant K Chitale
Edited by: Hemant K Chitale on May 16, 2011 9:45 AM
Similar Messages
-
Check what oracle installed components are actually being used in database
I have been allotted a new database which I have to optimize. So I am thinking about removing some installed components which I think are not being used in any way in database (i.e procedures calls etc). I can see a whole lot of components like "SDO","ORDIM" which I think are not being used but previous DBAs have installed them. So, is there any way to ensure that no part of database are actually using these components so that I can remove these components. Also ,what are your expert comments about this?
Is this a production or a development environment? If an object isn't being used then it's not necessarily a problem (performance wise) unless it's cluttering up either your dictionary or raising concerns in regards consuming unnecessary space. Personally I'd recommend that it's better to tune what is being used / taking resources. It may be a once a year report or some old utility pulled out once a year, best check why these things are there.
If you go down the dropping route, rather than drop anything immediately lock accounts for an agreed period of time to make sure that the schema isn't used & check any references from other schemas to objects within the schema that you're planning to drop, potentially audit these to check whether they're being called by other schemas / checking dba_dependencies between schemas & objects using a hierarchical query to check sublevels.
There are also quite a few Oracle standard components that are installed by default that have interdependencies and won't necessarily be used in the dictionary (checking dba_features_usage_statistics) -
Restore Database with Oracle 9i with a New Host using RMAN
Gurus,
I am trying to restore a database from some RMAN created files on a new host with a new directory structure for some testing. I do not have access to the source database.
The database is Oracle 9i.
The files that have been created are the following:
'C-2995630462-20110214-00' is the control file and SP file backup.
'B_ABM4KAJ5_1_1' is the database backup.
B_ACM4KARS_1_1 and B_AAM4KAIV_1_1 are archived redo logs
Here is the RMAN listing from when the files were created:
BS Key Size Device Type Elapsed Time Completion Time
329 56M DISK 00:00:02 14/FEB/11
BP Key: 329 Status: AVAILABLE Tag: TAG20110214T050015
Piece Name: D:\BACKUPS\CRYSTAL\B_AAM4KAIV_1_1
List of Archived Logs in backup set 329
Thrd Seq Low SCN Low Time Next SCN Next Time
1 184 4602414767 13/FEB/11 4602533494 14/FEB/11
BS Key Type LV Size Device Type Elapsed Time Completion Time
330 Full 13G DISK 00:04:33 14/FEB/11
BP Key: 330 Status: AVAILABLE Tag: TAG20110214T050021
Piece Name: D:\BACKUPS\CRYSTAL\B_ABM4KAJ5_1_1
List of Datafiles in backup set 330
File LV Type Ckp SCN Ckp Time Name
1 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\SYSTEM01.DBF
2 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\UNDOTBS01.DBF
3 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\USERS01.DBF
BS Key Size Device Type Elapsed Time Completion Time
331 37K DISK 00:00:01 14/FEB/11
BP Key: 331 Status: AVAILABLE Tag: TAG20110214T050500
Piece Name: D:\BACKUPS\CRYSTAL\B_ACM4KARS_1_1
List of Archived Logs in backup set 331
Thrd Seq Low SCN Low Time Next SCN Next Time
1 185 4602533494 14/FEB/11 4602533686 14/FEB/11
BS Key Type LV Size Device Type Elapsed Time Completion Time
332 Full 3M DISK 00:00:01 14/FEB/11
BP Key: 332 Status: AVAILABLE Tag:
Piece Name: D:\BACKUPS\CRYSTAL\C-2995630462-20110214-00
SPFILE Included: Modification time: 23/NOV/10
I am new to using RMAN and I'm hoping someone could point me in a direction of some documentation to assist with the scenario described above. I've looked at several Oracle documents but have been unable to find a way to separate out the spfile from the control file.
Any help you can provide would be greatly appreciated.
Thanks.Thanks Meeran.
I have attempted to follow the directions from the RMAN document that you posted and have run into the following error:
C:\>rman target / nocatalog
Recovery Manager: Release 9.2.0.6.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: DUMMY (not mounted)
using target database controlfile instead of recovery catalog
RMAN> startup force nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\ORACLE\ORA92\DATABASE\INITCRYSTAL.O
RA'
trying to start the Oracle instance without parameter files ...
Oracle instance started
Total System Global Area 97591104 bytes
Fixed Size 454464 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
RMAN> RESTORE SPFILE TO 'C:\oracle\admin\crystal\pfile\init.ora' from 'C:\oracle
\ora92\CRYSTALbk\C-2995630462-20110214-00';
Starting restore at 30-MAR-11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/30/2011 11:30:07
ORA-00600: internal error code, arguments: [1866], [0x41AA450], [6144], [0x41BAD
B4], [], [], [], []
RMAN>
Am I not correctly connected to the target?
It looks like it correctly tried to create a dummy spfile, but when attempting the restore from the file it breaks.
Any suggestions? Thanks. -
Recovering primary using standby database
Hi all,
Here we have a dataguard environment with db1(db_unique_name) as primary and db2(db_unique_name) as physical standby database. We configured dataguard in 10g environments and we are not using grid control. And now we want to configure rman for incremental backups.After configuring we successfully took full backup in standby plus archive logs. Then as the test case we dropped one datafile from the primary and tried to recover it. It is showing the following error. Also when i tried 'crosscheck backup' from primary it is showing that all the backups taken in standby are 'expired'. But from RMAN connected to standby the same backups are showing as 'available'. Can anyone help to fix this?
On primary:
[oracle@db1 NIOS]$ sqlplus / as sysdba;
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Sep 6 02:58:11 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database datafile 4 offline; (after deleting datafile from system level)
Database altered.
[oracle@db1 NIOS]$ rman target sys/oracle@db1 catalog rman/oracle@appsdb
Recovery Manager: Release 10.2.0.3.0 - Production on Thu Sep 6 02:58:58 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: NIOS (DBID=1590630518)
connected to recovery catalog database
RMAN> restore datafile 4;
Starting restore at 06-SEP-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=107 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /u01/app/oracle/oradata/NIOS/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T174801_84gjqt0n_.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T174801_84gjqt0n_.bkp
ORA-19505: failed to identify file "/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T174801_84gjqt0n_.bkp"
ORA-27037: unable to obtain file status
Linux 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 00004 to /u01/app/oracle/oradata/NIOS/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T164212_84gdwdst_.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T164212_84gdwdst_.bkp
ORA-19505: failed to identify file "/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T164212_84gdwdst_.bkp"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel ORA_DISK_1: restoring datafile 00004
input datafile copy recid=13 stamp=793208425 filename=/tmp/users01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/NIOS/users01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/06/2012 02:59:10
ORA-19571: datafilecopy recid 13 stamp 793208425 not found in control file
ORA-19600: input file is datafile-copy 13 ()
ORA-19601: output file is datafile-copy 0 (/u01/app/oracle/oradata/NIOS/users01.dbf)
RMAN> crosscheck backup;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T164038_84gdsjlw_.bkp recid=18 stamp=793212040
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T164038_84gdtz6p_.bkp recid=19 stamp=793212087
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T164212_84gdwdst_.bkp recid=20 stamp=793212132
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/autobackup/2012_09_05/o1_mf_s_793242038_84gdxw5j_.bkp recid=21 stamp=793212180
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T174759_84gjqrtn_.bkp recid=22 stamp=793216080
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T174801_84gjqt0n_.bkp recid=23 stamp=793216082
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/autobackup/2012_09_05/o1_mf_s_793246288_84gjs9h4_.bkp recid=24 stamp=793216129
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/c-1590630518-20120906-00 recid=5 stamp=793238431
Crosschecked 8 objects
On Stand-by:
[oracle@db2 NIOS]$ rman target sys/oracle@db2 catalog rman/oracle@appsdb
Recovery Manager: Release 10.2.0.3.0 - Production on Wed Sep 5 20:11:58 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: NIOS (DBID=1590630518, not open)
connected to recovery catalog database
RMAN> crosscheck backup;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=91 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T164038_84gdsjlw_.bkp recid=18 stamp=793212040
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T164038_84gdtz6p_.bkp recid=19 stamp=793212087
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T164212_84gdwdst_.bkp recid=20 stamp=793212132
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/autobackup/2012_09_05/o1_mf_s_793242038_84gdxw5j_.bkp recid=21 stamp=793212180
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_annnn_TAG20120905T174759_84gjqrtn_.bkp recid=22 stamp=793216080
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T174801_84gjqt0n_.bkp recid=23 stamp=793216082
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/flash_recovery_area/DB2/autobackup/2012_09_05/o1_mf_s_793246288_84gjs9h4_.bkp recid=24 stamp=793216129
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/c-1590630518-20120906-00 recid=5 stamp=793238431
Crosschecked 8 objects
Thanks in advance.Hello;
I would review one of these step by step :
Using RMAN Backup Files from Standby Database to Recover Primary
http://oraganism.files.wordpress.com/2009/04/backup-from-physical-standby.pdf
How to use standby backup to restore primary db
http://alexzeng.wordpress.com/2008/09/13/how-to-use-standby-backup-to-restore-primary-db/
Steps to recover the primary database's datafile using a copy of a standby database's datafile.
http://dbaregistry.blogspot.com/2010/01/steps-to-recover-primary-databases.html
RMAN in a Data Guard Environment
http://oracle.su/docs/11g/backup.112/e10642/rcmarchi.htm#CHDIFGFH
Performing a database clone using a Data Guard physical standby database
http://gavinsoorma.com/2012/04/performing-a-database-clone-using-a-data-guard-physical-standby-database/
Best Regards
mseberg -
Recover Database in RMAN vs SQL*PLUS
Hello,
Oracle 11.2.0.1, Oracle Linux 5.5 UEK.
I recently did a "recover database" in sql*plus, but an attempt to open the database gave ORA-01113, complaining the system tablespace requried more recovery. Then I used RMAN (nocatalog) and after the same "recover database" command I was able to open the database.
It seems there are differences between SQL*PLUS and RMAN "recover database" command. I have not been able to locate the chapter in the Oracle documentation that explains the difference. I have some ideas, but...
Thanks.
h3. Solution Summary:
The recover command in RMAN compared to SQL*Plus implements a more user friendly processing logic based on the current detected scenario. For instance, a RMAN recover database command may actually perform a "recover database using backup controlfile until cancel" and automatically apply all archived and online redo logs if available. The same can be achieved with the recover command in SQL*plus, but will have to be done manually.
Edited by: Dude on Jan 7, 2011 12:30 PMDude wrote:
I did not remove any datafiles or redo logs. it is the same restore operation as before, and again RMAN "recovery database" succeeds, whereas SQL recover has trouble. This tells me something is different between the two methods. For one, RMAN does not requrie to specify "using backup controlfile".
Maybe someting about "resetlogs" that that RMAN recover can handle and SQL recover not?No,problem is there.If you using rman execute RECOVER DATABASE it also will apply online logs(if available) also and as result you will get complete recovery however you must open database with resetlogs option due to you recovered database using backup controlfile.So also you can recover and open database applying this online logs.After executing RECOVER DATABASE USING BACKUP CONTROLFILE you have to pass full path of online log then press ENTER so log will apply and you can open database with RESETLOGS.See below
C:\Documents and Settings\chinar>rman target sys/sm
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jan 7 17:47:49 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 138412032 bytes
Fixed Size 1247708 bytes
Variable Size 71304740 bytes
Database Buffers 58720256 bytes
Redo Buffers 7139328 bytes
RMAN> restore controlfile from 'D:\oracle\product\10.2.0\flash_recovery_area\T\B
ACKUPSET\2011_01_07\O1_MF_NCSNF_TAG20110107T171001_6LG48JR5_.BKP'
2> ;
Starting restore at 07-JAN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL01.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL02.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL03.CTL
Finished restore at 07-JAN-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 07-JAN-11
Starting implicit crosscheck backup at 07-JAN-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 07-JAN-11
Starting implicit crosscheck copy at 07-JAN-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 07-JAN-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\T\BACKUPSET\2011_01_07\O
1_MF_NCSNF_TAG20110107T171001_6LG48JR5_.BKP
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 D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\SYSAUX01.DBF
restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\USERS01.DBF
channel ORA_DISK_1: reading from backup piece D:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\T\BACKUPSET\2011_01_07\O1_MF_NNNDF_TAG20110107T171001_6LG45BXS_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\T\BACKUPSET\2011_01_07
\O1_MF_NNNDF_TAG20110107T171001_6LG45BXS_.BKP tag=TAG20110107T171001
channel ORA_DISK_1: restore complete, elapsed time: 00:01:04
Finished restore at 07-JAN-11
RMAN> recover database;
Starting recover at 07-JAN-11
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 7 is already on disk as file D:\ORACLE\PRODUCT\10.
2.0\ORADATA\T\REDO02.LOG
archive log filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG thread=1 sequ
ence=7
media recovery complete, elapsed time: 00:00:03
Finished recover at 07-JAN-11
RMAN> exit
Recovery Manager complete.
C:\Documents and Settings\chinar>sqlplus sys/sm as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 7 17:51:31 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
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;
Database altered.
SQL> And above you see lines as
archive log thread 1 sequence 7 is already on disk as file D:\ORACLE\PRODUCT\10.
*2.0\ORADATA\T\REDO02.LOG*
archive log filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG thread=1 sequ
ence=7
It means RMAN apply these.So you can apply these using SQLPLUS ALSO.In additionally you can see that from alert log as
alter database recover if needed
start until cancel using backup controlfile
Media Recovery Start
parallel recovery started with 2 processes
ORA-279 signalled during: alter database recover if needed
start until cancel using backup controlfile
Fri Jan 07 17:50:34 2011
alter database recover logfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG'
Fri Jan 07 17:50:34 2011
Media Recovery Log D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG
Fri Jan 07 17:50:34 2011
Incomplete recovery applied all redo ever generated.
Recovery completed through change 665263
Completed: alter database recover logfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG'And finally you see clearly that even if you execute RECOVER DATABASE from RMAN it actually execute RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE (from alert.log start until cancel using backup controlfile)
And these is not any difference.
Hope that help you and you got answer. -
Recover tablespace is failing and not able to open database
Hello All,
I am using Oracle RAC 11g R2 on Linux. My database is running in NOARHIVELOG mode.
I am testing some RMAN scenarios.
After doing a the below scenario: I think the problem that I used switch log file!!!
RMAN> backup tablespace 'USERS' TAG 'TestBkp_FRA';
RMAN> backup backupset 10 format '/testasm/backup%U' delete input; -- here 10 is the backup set generated in the previous command
RMAN> BACKUP INCREMENTAL LEVEL 1 tablespace users;
alter system switch logfile;-- many times i am not able to recover my users tablespace because of the below :
archived log for thread 1 with sequence 19 is already on disk as file +DATA/orcl/onlinelog/group_1.261.772044543
archived log for thread 1 with sequence 20 is already on disk as file +DATA/orcl/onlinelog/group_2.262.772044547
archived log for thread 2 with sequence 4 is already on disk as file +DATA/orcl/onlinelog/group_4.266.772044919
RMAN-08187: WARNING: media recovery until SCN 1101381 complete
Finished recover at 27-MAR-2012 17:21:36and I am unable to open my database:
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/27/2012 17:26:18
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.772044111'below is a list of my backups
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
9 Full 1.45M DISK 00:00:02 27-MAR-2012 12:06:47
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TESTBKP
Piece Name: /testasm/backup0an6tvil_1_2
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
4 Full 1092418 27-MAR-2012 11:40:06 +DATA/orcl/datafile/users.259.772044111
BS Key Type LV Size Device Type Elapsed Time Completion Time
10 Full 1.45M DISK 00:00:04 27-MAR-2012 15:58:54
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TESTBKP_FRA
Piece Name: /testasm/backup0bn6ud5q_1_2
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
4 Full 1100603 27-MAR-2012 15:53:40 +DATA/orcl/datafile/users.259.772044111
BS Key Type LV Size Device Type Elapsed Time Completion Time
11 Incr 0 1.45M DISK 00:00:05 27-MAR-2012 16:16:59
BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20120327T161652
Piece Name: +FRA/orcl/backupset/2012_03_27/nnndn0_tag20120327t161652_0.261.779041015
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
4 0 Incr 1101381 27-MAR-2012 16:13:11 +DATA/orcl/datafile/users.259.772044111
BS Key Type LV Size Device Type Elapsed Time Completion Time
12 Full 1.45M DISK 00:00:02 27-MAR-2012 17:00:26
BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20120327T170023
Piece Name: +FRA/orcl/backupset/2012_03_27/nnndf0_tag20120327t170023_0.260.779043625
List of Datafiles in backup set 12
File LV Type Ckp SCN Ckp Time Name
4 Full 1101381 27-MAR-2012 16:13:11 +DATA/orcl/datafile/users.259.772044111My database is running in NOARCHIVELOG mode I have no Full database backup.
How can I start my database. Please help!!NB wrote:
What do you mean ?
Now I am not able to open my database. it is mounted.
What steps should i do ?If you try to backup database in NOARCHIVELOG mode, you will get below errors
RMAN> backup database;
Starting backup at 27-MAR-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=130 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/27/2012 20:30:26
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
RMAN>
RMAN> backup tablespace users;
Starting backup at 27-MAR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/27/2012 20:30:58
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
RMAN>Can you tell me how you took backup? have you taken backup from MOUNT status when its in noarchivelog mode?
If there is inconsistency of SCN, you cant recover it.
Please describe how you took backup & why you want to perform recovery in noarchivelog mode? -
Auxiliary filename conflicts with a file used by the target database
Hi,
I am using RMAN backup to duplicate my prod database.
My database is 10g on Linux.
My RMAN script is like this
connect auxiliary /;
connect catalog rman/rman@catalog;
connect target sys/sys@prod;
sql "alter session set optimizer_mode=RULE";
run {
allocate auxiliary channel dup1 type disk;
allocate auxiliary channel dup2 type disk;
allocate auxiliary channel dup3 type disk;
set newname for datafile 1 to '/d05/u08/oracle/qadata/system01.dbf';
set newname for datafile 2 to '/d05/u08/oracle/qadata/system02.dbf';
set newname for datafile 3 to '/d05/u08/oracle/qadata/system03.dbf';
set newname for tempfile 1 to '/d05/u09/oracle/qadata/temp01.dbf';
set newname for tempfile 2 to '/d05/u09/oracle/qadata/temp02.dbf';
set newname for tempfile 3 to '/d05/u09/oracle/qadata/temp03.dbf';
set newname for tempfile 4 to '/d05/u09/oracle/qadata/temp04.dbf';
duplicate target database to qa logfile
group 1 ('/d05/u09/oracle/qadata/log1a.log',
'/d05/u09/oracle/qadata/log1b.log') size 50m,
group 2 ('/d05/u09/oracle/qadata/log2a.log',
'/d05/u09/oracle/qadata/log2b.log') size 50m,
group 3 ('/d05/u09/oracle/qadata/log3a.log',
'/d05/u09/oracle/qadata/log3b.log') size 50m;
I am getting the following error in the middle
Starting Duplicate Db at 18-SEP-10
released channel: dup1
released channel: dup2
released channel: dup3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/18/2010 11:32:07
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /db01/u08/oracle/proddata/GRCM.dbf conflicts with a file used by the target database
Recovery Manager complete.
Previously the duplicate db was successful, but now it is giving error.
How can I solve this.
Thanks,
Kavitha5001, 1, "auxiliary file name %s conflicts with a file used by the target database"
// *Cause: RMAN is attempting to use the specified file name as a restore
// destination in the auxiliary database, but this name is already
// in use by the target database.
// *Action: Use the CONFIGURE AUXNAME command to specify a name for the data
// file that does not conflict with a file name in use by the
// target db. -
Can't restore backup, I don'find the right format to use for date with RMAN
Hi I would like to restore my database to a point in time but I can't because I am not able to find the NLS_DATE_FORMAT to use.
I don't know how to alter the session parameters at the RMAN prompt
I would like to restore to this time set until time 'May 10 2006 08:48:10';
Can't some one just tell me how to use thise settings? Please it is urgentI am on Debian
SQL> show parameter NLS_DATE_FORMAT;
NAME TYPE VALUE
nls_date_format string
SQL> select sysdate from dual;
SYSDATE
10-MAY-06
RMAN> sql "alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'";
using target database control file instead of recovery catalog
sql statement: alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 05/10/2006 10:21:44
RMAN-10015: error compiling PL/SQL program
RMAN-10014: PL/SQL error 103 on line 4 column 57: Encountered the symbol "HH24" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not rem
=> .. <an exponent (**)> <> or != or ~= >= <= <> and or like
LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_
For sure I am stupid but why is it so difficult to just set the time -
Not able to create a database link using the database gateway of oracle 11g
HI,
While trying to create a database link to SQL server from Oracle ,using the database gateway provided with 11g, i am getting the following error while making use of it in selecting columns from tables :
Error starting at line 1 in command:
select * from test1@dblink
Error at Command Line:1 Column:20
Error report:
SQL Error: ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from DBLINK
These are the steps i have followed for setting up:
1.Ran the set up for the Database gateway.and mentioned the SQL server name and database .ALos set up a listener.
2. Added the following in the Listener.ora of Oraclehome 11/NETWORK/ADMIN:
LISTENER_SQL_FCD =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost) (PORT = 1541)
SID_LIST_LISTENER_SQL_FCD =
(SID_LIST =
(SID_DESC =
(SID_NAME=dg4msql)
(ORACLE_HOME= D:\app\20537\product\11.1.0\db_3)
(PROGRAM=dg4msql)
3.Added the following in tnsnames.ora inOracle home/NETWORK/ADMIN:
dg4msql=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1541))
(CONNECT_DATA=(SID=dg4msql))
(HS=OK)
4. Following is the entry in initdg4msql.ora in C:\product\11.1.0\tg_5\dg4msql\admin:
HS_FDS_CONNECT_INFO=10.148.45.242:1433//SalesDemo
HS_FDS_TRACE_LEVEL=DEBUG
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
5. Created the database link :
create database link dblink
connect to "sa" identified by "<pswd>"
using 'dg4msql'
On running :select * from test1@dblink i get the following error:
Error starting at line 1 in command:
select * from test1@dblink
Error at Command Line:1 Column:20
Error report:
SQL Error: ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from DBLINK
Is there any issue with the set or definition that I get the above error?What is the version of the Oracle database in which you have specified/and use the database link?
If it is for example 10.2.0.3.0 you need to apply the mandatory patch for RDBMS bug 5965763 first before being able to use an 11g gateway. Have a look at MetaLink note 457808.1 for details about this patch.
Regards,
Ed -
Can I use flashback database to recover it?-----QNo.115
I have dropped a tablespace through RESETLOGS.
Can I use flashback database to recover it?-----5.3.1 Limitations of Flashback Database
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb003.htm -
ORA-01124: cannot recover data file 1 - file is in use or recovery
I am trying to recover standby database, but it is giving the below error.
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use or recovery, recovery is already stated
ORA-01110: data file 1: 'I:\ORACLE\QAS\SAPDATA1\SYSTEM_1\SYSTEM.DATA1'
when i checked in the alert log the recovery is not started. and later i hae given "alter database recover cancel' and the command end up with the below line
"media recovery not started".
it seems that the recovery has stuck in between.
please advise me how to kill the recovery session that's stuck. because i dont want to bounce the standby database.
thanks in advance.Without dataguard and MRP, you are running a scripted standby.
In a scripted standby, a RECOVER DATABASE session would have an UNTIL clause (most likely UNTIL SEQUENCE). At the end of the recovery to that point (SEQUENCE#), it exits and shuts down the database.
Also, the scripting is such that when one RECOVER session is active, another session is not allowed to start. It may loop in wait state or exit and retry at the next scheduled interval.
Apparently your standby scripting is not robust enough to prevent another RECOVER session from starting off even as the first is active (and/or it doesn't have a proper UNTIL clause and stop, exit, shutdown actions)
What you have is a custom implementation of a standby database. Without complete details of the script, the "locking" between sessions (to prevent a second RECOVER from starting when one is already running) etc .... we really cannot do much to help you.
Your scripts should be maintaing status information . It should be possible for you to discover the "other" sqlplus session that has issued a RECOVER DATABASE but not yet exited (e.g. ... how about a simple "ps -ef |grep sql" and "ps -ef | grep ora" combination ??)
Hemant K Chitale
Edited by: Hemant K Chitale on May 29, 2013 5:47 PM -
Restore and recover Oracle 10g database from tape.
I have a very basic question for restore and recover Oracle 10g database. Our envirnment settings are:
Oracle 10g on Unix, daily database and archivelog backup to Vista NetBackup server. Retention policy is 2. Old backup files are copied from NetBackup server to the tape for record keeping.
I want to restore a database to a point in time. Because our retention policy is setup to 2. The backup files I need have been copied to the tape. So I should ask SYSTEM ADMIN to copy the backup files back to NetBackup server disk or I can ask him to copy backup files to the Unix server that host my Oracle 10g database. Then I can use Rman to do restore and recover. Is this doable? I know normal procedure is to copy backup files I need back to NetBackup server disk, not directly back to database server. Please put your comments here as early as better. I do appreciate your kind help.853153 wrote:
I have a very basic question for restore and recover Oracle 10g database. Our envirnment settings are:
Oracle 10g on Unix, daily database and archivelog backup to Vista NetBackup server. Retention policy is 2. Old backup files are copied from NetBackup server to the tape for record keeping.
I want to restore a database to a point in time. Because our retention policy is setup to 2. The backup files I need have been copied to the tape. So I should ask SYSTEM ADMIN to copy the backup files back to NetBackup server disk or I can ask him to copy backup files to the Unix server that host my Oracle 10g database. Then I can use Rman to do restore and recover. Is this doable? I know normal procedure is to copy backup files I need back to NetBackup server disk, not directly back to database server. Please put your comments here as early as better. I do appreciate your kind help.For sure it is double work, To copy backup files on UNIX host.
Are you using catalog or nocatalog?
If the backup information is out of retention, Catalog them again also in netbackup.
So that you can able to restore database directly without copying those files to host. -
Recover oracle 9i without backup
we have HP for network mointoring and at backend we using 9i oracle ok and whats happened actully we have OS cluster here and the cluster machine was down from last 4 month i boot it after booting... mine oracle 9i crashed on oracle9i there was 2 databases one was Ovpi and one was SD
as sort we done configured Rman and backup archive files + control files
with the help of that we have recoverd OVPI successfuly but now we dont have backup of arcive files for SD backup is upto date so can when i run revover database; command its shows error for system01.dbf and wants to read some archive file that isuch as archive_sd_1550.log
but the latest archive file in directory is archive_sd_1549.log
So plz help me how can i recover this one
Regards,
Kamran J. ChaudhryCrashed term is broad spectrum ,whenver the word crash comes it means you may lost controlfile or datafiles or redolog files or yours database block get corrupted or so on and on...As you mentioned yours server crashed its a question mark on every reader that what you crashed?
what it gives error when you try to open the database?
There is no thumb rule for recovering the database it alls depends on scenario.Crashing is not scenario ,scenario is losing controlfiles,datafile or logfiles.Please find out exactly what you lost ,if you identify what you lost then you can be ahead what to recover,otherwise just "crashing" and restoring and recovering the whole database is totally wastage of time as well lead to failure to recover the database sometime.
Khurram -
R3trans finished 0012 / cannot recover data file 1 file is in use or recove
Hi
After a system Cloning from PRD to SandBox, SAP doesn't start any more :
/usr/sap/SID/SYS/exe/run/startdb: Terminating with error code 12
DB startup failed
On the other hand, I can start the database manually, but SAP still doesn't connect to the DB.
The R3trans -d returns the following :
2EETW169 no connect possible: "maybe someone set invalid values for DIR_LIBRARY ('/usr/sap/SID/SYS/exe/run') or dbms_type ('ORA')"
R3trans finished (0012).
DIR_LIBRARY is correctly set.
I tought may be the databse is inconsistent, so I tried to recover the it.
The recover command doesn't work too :
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use or recovery
ORA-01110: data file 1: '/oracle/SID/sapdata1/system_1/system.data1'
I shall be very grateful to you for any help !
RegardsHi,
DB was started with "startup"
trans.log
4 ETW000 R3trans version 6.14 (release 701 - 23.07.10 - 09:23:00).
4 ETW000 ===============================================
4 ETW000
4 ETW000 date&time : 24.08.2011 - 14:15:28
4 ETW000 control file: <no ctrlfile>
4 ETW000 R3trans was called as follows: R3trans -d
4 ETW000 trace at level 2 opened for a given file pointer
4 ETW000 [dev trc ,00000] wed aug 24 14:15:28 2011 106 0.000106
4 ETW000 [dev trc ,00000] db_con_init called 11 0.000117
4 ETW000 [dev trc ,00000] create_con (con_name=R/3) 30 0.000147
4 ETW000 [dev trc ,00000] Loading DB library '/usr/sap/SID/SYS/exe/run/dboraslib.o' ... 37 0.000184
4 ETW000 [dlux.c ,00000] *** ERROR => DlLoadLib()==DLENOACCESS - dlopen("/usr/sap/SID/SYS/exe/run/dboraslib.o") FAILED
4 ETW000 " 0509-022 Cannot load module /usr/sap/SID/SYS/exe/run/dboraslib.o.
4 ETW000 0509-150 Dependent module libclntsh.a(shr.o) could not be loaded.
4 ETW000 0509-022 Cannot load module libclntsh.a(shr.o). 1360 0.001544
4 ETW000 0509-026 Syste" (errno=2,No such file or directory)
4 ETW000 [dbcon.c ,00000] *** ERROR => Couldn't load library '/usr/sap/SID/SYS/exe/run/dboraslib.o'
4 ETW000 69 0.001613
2EETW169 no connect possible: "maybe someone set invalid values for DIR_LIBRARY ('/usr/sap/SID/SYS/exe/run') or dbms_type ('ORA')"
Thanks -
Connecting to Oracle DB on Ubuntu 8.04 using SQL Developer
Hi,
I managed to install Oracle 11g on Ubuntu 8.04 using this guide:
http://www.pythian.com/blogs/968/installing-oracle-11g-on-ubuntu-804-lts-hardy-heron
But I don't remember the Username or SID, that's why I keep on getting ORA-12505 from SQL DEVELOPER
How can I get those missing informations?But I don't remember the Username or SIDAssuming your DB is up and running, you can find out the SID by :
$ ps -ef | grep smon | grep -v grep
oracle 15298 1 1 10:59 ? 00:00:00 ora_smon_db11
$ here db11 is the SID.
About username, you can create one. Use Sql*Plus and OS authentication :
$ export ORACLE_SID=<your SID>
$ sqlplus / as sysdba
SQL> CREATE USER
Maybe you are looking for
-
Mini DVI to Video Adapter - S-Video Resolutions / HDMI
Hello, I just got my Mini DVI to Video Adapter and I using a S-Video cable to plug to my HD LCD 32'' TV. When I connect everything, the resolution drops from 1280x800 to 1024x768. How can I change back to 1280x800? I don't know but I'm kind of disapp
-
Unable to update software 4.3.5 server timed out?
When I attempt to update my iphone with new software update 4.3.5 on itunes, system will attempt to download and after at least an hour it states "There was a problem downloading the software for the iphone. Network connection timed out. Make sure y
-
JComboBox addActionListener?
Hi, I'm trying to write a program so that when the user makes a selection from the combobox, the selection will be inputted into a string. However, whenever I try to run the program it gives me this error: "Questions.java": addItemListener(java.awt.e
-
9630 Tour circle with a number 2 beside it
Hi, Just another query about how to delete the circle with the downward left arrow with a 2 beside it. I did a reboot when the 1 with the circle wouldn't go away after ensuring my messages were empty from the WAP push folder, but still no avail. Othe
-
ABAP dictionary reguarding appending structure
Hi, Myself Rohit. please tell me how to append a structure in a table .