How to take entire oracle db schema backup

Q. How to take entire oracle schema backup in UNIX using terminal?

There are very few simple steps to take entire db schema backup.

1. Create one physical directory in your Unix node where you want to take backup.
mkdir /tmp/my_backup_dir
Give read/write/execute permission to this directory.
chmod 777  my_backup_dir
2. Now map this physical directory to one logical directory of oracle. For this step you have to login to the sqlplus terminal with DB admin access.
CREATE OR REPLACE DIRECTORY logical_dir as '/tmp/my_backup_dir'; 
3.  Now its time to start backup of your schema. Come out of the sqlplus terminal and execute below command with all correct parameters.
expdp username/password DIRECTORY=logical_dir DUMPFILE=exp_table.dmp LOGFILE=exp_table.log SCHEMAS=your_db_schema_name
This will export all tables under that schema. exp_table.dmp file will be stored in '/tmp/my_backup_dir' directory of Unix node. 
Related Posts Plugin for WordPress, Blogger...
Powered by Blogger