-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllSchemaBackup.sh
More file actions
17 lines (12 loc) · 911 Bytes
/
AllSchemaBackup.sh
File metadata and controls
17 lines (12 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -x
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1;
export PATH=$ORACLE_HOME/bin:/usr/bin:/usr/local/bin:/bin;
/u01/app/oracle/product/12.1.0/dbhome_1/bin/expdp system/Spice_123@payprodb schemas=pre_dev,dev,oracleqa,demopp,mfs_dev,mfs_qa,sitpp,mfs_demo,mfs_sit directory=DATA_PUMP_DIR dumpfile=expdp_All_Schema_`date +"%d_%B_%Y"`.dmp logfile=expdp_All_Schema_`date +"%d_%B_%Y"`.log
filename=/home/payprodb/datapump/expdp_All_Schema_`date +"%d_%B_%Y"`.log
if grep "successfully completed" $filename
then
mailx -s "Status for Backup of All DB Schema : Successful" rajesh.mahajan@spicelabs.in harnek.singh@spicelabs.in geetika.sharma@spicelabs.in pankaj.kumar1@digispice.com < $filename
else
mailx -s "Status for Backup of All DB Schema : Failure" pankaj.kumar1@digispice.com rajesh.mahajan@spicelabs.in harnek.singh@spicelabs.in geetika.sharma@spicelabs.in < $filename
fi
exit;