RMAN Scripts for 9i RAC
We have just recently started to use Oracle 9i RAC on Red Hat linux 2.1. And we are going to use RMAN for backing up the archived logs.
Currently we have 2 node cluster and the archived logs of respective nodes are on their respective local hard disk. e.g for node1 logs are archived on /arch1 and for node2 on /arch2 individually.
Can I have some sample RMAN scripts for backing and restoring the logs of this individual nodes.?
An early guidance is highly appreciated.
Thanks
you can use the same scripts as you where running before you upgraded to RAC. The main difference is that to distribute the load you can allocate channels from other nodes. A simple backup could be done as follows:
#rman
#connect target /
#connect catalog rman/cat@cat
#run{
#allocate channel ch1 type sbt_tape;
#allocate channel ch2 type sbt_tape;
#configure channel 1 device type 'SBT_TAPE' connect = 'node 1'
#configure channel 2 device type 'SBT_TAPE connect = 'node 2'
#backup database;
that will work (he says) but thats the main difference, remember oracle only recommend you allocate the same number of channels as you have devices (EG if you have 2 tape drives you can allocate 2 channels to maximize effiantcy)...
hope this helps a bit,
Marky Mark...
Similar Messages
-
RMAN script for RAC Hot Backup
Anyone who want to share an RMAN script to Hot Backup a 9i RAC Database.
Try to remove the DURATION option in your script.
Here more details about that part.
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1010261
Bye, Aron -
RMAN script for hot backup (looking for code critic) code attached.
Hello Guru's,
I have been having soem trouble running a successful hot full rman backup nightly.
We max our CPU load whenever our RMAN takes too long and conflicts with a Legato tape backup. I have a development server that I attempted to get a consistent backup time duration that is rock solid as to not conflict with the Legato backup time.
I just found out about duration with RMAN scripts here is my code:
#!/bin/bash
#rman backup script for daily hot whole database backup
at -f /hd1/rman_scripts/rman_backup 0600 tomorrow
rman target/
run {
allocate channel d1 device type disk format '/path/%U';
backup duration 1:00 partial minimize load database filesperset 1;
backup as BACKUPSET tag '%TAG' database;
backup as BACKUPSET tag '%TAG' archivelog all delete all input;
delete noprompt obsolete;
release channel d1;
exit
It completes the backup, but does not use the 1 hour allocated- it only uses 15 minutes on average and creates many files instead of normally three backup files.
Here is the results from querying the v$rman_status table for operation,status,start_time:
RMAN,FAILED, 17-OCT-06 0600
BACKUP,FAILED,17-OCT-06 0600
RMAN,FAILED,17-OCT-06 0606
BACKUP,COMPLETED,17-OCT-06 0606
BACKUP,COMPLETED,17-OCT-06 0606
BACKUP,FAILED,17-OCT-06 0615
RMAN,COMPLETED,17-OCT-06 1513
REPORT,COMPLETED,17-OCT-06 1513
DELETE,COMPLETED,17-OCT-06 1513
However, the timestamps of the backupset files it creates is:
06:15 and not 1513?????????????
RMAN appears to have only taken 15 minutes to create the files, why do I have a completed timestamp from v$rman_status of 1513???
Please advise and comment, I am just learning RMAN.Try to remove the DURATION option in your script.
Here more details about that part.
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1010261
Bye, Aron -
We have decided to abandon user managed hot backups and go with RMAN. Could you critizize the following approach and see if we are missing anything? I am making whole database backup and controlfile and archivelogs. I am using RMAN catalog.
In a Unix script setting all of the environment variables and then
connect target ********
connect catalog *********
configure snapshot controlfile to '${ORACLE_HOME}/snapshot_${ORACLE_SID}_${TIMESTAMP}_ctl';
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup database plus archivelogs;
release channel c1;
release channel c2;
p.s. control file autobackup is on
Also, I have these questions:
1. How do I direct the output of this backup to a file?
2. Is there a way to check for errors within this file to see if the backup went ok?
3. Would anyone have a unix shell script example of the above?
4. How do I make sure that catalog is synched with control file and what is on the file system?
5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
thank you for any input!Hi,
You didnot mention the db version, assumed it's 10g.
If you planned to schedule this job at os level, you might use crontab (unix). The snapshot controlfile config can set with catalog once, so it's not needed to include in your backup script. Like wise your retention can set as "recovery window of 7 days".
1. How do I direct the output of this backup to a file?
==> inside rman script you might use the following command,
set log to '/home/oracle/rmanbkp.log';
2. Is there a way to check for errors within this file to see if the backup went ok?
==> you might check in the logfile for ORA- and RMAN- errors.
3. Would anyone have a unix shell script example of the above?
I use to schedule this job either by OEM or crontab using rman script file.
4. How do I make sure that catalog is synched with control file and what is on the file system?
RMAN will do auto sync with controlfile.
5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
Upon successful backup you may delete the archivelogs or you might decide to keep it for 7 days and then delete by applying "delete obsolete" command.
Thanks,
Nirmal -
RMAN Script & RMAN Configuration
Dear All,
This is the first time i am using RMAN. i just wanted to execute the following RMAN script for a testing purpose, for this what are the RMAN configuration i must have to do before executing this script below:
RMAN> run {
shutdown immediate;
startup mount;
backup database;
alter database open;
}This is my current setup of RMAN
RMAN> show all;
RMAN configuration parameters for database with db_unique_name DP are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'E:\RMAN\';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\APP\10004\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDP.ORA'; # defaultKindly advice me and give me a very clear study for this above parameters
Regards
HAMEED
Once i execute that script i got this following error :
+RMAN> run {+
+2> shutdown immediate;+
+3> startup mount;+
+4> backup database;+
+5> alter database open;+
+6> };+
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 770019328 bytes
Fixed Size 1374780 bytes
Variable Size 301991364 bytes
Database Buffers 461373440 bytes
Redo Buffers 5279744 bytes
Starting backup at 18-MAY-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=E:\APP\10004\ORADATA\DP\HAMEED01.DBF
input datafile file number=00007 name=E:\APP\10004\ORADATA\DP\ABDUL01.DBF
input datafile file number=00008 name=E:\APP\10004\ORADATA\DP\TEST01.DBF
input datafile file number=00001 name=E:\APP\10004\ORADATA\DP\SYSTEM01.DBF
input datafile file number=00002 name=E:\APP\10004\ORADATA\DP\SYSAUX01.DBF
input datafile file number=00005 name=E:\APP\10004\ORADATA\DP\EXAMPLE01.DBF
input datafile file number=00003 name=E:\APP\10004\ORADATA\DP\UNDOTBS01.DBF
input datafile file number=00004 name=E:\APP\10004\ORADATA\DP\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 18-MAY-11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/18/2011 17:22:30
ORA-19504: failed to create file "E:\RMAN\"
ORA-27038: created file already exists
OSD-04010: <create> option specified, file already exists
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
Edited by: Hameed on May 18, 2011 4:59 AMDear Chinar, can you please varify this below ,, is it correct,, after given your setup i ran this script,,,
Kindly advice me
Regards
HAMEED
RMAN> run
2> {
3> backup current controlfile;
4> }
Starting backup at 18-MAY-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=143 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 18-MAY-11
channel ORA_DISK_1: finished piece 1 at 18-MAY-11
piece handle=E:\RMAN\FULL_06MCLH66_1_1.BK tag=TAG20110518T180910 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-MAY-11
Starting Control File Autobackup at 18-MAY-11
piece handle=E:\RMAN\CFC-796596855-20110518-00 comment=NONE
Finished Control File Autobackup at 18-MAY-11Edited by: Hameed on May 18, 2011 5:55 AM -
RMAN Backup script for RAC Database..please suggest
Hi All,
I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
echo "Shutdown Database";date
srvctl stop database -d PROD
srvctl status database -d PROD
echo "Database shutdown on";date
echo "Mount Database ";date
srvctl start instance -d PROD -i "PROD1" -o mount
srvctl status database -d PROD
echo "Start Full Database Backup on";date
$ORACLE_HOME/bin/rman target / nocatalog <<EOF
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
run{
allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
delete noprompt obsolete;
release channel c1;
release channel c2;
exit
EOF
echo "RMAN Backup Finished on";date
echo "Shutdown Database";date
srvctl stop database -d PROD
echo "Start Database";date
srvctl start database -d PROD
srvctl status database -d PROD
Please share your experiences.
RegardsHi,
Some tweaks for your script.
echo "Shutdown Database";date
srvctl stop database -d PROD
srvctl status database -d PROD
echo "Database shutdown on";date
echo "Mount Database ";date
srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
2. configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
- Pavan Kumar N
3. -
Br,Hi,
DB : 10.2 and 11.2
How to schedule rman backup for cluster in OEM?How to schedule without OEM?
If one of the node failed,Is it possible to run in another node automatcially?
How to schduel export/datadump in rac by oem?
Br,
RajI Am not using oem, without oem you should write several scripts....
for linux hot backup(archive log enabled):
bck.sh
set ORACLE_SID=mydb
set ORACLE_HOME=....
rman target sys/.... @'.../bck.ora'
bck.ora
run
BACKUP AS COMPRESSED BACKUPSET FORMAT "..../db_%d_%T_%s_%p_%U.bak" INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG DELETE INPUT FORMAT "...../archivelogBackup/arch_%d_%T_%s_%p_%U.bak";
delete force noprompt obsolete redundancy 3;
backup FORMAT '..../ctl_%d_%T_%s_%p_%U' current controlfile spfile;
And create executable job which instance_id=1 and will run your bck.sh script and create schedule for this job, when first node will down you must change instance_id attribute to second one, and be sure that all backup paths exists in all nodes.
Ramin Hashimzade -
RMAN script errors out for some DB's
I have a single RMAN script that uses env variables to execute RMAN for two databases. It runs fine. I cloned the two DB's (changed DBID's), all four are on the same host. Now I try to use same script for all four. I receive an error when trying to run against the cloned databases. Here is script:
spool log to full.log append;
connect catalog rman/xxxxxx@iasrman
connect target /
run {
sql 'ALTER SYSTEM SWITCH LOGFILE';
backup incremental level 0 database diskratio=0 plus archivelog delete input;
And here is error, it stops same place everytime, input appreciated.
Recovery Manager: Release 9.2.0.5.0 - 64bit Production
RMAN>
connected to recovery catalog database
RMAN>
connected to target database: PRSMQ02 (DBID=944525168)
RMAN> 2> 3> 4>
sql statement: ALTER SYSTEM SWITCH LOGFILE
Starting backup at 30-MAY-07
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=20 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=19 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=18 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=17 devtype=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: sid=11 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=25 recid=25 stamp=623931644
channel ORA_DISK_1: starting piece 1 at 30-MAY-07
channel ORA_DISK_2: starting archive log backupset
channel ORA_DISK_2: specifying archive log(s) in backup set
input archive log thread=1 sequence=26 recid=26 stamp=623931644
channel ORA_DISK_2: starting piece 1 at 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s59_s1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/q02/archive/prism/log_prsmq02_25.arc recid=25 stamp=623931644
channel ORA_DISK_2: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s60_s1 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_2: deleting archive log(s)
archive log filename=/q02/archive/prism/log_prsmq02_26.arc recid=26 stamp=623931644
Finished backup at 30-MAY-07
Starting backup at 30-MAY-07
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00009 name=/q02/oradata01/prsmdata/Data_13.dbf
input datafile fno=00016 name=/q02/oradata01/prsmdata/Data_20.dbf
input datafile fno=00025 name=/q02/oradata01/prsmdata/Data_04.dbf
input datafile fno=00005 name=/q02/oraindx01/prsmdata/Index_11.dbf
input datafile fno=00020 name=/q02/oradata01/prsmdata/Tools02.dbf
input datafile fno=00022 name=/q02/oraindx01/prsmdata/index_12.dbf
channel ORA_DISK_1: starting piece 1 at 30-MAY-07
channel ORA_DISK_2: starting incremental level 0 datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00010 name=/q02/oradata01/prsmdata/Data_14.dbf
input datafile fno=00015 name=/q02/oradata01/prsmdata/Data_19.dbf
input datafile fno=00024 name=/q02/oradata01/prsmdata/Data_03.dbf
input datafile fno=00003 name=/q02/oratmp01/prsmdata/rbs01.dbf
input datafile fno=00001 name=/q02/orasys01/prsmdata/system01.dbf
input datafile fno=00012 name=/q02/orasys01/prsmdata/system02.dbf
channel ORA_DISK_2: starting piece 1 at 30-MAY-07
channel ORA_DISK_3: starting incremental level 0 datafile backupset
channel ORA_DISK_3: specifying datafile(s) in backupset
input datafile fno=00008 name=/q02/oradata01/prsmdata/Data_12.dbf
input datafile fno=00014 name=/q02/oradata01/prsmdata/Data_18.dbf
input datafile fno=00023 name=/q02/oradata01/prsmdata/Data_02.dbf
input datafile fno=00028 name=/q02/oradata01/prsmdata/Data06.dbf
input datafile fno=00019 name=/q02/oratmp01/prsmdata/rbs02.dbf
input datafile fno=00021 name=/q02/orasys01/prsmdata/DRSYS.dbf
channel ORA_DISK_3: starting piece 1 at 30-MAY-07
channel ORA_DISK_4: starting incremental level 0 datafile backupset
channel ORA_DISK_4: specifying datafile(s) in backupset
input datafile fno=00007 name=/q02/oradata01/prsmdata/Data_11.dbf
input datafile fno=00013 name=/q02/oradata01/prsmdata/Data_17.dbf
input datafile fno=00018 name=/q02/oradata01/prsmdata/Data_01.dbf
input datafile fno=00006 name=/q02/oradata01/prsmdata/Tools01.dbf
input datafile fno=00002 name=/q02/oradata01/prsmdata/Users01.dbf
input datafile fno=00026 name=/q02/oradata01/prsmdata/Data05.dbf
channel ORA_DISK_4: starting piece 1 at 30-MAY-07
channel ORA_DISK_5: starting incremental level 0 datafile backupset
channel ORA_DISK_5: specifying datafile(s) in backupset
input datafile fno=00004 name=/q02/oradata01/prsmdata/Data_15.dbf
input datafile fno=00011 name=/q02/oradata01/prsmdata/Data_16.dbf
input datafile fno=00017 name=/q02/oradata01/prsmdata/Data_22.dbf
input datafile fno=00027 name=/q02/oradata01/prsmdata/Data_05.dbf
channel ORA_DISK_5: starting piece 1 at 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s1 comment=NONE
channel ORA_DISK_1: starting piece 2 at 30-MAY-07
channel ORA_DISK_2: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s1 comment=NONE
channel ORA_DISK_2: starting piece 2 at 30-MAY-07
channel ORA_DISK_3: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s1 comment=NONE
channel ORA_DISK_3: starting piece 2 at 30-MAY-07
channel ORA_DISK_4: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s1 comment=NONE
channel ORA_DISK_4: starting piece 2 at 30-MAY-07
channel ORA_DISK_5: finished piece 1 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s1 comment=NONE
channel ORA_DISK_5: starting piece 2 at 30-MAY-07
channel ORA_DISK_2: finished piece 2 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s2 comment=NONE
channel ORA_DISK_2: starting piece 3 at 30-MAY-07
channel ORA_DISK_1: finished piece 2 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s2 comment=NONE
channel ORA_DISK_1: starting piece 3 at 30-MAY-07
channel ORA_DISK_4: finished piece 2 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s2 comment=NONE
channel ORA_DISK_4: starting piece 3 at 30-MAY-07
channel ORA_DISK_5: finished piece 2 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s2 comment=NONE
channel ORA_DISK_5: starting piece 3 at 30-MAY-07
channel ORA_DISK_3: finished piece 2 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s2 comment=NONE
channel ORA_DISK_3: starting piece 3 at 30-MAY-07
channel ORA_DISK_2: finished piece 3 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s3 comment=NONE
channel ORA_DISK_2: starting piece 4 at 30-MAY-07
channel ORA_DISK_4: finished piece 3 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s3 comment=NONE
channel ORA_DISK_4: starting piece 4 at 30-MAY-07
channel ORA_DISK_1: finished piece 3 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s3 comment=NONE
channel ORA_DISK_1: starting piece 4 at 30-MAY-07
channel ORA_DISK_2: finished piece 4 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s4 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:53:23
channel ORA_DISK_5: finished piece 3 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s3 comment=NONE
channel ORA_DISK_5: starting piece 4 at 30-MAY-07
channel ORA_DISK_3: finished piece 3 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s3 comment=NONE
channel ORA_DISK_3: starting piece 4 at 30-MAY-07
channel ORA_DISK_4: finished piece 4 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s4 comment=NONE
channel ORA_DISK_4: starting piece 5 at 30-MAY-07
channel ORA_DISK_1: finished piece 4 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s4 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:59:04
channel ORA_DISK_3: finished piece 4 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s4 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 01:00:10
channel ORA_DISK_5: finished piece 4 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s4 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 01:00:25
channel ORA_DISK_4: finished piece 5 at 30-MAY-07
piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s5 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 01:01:40
Finished backup at 30-MAY-07
Starting backup at 30-MAY-07
current log archived
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 05/30/2007 11:22:38
RMAN-06004: ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLEconnect target /You need to inform the connection string to target database.
Can to be explicitly or with 'export sid' in your script. -
Rman dataguard script for oracle10g
Dear Friends ,
I am going to configure oracle10g dataguard on oracle wnterprise linux 5.0 . I am trying to do this configuration
using RMAN .
After succesfully configuration of the PRIMARY End as well as I am going to configure standby end .
n the standby end I have to run the below rman script and got the syntax error :
[oracle@server dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 29 12:59:01 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=initstan.ora
ORACLE instance started.
Total System Global Area 217157632 bytes
Fixed Size 2211928 bytes
Variable Size 159387560 bytes
Database Buffers 50331648 bytes
Redo Buffers 5226496 bytes
SQL>
6) Run RMAN and connect to the Standby database and make an auxiliary connection to the Primary database like below :
bash-3.2$ rman target sys@prim
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Mar 24 10:54:37 2000
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database:PRIM (DBID=1247570709)
RMAN> connect auxiliary sys/sys123@stan
connected to auxiliary database: STAN (not mounted)
RMAN
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'prim','stan'
set db_unique_name='prim'
set db_file_name_convert='/u01/app/oracle/oradata/prim/','/u01/app/oracle/oradata/stan/'
set log_file_name_convert='/u01/app/oracle/oradata/prim/','/u01/app/oracle/oradata/stan/'
set control_files='/u01/app/oracle/oradata/stan/control01.ctl','/u01/app/oracle/oradata/stan/control02.ctl','/u01/app/oracle/oradata/stan/control03.ctl'
set log_archive_max_processes='5'
set fal_client='stan'
set fal_server='prim'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(prim,stan)'
set log_archive_dest_2='service=prim ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=prim'
NOFILENAMECHECK
Each and every time when I run the above script got the below error :
RMAN> 2> 3> 4> 5> 6> 7> 8>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "from": expecting one of: "dorecover, db_file_name_convert, nofilenamecheck, ;"
RMAN-01007: at line 9 column 39 file: standard input
RMAN>
RMAN>
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: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
RMAN-01008: the bad identifier was: parameter_value_convert
RMAN-01007: at line 2 column 1 file: standard input
Does anybody please correct the above script for 10g or if there any document for configuring oracle10g dataguard
using RMAN , then please help me .
Thx in advance .. ..shipon_97 wrote:
Dear Friends ,
I am going to configure oracle10g dataguard on oracle wnterprise linux 5.0 . I am trying to do this configuration
using RMAN .
After succesfully configuration of the PRIMARY End as well as I am going to configure standby end .
n the standby end I have to run the below rman script and got the syntax error :
You cannot use FROM ACTIVE DATABASE - option, If your database version is 10g .
Regards
Mahir M. Quluzade -
Hi,
on 10G R2 in AIX 6.1
I'm looking for Shell script for RMAN backup.
Moreover , if we should connect like this :
rman nocatalog target sys/password@myDB << EOF
backup as compressed backupset format '$savdir/ctl_%d_%T_%s_%p' current controlfile;
exit
EOFHow to avoid writting password in shell script ?
Thank you.user522961 wrote:
Can you please tell me in case of having a catalog , how to connect to catalog without writting password in script ? I mean , how to write the following in a way without password :
#!/usr/bin/ksh
export ORACLE_SID=myDB
ORACLE_ENV_ASK=NO
. /usr/local/bin/oraenv
export savedir=/backups/myDB
rman target / << EOF
connect catalog rman/password@myrepository
backup as compressed backupset
format '$savdir/ctl_%d_%T_%s_%p'
include current controlfile;
exit
EOF:p -
Write a ms dos script for rman backup
Hi all,
i wanna write a dos batch file to take the rman backup..
i have written one...actually there are 2 files. one is for login purpose...other one is for sql commands
rman.bat-->
rman target sys/sysadmin@hnbhrm @'c:\rm.sql'
==============================
rm.sql-->
configure retention policy to recovery window of 7 days;
configure controlfile autobackup on;
run {
alter system switch logfile;
crosscheck archivelog all;
crosscheck backupset;
backup database plus archivelog;
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'sysdate -1';
DELETE NOPROMPT OBSOLETE REDUNDANCY = 1;
========================================
but i have problem in first file rman.bat. it doesnt run at all. but if i write sqlplus / as sysdba instead of rman thing.. then it works fine.
can anybody tell me whats happening over there please..? Have i done this correctly? or u have some other simple way to do this...
both files are located in C drive.. and oracle is installed to E drive... oracle path has set already.
can anybody please give me a hand to solve this issue please...
Thanks in Advance,
Maxwrite a ms dos script for rman backupImpossible. rman does not support MS-DOS. It is not a 16bit real mode application that can be run inside the MS-DOS operating system.
So get your terminology straight - the Windows console is a character based 32bit virtual machine. It is not MS-DOS. It never was MS-DOS. Do not confuse the two simply because of superficial similarities. A stick-it note can be yellow - but because it is yellow does not mean it is a banana. -
kindly send the script for RMAN bacup
Hi,
About RMAN backup
http://dbataj.blogspot.com/2007/01/about-rman-backups.html
About RMAN architechture
http://dbataj.blogspot.com/2007/01/recovery-manager-architecture.html
About RECOVERY CATALOG
http://dbataj.blogspot.com/2006/12/recovery-catalog.html
RMAN backup script
http://dbataj.blogspot.com/2007/01/hotfullrmanbkpscirpt.html
above is my own work on RMAN you have to edit according you needs.
regards
Taj -
RMAN for 10g RAC in windows2003
Hello experts,
could any one help to configure RMAN for 10g RAC in windows2003?
thanks,Hi;
Please check:
RMAN: RAC Backup and Recovery using RMAN [ID 243760.1]
RMAN configuration in ORACLE RAC database
RMAN configuration in ORACLE RAC database
RMAN and RAC
RMAN and RAC
Also check this search:
http://forums.oracle.com/forums/search.jspa?threadID=&q=RMAN+RAC&objID=f384&dateRange=all&userID=&numResults=15
I belive those are will answer your question
Regard
Helios -
CREATING A SINGLE INSTANCE PHYSICAL STANDBY FOR A RAC PRIMARY
Hi
Creating a single instance physical standby database for a RAC Primary.
Getting this error.
sql statement: alter database mount standby database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/17/2008 23:05:38
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 01/17/2008 23:05:38
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-01103: database name 'PROD' in control file is not 'DPROD'
Any help on this.
Regards
SatishThe problem here is probably with your standby init.ora file.
When you create a standby database, the db_name parameter must NOT change. It has to match the primary database. So in your case, db_name ='PROD' and your db_unique_name='DPROD'...
-peter -
Please review the RMAN script and throw any comments which will increase KB
Dear Sirs:
I would be grateful if anyone in this forum checks whether the RMAN strategy taken by me is OK or require any room for improvement. I have not yet
moved into production.
Environment: ORACLE 10G R2 running on RAC, RHEL 4.0 for Intel Itanium. RMAN script runs every night at 10PM from node 1 of 2.
ASM is used and all datafiles, controlfiles, arc, redo in SAN
Process:
<1> Empty folder "PreviousdayBackup
<2> Move backup of yesterday night to "PreviousdayBackup"
<3> Execute RMAN the script provided below.
run {
backup
filesperset=15
incremental level 0
spfile format '/archive/backup/rman/spfile_%d_%s_%T.bak' tag 'spfile_backup'
database format '/archive/backup/rman/data_%d_%s_%T.bak' tag 'full_data_backup';
crosscheck backup;
sql 'alter system archive log current';
crosscheck archivelog all;
backup filesperset 288 format '/archive/backup/rman/cscdb_data_archive_%d_%u' archivelog all delete input;
delete archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
backup current controlfile format '/archive/backup/rman/%d_data_control_%s_%p_%u' tag 'control_file';
The Tape runs at 3:00AM in the morning and takes all the files from '/archive/backup/rman/'
_*RMAN Configuration*_
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/archive/backup/rman/ctrl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/product/1020/db_1/database/snapcf_cscdb1.f';
I am also not getting the concepts properly on :
delete archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
Is the delete within the RMAN pieces or within the folder. It would be great if someone can explain me on these
Awaiting for your kind response
Caesar
Edited by: caesar dutta on 10-May-2012 00:10Hi emre baransel :
Step 1: Delete from folder "previousdaybackup"
Step 2: Move last night backup from "/archive/backup/rman" to "previousdaybackup"
Step 3: Run RMAN and backup is stored at "/archive/backup/rman"
Stpe 4: Data is backed up to DLT cartridge from "/archive/backup/rman"
The folder "/archive/backup/rman" is a separate partition from SAN mounted in the LINUX SYSTEM as ext3
Why did you chose filesperset=15, do you have specific purpose?Well I am looking at existing RMAN in the place and not changing any basic configuration. Frankly speaking I do not have answer to this.
I have changed the RMAN commands as
run {
backup
filesperset=15
incremental level 0
spfile format 'D:\archive\backup\rman\cscdb1\spfile_%d_%s_%T.bak' tag 'spfile_backup'
database format 'D:\archive\backup\rman\cscdb1\data_%d_%s_%T.bak' tag 'full_data_backup';
crosscheck backup;
sql 'alter system archive log current';
crosscheck archivelog all;
backup filesperset 288 format 'D:\archive\backup\rman\cscdb1\cscdb_data_archive_%d_%u' archivelog all not backed up 2 times;
delete noprompt archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
I feel that I will be in a safer side.
Please provide comments. Anything that will increase knowledge base and will educate others too in this forum.
regards,
caesar
Maybe you are looking for
-
How do I get the Measurement scale to stay set in Adobe Acrobat IX Pro. It's easy to set the scale , but when you exit out of the commend the scale is reset to 1 = 1.
-
IPod Touch 4th gen unable to install apps
Not sure where to start really. OK basically my iPod touch 4th gen is unable to download apps from the app store or any content from the iTunes app, the only way I can get new content on to my device is to sync it with iTunes on my mac (which isn't c
-
its it possible to run the 23" dispaly and an xbox 360 elite together with out spending 300+ dollars i've seen the HDMI to DVI scaler and a little to high of price for me any suggestions? ive thought of maby running a s-video ...dvi to s-video or pos
-
How to enable cookies for the site I am on? (WinXP)
I have several questions about cookies. I hope it's OK to post them all at once, rather that each one in a separate topic. 1. Cookie Prompt I would like to configure FF so that whenever a website tried to store a cookie, FF will prompt me with these
-
When downloading photos from sdhc card elements gives an error message file corrupt or not supported file. Only taken photo in Raw format and have not had problems downloading Raw from compactflash Photos download ok into Canon own software. Any sugg