Do I need put VALIDATE DATABASE in RMAN? I have crosscheck backup
Does the Crosscheck backup tell if a database has corruption? do I need run command validate database?
Hello,
This is the Berkeley DB forum. One of the forums found via the "Forum Home" link in the upper left of this page might be more helpful.
Thanks,
Sandra
Similar Messages
-
Need to restore database to last week
Hi,
I am running 10g on Linux, and last week someone messed up a database and it needs to be restored to 27 December.
I am not a DBA, out regular DBA is on vacation till mid January, I have been tasked with this because I am the next most knowledgeable person (which is not much!).
I know we have archivelog on (I can see .arc files for the database), and I also have a backup of the actual data files and control files from when the database was first created. So in other words, I have all archive files and the initial data files.
What i do not know is how to set the restore till December 27. If someone could help, that would be appreciated.
PS, I know the DBA uses RMAN too, so maybe that can be used for this?
Thanks.user8973806 wrote:
So would I need to use RMAN then, and I cannot do it using just sqlplus?
Do you know of an example in some blog or something where something similar is done?
Please note, I am not using any tape drives, I will be copying the original datafiles to the box and so how will RMAN know where the original files are?
Sorry, I am not a DBA, and I have never used RMAN, and so I just need some assistance that is a bit more concise - reading all the manuals is not really feasible, I need some example that is similar to the problem I am encountering.
Thanks.Probably your best course of action would be to open an SR with Oracle Support and get them to help walk you through the process. There are a lot of details to be worked out and you don't want to dig your hole any deeper. The very first thing you want to do is shut down the database and copy all data files, all control files, all init and spfile to a safe location. To get a list of data files and control files
sql> select file_name from dba_data_files;
sql> show parameter controlThis will at least allow you to get back to where you are now if something should go wrong. -
Create Standby Database using RMAN changing backuppiece location ID753902.1
[https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=753902.1] I am trying to create standby using above document however when I do recover database I get below error
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/06/2011 13:50:40
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1899 and starting SCN of 25926696
logsequence 1899 is very very old sequence and doesnt exist on primary.this sequence is not needed because backu pwas taken after this sequence so I dont undrestand why rman is asking for a sequence that doesnt exists?
my db is 11.2 and in archivelog mode , i have all the archivelogs from the date backup was taken until now...
thanks
Edited by: user9198889 on Jul 6, 2011 8:29 AMCKPT wrote:
user9198889 wrote:
[https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=753902.1] I am trying to create standby using above document however when I do recover database I get below error
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/06/2011 13:50:40
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1899 and starting SCN of 25926696
logsequence 1899 is very very old sequence and doesnt exist on primary.this sequence is not needed because backu pwas taken after this sequence so I dont undrestand why rman is asking for a sequence that doesnt exists?
my db is 11.2 and in archivelog mode , i have all the archivelogs from the date backup was taken until now...
thanks
Edited by: user9198889 on Jul 6, 2011 8:29 AMHave you restored from the recent backup?
validate the backup compeltion_time and then retry the operation, Are you restoring from tapes?yes its recent backup(last and only backup infact ) , the backup took couple of days to run..
the backup was executing using this command BACKUP INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET DATABASE TAG 'LEV1_BCKP_2011-06-27_11_54' PLUS ARCHIVELOG DELETE INPUT
there was no full backup so oracle must have taken full one and not incremental correct?
first logseq that was back's up is : 35818
primary uses local disk for its db and backup
standby that i am trying to create is on asm. i have copied backup to FRA and restored to +data its recovery that is failing now -
Need to validate a existing field in the table maitainence Generator events
Hi EXPERTS,
There is one Z-table and for that TMG also there. There is custom transaction for sm30. Now I need to validate one field BNAME for new entries I have created event -05(creating new entry) it is validating correctly. But now another requirement is if user also wants to change the existing values for the field BNAME it should also be validated needs to populate error mesg and does not allow to save it. I used event 01(before saving data) 07 ( before correcting the contents of selected field) 18 ( after checking whether data has changed)but not working any of these events. Please suggest me which event is suitable for my requirement. Orelse I need to put the code in the flow logic of the screen under PAI module I think this is not a good practice.
Code:
FORM data_changed.
DATA : l_bname TYPE xubname.
CONSTANTS: c_mesg TYPE char16 VALUE 'Invalid SAP User',
c_error TYPE char1 VALUE 'E'.
* Validation on BNAME field
IF zps_capex_appr-bname IS NOT INITIAL.
SELECT SINGLE bname FROM usr01 INTO l_bname
WHERE bname = zps_capex_appr-bname.
IF sy-subrc NE 0.
MESSAGE c_mesg TYPE c_error.
ENDIF.
ENDIF.
ENDFORM. "DATA_CHANGED
Please suggest me how to proceed.
<Added code tags>
<< Priority normalized >>
Awaiting for your replyu2026
Thanks in Advance..
Edited by: Rob Burbank on Mar 2, 2012 9:23 AMHello Sreekanth,
How are you populateing the field zps_capex_appr-bname ? I'm pretty much sure that this is not getting populated at runtime.(put a break-point & check)
In order to access the data in the TMG [Event01|http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f0ba9d111d1a5690000e82deaaa/content.htm], we have to use the TMG system tables - TOTAL & EXTRACT.
If your validation of BNAME fails, remember to:
1. Set SY-SUBRC to a non-zero value,
2. Set the flag VIM_ABORT_SAVING to 'X'.
BR,
Suhas -
How do I move databases using RMAN with minimal downtime ?
How can I do the following using RMAN ?
DB version 10.2.0.4
Redhat 5.2
I am not using an rman catalogIn the past I have moved large databases from 1 server to another with 5 minutes downtime using backups done the old way by putting tablespaces in backup mode and making copies of the datafiles.
I used the following method :
========> Part 1
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE set DATABASE "VPMY" RESETLOGS ARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 3
....etc
LOGFILE
......... log file names
DATAFILE
... list of datafiles
CHARACTER SET US7ASCII;
========> Part 2
Up until the scheduled downtime, I would copy the archive logs from the production server to the new and run the following to apply the latest archive logs:
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
->AUTO<-
========> Part 3
After applying the last archive log while in restrict mode -
ALTER DATABASE OPEN resetlogs;
My question is, how do I do Part 2 in RMAN. I have managed to duplicate databases and restore databases using rman to a different server, but this obviously only covers the data upto the backup point. How can I do the above parts 1 -3 with downtime of about 5 minutes like I have done using old methods ?
Any help is much appreciated/you should be able to recover as you go with rman as well..
copy the archived logs from A to B and apply them as they come in.
run
set until sequence x thread 1;
recover database;
if you're not opening the database after recovery you can just increment the set until sequence as the logs come in and do a new recovery. -
I got the above error while i restore the standby database using RMAN backu
Dear All,
RMAN> crosscheck archivelog all;
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=14 devtype=DISK
specification does not match any archive log in the recovery catalogi got the above error while i restore the standby database using RMAN backup from production.
Help need.i take the backup without catalog database.
regards,
DBrman> list backup;
it shows lengthier but i showed only the corresponding
BS Key Type LV Size Device Type Elapsed Time Completion Time
3479 Full 17G DISK 01:29:42 09-FEB-13
BP Key: 3479 Status: AVAILABLE Tag: 09FEB13_FULL_ESMSRV1_DB
Piece Name: /oradatabkp/rman/esmsrv1_full_db_09feb13
SPFILE Included: Modification time: 08-FEB-13
List of Datafiles in backup set 3479
File LV Type Ckp SCN Ckp Time Name
1 Full 1759250260 09-FEB-13 /esmsrv1/dbs/system01.dbf
2 Full 1759250260 09-FEB-13 /esmsrv1/dbs/undotbs01.dbf
3 Full 1759250260 09-FEB-13 /esmsrv1/dbs/cwmlite01.dbf
4 Full 1759250260 09-FEB-13 /esmsrv1/dbs/drsys01.dbf
5 Full 1759250260 09-FEB-13 /esmsrv1/dbs/example01.dbf
6 Full 1759250260 09-FEB-13 /esmsrv1/dbs/indx01.dbf
7 Full 1759250260 09-FEB-13 /esmsrv1/dbs/odm01.dbf
8 Full 1759250260 09-FEB-13 /esmsrv1/dbs/tools01.dbf
9 Full 1759250260 09-FEB-13 /esmsrv1/dbs/users01.dbf
10 Full 1759250260 09-FEB-13 /esmsrv1/dbs/xdb01.dbf
11 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_default_seg_001.dbf
12 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_property_ind_seg_001.dbf
13 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_property_seg_001.dbf
14 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_upload_ind_seg_001.dbf
15 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_upload_seg_001.dbf
16 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_rate_ind_seg_001.dbf
17 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_rate_seg_001.dbf
18 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_ind_seg_001.dbf
19 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_001.dbf
20 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_001.dbf
21 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_002.dbf
22 Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_002.dbf
23 Full 1759250260 09-FEB-13 /esmsrv1/dbs/perfstat_001.dbf
39 Full 1759250260 09-FEB-13 /esmsrv1/dbs/oem_repository.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
3480 Full 17G DISK 01:21:30 09-FEB-13
BP Key: 3480 Status: EXPIRED Tag: TAG20130209T200021
Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_full_Feb09
SPFILE Included: Modification time: 08-FEB-13
List of Datafiles in backup set 3480
File LV Type Ckp SCN Ckp Time Name
1 Full 1759422265 09-FEB-13 /esmsrv1/dbs/system01.dbf
2 Full 1759422265 09-FEB-13 /esmsrv1/dbs/undotbs01.dbf
3 Full 1759422265 09-FEB-13 /esmsrv1/dbs/cwmlite01.dbf
4 Full 1759422265 09-FEB-13 /esmsrv1/dbs/drsys01.dbf
5 Full 1759422265 09-FEB-13 /esmsrv1/dbs/example01.dbf
6 Full 1759422265 09-FEB-13 /esmsrv1/dbs/indx01.dbf
7 Full 1759422265 09-FEB-13 /esmsrv1/dbs/odm01.dbf
8 Full 1759422265 09-FEB-13 /esmsrv1/dbs/tools01.dbf
9 Full 1759422265 09-FEB-13 /esmsrv1/dbs/users01.dbf
10 Full 1759422265 09-FEB-13 /esmsrv1/dbs/xdb01.dbf
11 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_default_seg_001.dbf
12 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_property_ind_seg_001.dbf
13 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_property_seg_001.dbf
14 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_upload_ind_seg_001.dbf
15 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_upload_seg_001.dbf
16 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_rate_ind_seg_001.dbf
17 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_rate_seg_001.dbf
18 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_ind_seg_001.dbf
19 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_001.dbf
20 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_001.dbf
21 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_002.dbf
22 Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_002.dbf
23 Full 1759422265 09-FEB-13 /esmsrv1/dbs/perfstat_001.dbf
39 Full 1759422265 09-FEB-13 /esmsrv1/dbs/oem_repository.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
3481 Full 4M DISK 00:00:03 09-FEB-13
BP Key: 3481 Status: AVAILABLE Tag: TAG20130209T212205
Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_controlfile_copy_Feb09
Controlfile Included: Ckp SCN: 1759462488 Ckp time: 09-FEB-13
BS Key Type LV Size Device Type Elapsed Time Completion Time
3482 Full 0 DISK 00:00:01 09-FEB-13
BP Key: 3482 Status: AVAILABLE Tag: TAG20130209T212212
Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_spfile_copy_Feb09
SPFILE Included: Modification time: 08-FEB-13
ls -l /oradatabkp
root@drsrv1#ls -l /oradatabkp
total 1108672
drwxr-xr-x 2 ovsd dba 96 Sep 27 2009 alert_bkp
-rw-r--r-- 1 oracle dba 195 Mar 15 2007 create.sql
drwxr-xr-x 2 oracle dba 8192 Aug 7 2009 ctrl_bkp
-rw-r--r-- 1 root sys 565114880 Apr 24 2007 drsrv1.tar
drwxrwxrwx 2 root sys 96 Jun 17 2011 drsrv2-ignitebkp
drwxr-xr-x 4 root sys 96 Apr 24 2007 esmsrv1
-rw-r----- 1 root sys 1613824 Feb 22 2007 esmsrv1stby.ctl
-rw-r--r-- 1 esmsrv1 dba 5120 Dec 31 2009 esmtables.dmp
-rw-r--r-- 1 esmsrv1 dba 538 Dec 31 2009 esmtables.log
drwxrwxrwx 4 root sys 8192 Mar 10 2009 export
drwxr-xr-x 8 root sys 8192 Apr 24 2007 finalbackup
-rw-r--r-- 1 oracle dba 3820 Sep 5 2008 invalid.sql
-rw-r--r-- 1 esmsrv1 dba 303104 Dec 31 2009 kirdevports.dmp
-rw-r--r-- 1 esmsrv1 dba 591 Dec 31 2009 kirdevports.log
drwxr-xr-x 2 root root 96 Feb 12 2007 lost+found
-rw-r--r-- 1 oracle dba 24954 Aug 9 2009 ovcontrol-090909.ctl
drwxr-xr-x 22 root sys 8192 Apr 24 2007 ovpi
drwxr-xr-x 2 oracle dba 8192 Aug 7 2009 pfile_bkp
drwxrw-rw- 4 oracle dba 8192 Feb 10 15:25 rman
drwxr-xr-x 28 root sys 8192 Feb 1 17:15 schedbkp
drwxr-xr-x 2 oracle dba 8192 Jul 11 2011 sdnnm
-rw-r--r-- 1 esmsrv1 dba 2196 Dec 31 2009 srirdevports.log
drwxr-xr-x 2 oracle dba 96 Mar 13 2009 statsreport
-rw-r--r-- 1 oracle dba 966 Mar 15 2007 tbs.sql
drwxr-xr-x 5 oracle dba 96 Mar 16 2007 testov
drwxr-xr-x 2 root sys 442368 Mar 11 2009 trendadm_files
root@drsrv1#ls -l /oradatabkp/rman
total 37244448
drwxr-xr-x 2 oracle dba 8192 Feb 10 15:25 esmsrv1
-rw-r----- 1 oracle dba 19068198912 Feb 9 14:21 esmsrv1_full_db_09feb13
drwxrw-rw- 2 oracle dba 8192 Feb 9 21:36 openview
-rw-r--r-- 1 oracle dba 920442 Feb 9 21:37 rmanbkp-all.log -
Creation of Logical Standby Database Using RMAN ACTIVE DATABASE COMMAND
Hi All,
I am in confusion how to create logical standby database from primary database using rman active database command.
What i did:-
Create primary database on machine 1 on RHEL 5 with Oracle 11gR2
Create standby database on machine 2 on RHEL 5 With Oracle 11gR2 from primary using RMAN active database command
Trying to create logical standby database on machine 3 on RHEL 5 with Oracle 11gR2 using RMAN active database command from primary.
The point which confuse me is to start the logical standby in nomount mode on machine 3 with which pfile like i create the pfile for standby database do i need to create the pfile for logical standby db.
I done the creation of logical standby database by converting physical standby to logical standby database
I am following the below mentioned doc for the same:
Creating a physical and a logical standby database in a DR environment | Chen Guang&#039;s Blog
Kindly guide me how to work over the same or please provide me the steps of the same.
Thanks in advance.Thanks for your reply
I already started the logical standby database with pfile in nomount mode. And successfully completed the duplication of database. by mentioning the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameter.
But i am not able to receive the logs on the above mentioned blog i run the sql command to check the logs but getting "no rows selected"
My primary database pfile is:
pc01prmy.__db_cache_size=83886080
pc01prmy.__java_pool_size=12582912
pc01prmy.__large_pool_size=4194304
pc01prmy.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01prmy.__pga_aggregate_target=79691776
pc01prmy.__sga_target=239075328
pc01prmy.__shared_io_pool_size=0
pc01prmy.__shared_pool_size=134217728
pc01prmy.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01prmy/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01PRMY/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01PRMY/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.fal_client='PC01PRMY'
*.fal_server='PC01SBY'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='SERVICE=pc01sby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pc01sby'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='DEFER'
*.log_archive_dest_state_3='DEFER'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
My logical standby pfile is:-
pc01ls.__db_cache_size=92274688
pc01ls.__java_pool_size=12582912
pc01ls.__large_pool_size=4194304
pc01ls.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01ls.__pga_aggregate_target=79691776
pc01ls.__sga_target=239075328
pc01ls.__shared_io_pool_size=0
pc01ls.__shared_pool_size=125829120
pc01ls.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01ls/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01LS/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01LS/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_unique_name='pc01ls'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='LOCATION=/u01/app/oracle/flash_recovery_area/PC01LS/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
Kindly advice over the same -
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. -
Getting Error 'errors found reading piece handle' when restore database in rman
Hi Guru's,
i'm using oracle 11g and 12.1.3 EBS. i need to refresh the test instance using production rman backup. i set all the datafile path and when i restore the database, all the datafiles are restored but end of that it shows some error (backup piece referring production path). please advise. Thanks
i'm using following comands
catalog backuppiece '/PROAPP1/20130623/PROD_DB_okocs65n_33556_1';
run
set newname for datafile '/PRODB01/oraprod/db/apps_st/data/system01.dbf' to '/PROAPP2/HYDUAT/db/apps_st/data/system01.dbf' ;
set newname for datafile '/PRODB01/oraprod/db/apps_st/data/system02.dbf' to '/PROAPP2/HYDUAT/db/apps_st/data/system02.dbf';
restore database;
following are the output
channel ORA_DISK_4: restoring datafile 00403 to /PROAPP2/HYDUAT/db/apps_st/data/a_txn_ind02.dbf
channel ORA_DISK_4: restoring datafile 00406 to /PROAPP2/HYDUAT/db/apps_st/data/a_txn_ind05.dbf
channel ORA_DISK_4: reading from backup piece /backup/DB/rman/20130623/PROD_DB_omocs65n_33558_1
channel ORA_DISK_2: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_okocs65n_33556_1
channel ORA_DISK_2: failover to piece handle=/PROAPP1/20130623/PROD_DB_okocs65n_33556_1 tag=TAG20130623T000509
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 01:05:05
channel ORA_DISK_4: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_omocs65n_33558_1
channel ORA_DISK_4: failover to piece handle=/PROAPP1/20130623/PROD_DB_omocs65n_33558_1 tag=TAG20130623T000509
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 01:13:38
Finished restore at 28-JUN-13>channel ORA_DISK_2: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_okocs65n_33556_1
>channel ORA_DISK_2: failover to piece handle=/PROAPP1/20130623/PROD_DB_okocs65n_33556_1 tag=TAG20130623T000509
Oracle will try the original expected backup location and then failover to the new (cataloged) location. To prevent it from trying the original location that is unavailable, you should also CROSSCHECK BACKUP ALL (and optionally DELETE EXPIRED BACKUP ALL) so that it would mark the original location (/backup/DB/rman/20130623...) as unavailable and not try it at all.
Hemant K Chitale -
Can we put RAC database in Archivelog mode without shutting down
All,
Can we put RAC database in Archivelog mode without shutting down.
Currently our new production database (2 node RAC) is in no archive log mode, Need to enable archive log in the database...
I believe we need to set the cluster_database=false and then put the DB in archive log mode then we need to bounce the database to take effect...
Just curious to know in 11gR2 ...Can we put the RAC database in archive log mode without any downtime ...?Even RAC or non-RAC, database should bounced and enable/disable archive log mode from mount status.
-
Unable to create a duplicat database through rman
Hi,
Oracle Version:10.2.0.1
Operating System:Linux
Here i am having databae KKK and i need to duplicate that databae to vtldb.I take the backup of the KKK database as
rman target /
RMAN>Backup databsase;after that i copied all the bakup sets to my vtldb database in the location '/u01/app/oracle/oradata/vtldb/'.Then i created a new auxiliary channel as
create auciliary channel as device type disk format '/u01/pp/oracle/oradata/vtldb/%U';Then connecting to my auxiliary databae and getting the following error.
[oracle@vtlsys3-143 ~]$ rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Thu Mar 11 13:30:12 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: KKK (DBID=2526957931)
RMAN> connect aucxiliary sys@vtldb_rmandup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "auxiliary, catalog, clone, rcvcat, target"
RMAN-01008: the bad identifier was: aucxiliary
RMAN-01007: at line 1 column 9 file: standard input
RMAN> connect auxiliary sys@vtldb_rmandup
auxiliary database Password:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04006: error from auxiliary database: ORA-01031: insufficient privilegesI create the passowrd file for VTLDB aslo .
Can any one please help me how to solve my problem.
Thanks & Regars,
Poorna Prasad.Hi Anil,
Thanks for your replays.Now i was able to connect to the database.But i am facing another problem.
RMAN> list backup;
RMAN> backup database;
Starting backup at 11-MAR-10
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/kkk/system01.dbf
channel ORA_DISK_1: starting piece 1 at 11-MAR-10
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00003 name=/u01/app/oracle/oradata/kkk/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/kkk/undotbs01.dbf
channel ORA_DISK_2: starting piece 1 at 11-MAR-10
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 03/11/2010 16:36:11
ORA-19504: failed to create file "/u02/rman_bkp/kkk/ora_rbk713378170_s"
ORA-27038: created file already exists
Additional information: 1
channel ORA_DISK_2 disabled, job failed on it will be run on another channel
channel ORA_DISK_1: finished piece 1 at 11-MAR-10
piece handle=/u02/rman_bkp/kkk/ora_rbk713378170_s tag=TAG20100311T163610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/u01/app/oracle/oradata/kkk/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/kkk/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 11-MAR-10
channel ORA_DISK_1: finished piece 1 at 11-MAR-10
piece handle=/u02/rman_bkp/kkk/ora_rbk713378186_s tag=TAG20100311T163610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=/u01/app/oracle/oradata/kkk/users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-MAR-10
channel ORA_DISK_1: finished piece 1 at 11-MAR-10
piece handle=/u02/rman_bkp/kkk/ora_rbk713378201_s tag=TAG20100311T163610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-MAR-10
Starting Control File Autobackup at 11-MAR-10
piece handle=/u02/rman_bkp/rman_ctlbkp/ora_cfc-2526957931-20100311-03 comment=NONE
Finished Control File Autobackup at 11-MAR-10
RMAN> connect auxiliary sys@vtldb
auxiliary database Password:
connected to auxiliary database: VTLDB (not mounted)
RMAN> duplicate target database to vtldb
2> ;
Starting Duplicate Db at 11-MAR-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=159 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=157 devtype=DISK
contents of Memory Script:
set until scn 557331;
set newname for datafile 1 to
"/u01/app/oracle/oradata/vtldb/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/vtldb/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/vtldb/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/vtldb/users01.dbf";
restore
check readonly
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 11-MAR-10
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/11/2010 17:07:11
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restoreRegards,
Poorna Prasad. -
Hi,
1) I've 2 databases, which are scheduled for weekly full online backup(from scheduler/rman) on fri. and sat. respectively, and there is daily incrementally updated backup, plus the archivelogs on both the database.
When I do restore validate database, in one database validate restores the last full online backup, whereas in the other it scans the datafile copies.
I'm just curious as to what algorithm rman follows to validate the database restore?
2) Is there some way to automate this VALIDATE in a script, I'm finding it real pain to first LIST BACKUP SUMMARY, identify BACKUPSET keys, then manually key in to
- VALIDATE BACKUPSET XXXX,XXXX,XXXX
- RESTORE VALIDATE CONTROLFILE
- RESTORE VALIDATE SPFILE
- RESTORE VALIDATE ARCHIVELOG FROM TIME 'XX-XXX-XX'
- RESTORE VALIDATE DATABASE>>
When I do restore validate database, in one database validate restores the last full online backup, whereas in the other it scans the datafile copies.
>>
What do you mean by datafile copies? Are you talking about RMAN image copies?
RESTORE... VALIDATE causes RMAN to select existing backups that it would use to perform a RESTORE operation, and scan them all to ensure that they are present and free of corruption.
RESTORE... PREVIEW identifies the backups which RMAN will use to perform any RESTORE operation. Output from a RESTORE... PREVIEW is in the same format as the output of the LIST command.
Oracle prefers image copies over backupsets, if exists, for restore and recovery.
Jaffar -
Hi,
I wanted to perform the first backup with RMAN and I used this command and I got error:
RMAN> BACKUP AS COPY DATABASE;
"can not backup or copy active file in noarchivelog mode".
But in order to turn on the log_mode to ARCHIVELOG, first I need to do shutdown the db and perform the backup. Right?
So how can I get my first backup using RMAN if the log mode is in NOARCHIVELOG mode?
I also performed this command successfully...
RMAN> configure controlfile autobackup on;
new RMAN configuration parameter are successfully stored...
but I'm not sure the controlfiles are being backed up. How can I verify this and where I can find the controlfile backup file?
Thanks,So how can I get my first backup using RMAN if the log mode is in NOARCHIVELOG mode?You can do RMAN backups with DB in NOARCHIVELOG mode, but the DB must be MOUNTED and not OPEN. You can do something like the following :
$ $ORACLE_HOME/bin/rman nocatalog
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Feb 9 01:18:08 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target
connected to target database: DB102 (DBID=XXXXXXXXX)
using target database control file instead of recovery catalog
RMAN> run { allocate channel d1 type disk;
2> shutdown;
3> startup mount;
4> configure controlfile autobackup on;
5> backup database;
6> sql 'alter database open';
7> }
I'm not sure the controlfiles are being backed up. How can I verify this and where I can find the controlfile backup file?
RMAN> list backup of controlfile; -
How to put a Database Backup on hold
I am not sure if this is the right forum but this is my question.
I have a 11g database that is running a backup that was setup with 11g Database control. How can I put this on hold.It is important to specify the OS your are working with, as well as further specify, which kind of backup are you performing? Is it a logical backup by means of datapump? or is it a physical backup by means of recover manager?
If this is a recovery managed backup, then this will continue until you kill the associated process id at the OS or if it encounters an exception that prevents rman from accomplishing the backup task.
If it happens to be a logical backup with the regular export command, no way it will naturally end or it wil fail by either killing it or by finding an exceptional condition as well.
If you are using an export datapump logical backup, then you can attach to the job and set it on hold, at a later time re-attach to it and resume it.
Commands provided for this task are:
ATTACH [=[schema_name.]job_name]
STOP_JOB[=IMMEDIATE]
CONTINUE_CLIENT
Further details and usage syntax can be found at --> Oracle® Database Utilities
10g Release 2 (10.2)
Part Number B14215-01
Ch. 2 Data Pump Export
~ Madrid -
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
Maybe you are looking for
-
Filename text remains highlighted
In the finder, it's very hard to edit filenames because the filename highlighting stays on (yellow on my system) and the cursor position does not move when I click to a different position in the name. Using arrow keys does not move the cursor positio
-
Add Gmail account with custom domain to mail, please show step by step instructions
a
-
Compute avg of a column in Master detail
Hello, How can I compute Avg for a particular column in a Master detail report. I need the avg(sal) to be displayed at the end of the report similar to sum(reports total). Can anyone help me out with this issue. thanks.
-
I looked in adobe lens profile creator and was unable and could not find a profile for Nikon D90 camera and Nikkor 300mm prime lens ! Where else to look and find what I'm looking 4 ?
-
Does anybody know how to access modem?
Hi, Q: What API should I use to implement modem dialer functionality,basically to access Internet (PPP), only dialer functionality is required? How to access modem dialing functions in Java? thanks.