有这样的需求,在exp导出时不想导出一个很大的表的数据,使用expdp导出可以使用EXCLUDE指定要排除的对象。但9i只能使用exp导出,为实现这个EXCLUDE的功能,可以按以下步骤操作:
1.导出其它所有表:$ORACLE_HOME/bin/exp userid=scott/tiger file=scott_data.dmp tables=t1,t2....
2.导出这个用户的完整对象定义,不导数据:$ORACLE_HOME/bin/exp userid=scott/tiger owner=scott rows=n direct=y file=scott_nodata.dmp recordlength=65535 ...
3.导入步骤1的dmp文件: $ORACLE_HOME/bin/imp scott/tiger buffer=32768 file=scott_data.dmp fromuser=scott touser=scott.....
4.导入步骤2的dmp文件,需要忽略错误: $ORACLE_HOME/bin/ imp scott/tiger ignore=yes buffer=32768 file=scott_nodata.dmp fromuser=scott touser=scott......
1.导出其它所有表:$ORACLE_HOME/bin/exp userid=scott/tiger file=scott_data.dmp tables=t1,t2....
2.导出这个用户的完整对象定义,不导数据:$ORACLE_HOME/bin/exp userid=scott/tiger owner=scott rows=n direct=y file=scott_nodata.dmp recordlength=65535 ...
3.导入步骤1的dmp文件: $ORACLE_HOME/bin/imp scott/tiger buffer=32768 file=scott_data.dmp fromuser=scott touser=scott.....
4.导入步骤2的dmp文件,需要忽略错误: $ORACLE_HOME/bin/ imp scott/tiger ignore=yes buffer=32768 file=scott_nodata.dmp fromuser=scott touser=scott......
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26870952/viewspace-2090490/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26870952/viewspace-2090490/