Export full Database Scripts


                          Oracle Database 11.2 Full Database Export Scripts


Create scripts with .sh extension through Vi editor.

In this scripts delete your backup older than 3 days.
you need to change all path as per your environment.

Like ORACLE_HOME path, ORACLE_SID.
change system password.
Here script name is exp_full_DB.sh..



[Oracle ] $ vi exp_full_DB.sh

#!/bin/bash

#Delete exports older than 3 days
find /u01/db_exports -name '*.dmp' -mtime +3 | xargs rm -f
find /u01/db_exports -name '*.log' -mtime +3 | xargs rm -f

export ORACLE_SID=test
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH:.

fdate=`date +%Y%m%d`

expdp system/manager@TEST directory=TESTODS_EXP_DIR dumpfile=TESTODS_$fdate.dmp logfile=TESTODS_export_$fdate.log full=y




No comments:

java.sql.SQLSyntaxErrorException: Access was denied to the user in MySQL 8.4.

 java.sql.SQLSyntaxErrorException: Access denied for user 'SIT'@'%' to database 'SIT' means the MySQL user SIT does ...