Tuesday, January 8, 2013

Shell Scripting of Deleting Archivelog on Standby / Dataguard Server


Frist Create file vi rman_script.sh

then add the following lines in rman_script.sh file

rman msglog " now.log " <<EOF
connect target /;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
run {
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED BACKUP;
delete noprompt archivelog until time 'SYSDATE-2';
crosscheck archivelog all;
}
Exit;
EOF

Note:- It will delete all the archive of 48 hours back. (SYSDATE-2) mean 48 Hours Past.

then save it and exit

then give the executing permission to rman_script.sh
chmod 777 rman_script.sh



now run the command 
crontab -e
and add the file in crontab ( Automatically Running Job )

00 6 * * *  "/u01/app/oracle/product/rman_script.sh" 

save it and exit and enjoy!!!!!


Note:- Try everything at your own risk, if any thing happens wrong with your database so blogger will not be responsible.

Wednesday, January 2, 2013

OCM 11g Exams Summary


OCM exam a total of nine section, specific arrangements are as follows


First day:
section 0: Creating a database 45 minutes
section 1: the database and network configuration 120 minutes
section 2: Gridcontrol Installation and Configuration 120 minutes
section 3: a database backup and recovery 60 minutes
section 4: Data Warehouse Management 90 minutes
The next day:
section 5: Database Management 120 minutes
section 6: Database Performance Management 120 minutes
section 7: the deployment of Oracle RAC Database 105 minutes
sectoin 8: Deployment dataguard Database 60 minutes

Failure in execution (rc=-1, 0, No such file or directory)


for command /u01/app/11.2.0/grid/bin/crsctl query crs activeversion



CRS is already configured on this node for crshome=/u01/app/11.2.0/grid
Cannot configure two CRS instances on the same cluster.


Please deconfigure before proceeding with the configuration of new home.

[root@dr ~]# /u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -

I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl


SOLUTION:- cd /etc/oracle  
remove ocr.loc.orig  olr.loc.orig and ocr.loc   olr.loc  files.  then retry and ENJOY!!!!!


Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dr successfully pinned.
Adding Clusterware entries to inittab

dr     2013/01/02 11:47:18     /u01/app/11.2.0/grid/cdata/dr/backup_20130102_114718.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server



Note:- Try everything at your own risk, if any thing happens wrong with your database so blogger will not be responsible.