Monday, August 10, 2015

Logical backup of sql query using EXP/IMP utility

Hi Folks,

Today I am writing about how to take exp backup of an sql statement. Many times we have a requirements to backup the modified rows. Taking full table backup may not be feasible if table sizes is GB's.

Better approach is to backup on the rows getting modified.

Consider below sql as an example.

select * from EMP where emp_job in ('DBA','DEVELOPER','ANALYST');


vi exp_example.par  (add below content)

file=EMP_EXP.dmp
log=EMP_EXP.log
query="where emp_job in ('DBA','DEVELOPER','ANALYST')"
tables=(EMP)
userid=system/manager

:wq  ( To save the file)

exp parfile=exp_example.par


That's all. Best of luck.

No comments:

Post a Comment