Export-DataPumb - script
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#!/bin/bash #$HOME/.bash_profile CUR_DATE=`date +%d%m%y` DIRECTORY=/u01 FILENAME=SID_ISMI$.dmp LOG=SID_ISMI$.log cd $ /usr/bin/find . -type f -name "*.log" -mtime +15 -exec /bin/rm <> ; /usr/bin/find . -type f -name "*.dmp.gz" -mtime +3 -exec /bin/rm <> ; /usr/bin/find . -type f -name "*.dmp" -exec /bin/rm <> ; exp system/oracle buffer=100000 owner=hr file=$ compress=y rows=y constraints=y consistent=y LOG=$ /usr/bin/gzip /u01/SID_ISMI$.dmp ########################################## #mail -s ‘konu’ xx@gmail.com, yy@xx.com.tr < $ #sendmail root < $ # test için ####################### SendMail ayarlari ######################## #Sendmail'e gelen butun e-postalarin baska bir e-posta sunucuya yonlendirilmesi icin "DS" kullanilir. #/etc/mail/sendmail.cf 'ye su satir eklenir: #DSuzakaki_mail_sunucu.com #Boylelikle sendmail'e gelen butun mailler "uzaktaki_mail_sunucu.com" 'a gonderilir. Ek olarak uzakaki mail sunucusunda da /etc/mail/access dosyasina su satirlar #eklenir: #relay_yapan_sunucu_IP RELAY #Daha sonra su komut verilerek access dosyasi database haline getirilir: #makemap hash /etc/mail/access < /etc/mail/acccess ######## Crontaba Eklenecek Satir################################# #Gece 02:30 da sciptri calistiracak #00 02 * * * sh /home/oracle/Batches/expdp.sh > /tmp/expdp.out 2>&1 |
Kategori seçin...
