我的oracle备份问题
我想对数据库中一个表有条件的exp备份,这个条件是两个表的关联条件。
我想备份的东西在plsql中是这样查询的:
Select a.name, a.id, a.no from a, b
where b.date<= to_date('01-04-01', 'yy-mm-dd')
and substr(a.no,1,8)=group如果能用exp实现的话,如何编写自动批处理命令啊?
请大家帮我一下,谢谢了啊!
我想对数据库中一个表有条件的exp备份,这个条件是两个表的关联条件。
我想备份的东西在plsql中是这样查询的:
Select a.name, a.id, a.no from a, b
where b.date<= to_date('01-04-01', 'yy-mm-dd')
and substr(a.no,1,8)=group如果能用exp实现的话,如何编写自动批处理命令啊?
请大家帮我一下,谢谢了啊!
exp username/password@服务名
table=(a)
query='"where to_day(b.date,'YY-MM-DD')>='07-02-012'
and substr(a,1,8)=b.group"'
file="c:\bak\a_%date:~0,10%.dmp(可以存储a_2007-02-12.dmp"
log="c:\bak\a_%date:~0,10%.dmp(可以存储a_2007-02-12.log"
where b.date<= to_date('01-04-01', 'yy-mm-dd')
and substr(a.no,1,8)=group;
2. Exp table C.
我估计你的exp命令不对,理由是query部分只限于exp要到出的表,所以在where里面不能存在b.XXXX这样的条件。