Skip to content
Advertisements

Archive for

rman backup script

RMAN Backup script :

Older backup will delete from previous folder

current backup will be moved to previous folder

Taking full database backup

Output will send to users by email

 

[orauat@dbs-XXX-xx ~]$ cat /u01/UAT/scripts/DBbackup.sh
#!/bin/sh
ORACLE_HOME=/u01/UAT/db/tech_st/12c export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH export PATH
ORACLE_SID=UAT export ORACLE_SID
cd /ebsbackup/UAT/previous
rm -rf UAT*
rm -rf db_hot_current*
cd /ebsbackup/UAT
mv UAT* /ebsbackup/UAT/previous
mv db_hot_current* /ebsbackup/UAT/previous

export log=/ebsbackup/log/bak-$(date +%Y-%m-%d).log
rman target sys/xxxxxxx cmdfile=/u01/UAT/scripts/DBbackup.rcv msglog=/ebsbackup/log/bak-$(date +%Y-%m-%d).log
mailx -s “UAT Backup log” uatuser@xxxxx.com — -f UAT@alerts.xxxxx.net < $log

 

[orauat@dbs-xxx-xx ~]$ cat /u01/UAT/scripts/DBbackup.rcv
run
{ allocate channel d1 type disk;
backup format ‘/ebsbackup/UAT/UAT%U’ database plus archivelog delete input;
backup current controlfile format ‘/ebsbackup/UAT/db_hot_current_controlfile_%s_%p_%t’;
release channel d1;
}

Advertisements

Easy to export DDL in TOAD

I am thinking to export DDL of some objects from EBS Database. Okay I am using TOAD for export DDL, My work is simply done.

 

Connect the schema

Database — export — Export DDL

Click Add

 

Here you can choose “Like” option also

And you can save the all the OBJECTS DDL with single file

 

 

Script Options