######## table.sh 找出要導出的表
export ORACLE_HOME=/oracle/ora9i
export NLS_LANG=AMERICAN_CHAIN.ZHS16GBK
sqlplus '/as sysdba'</* set the format of output */
set echo off
set termout off
set feedback off
set heading off
set linesize 120
set pagesize 0
-- use multple select cause to find the tables of we need --
select to_char(sysdate,'yyyy-mm-dd hh:mm:ss') from dual;
spool $ORACLE_HOME/table.lst
select 'tables=(' || chr(10) from dual;
rem chr(10) chang one line
select owner||'.'||table_name||','||chr(10) from dba_tables
where owner not in
('SYS','SYSTEM','CTXSYS','ORDSYS','MDSYS')
and table_name not in
('SMS_LOG','SMS_RESPREPT_ERROR','SMS_STATUSREPT','PUSH_USER_INFO_LOG')
order by owner;
select 'sys.dual' from dual;
select ')' from dual;
spool off
exit
eof
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7396235/viewspace-129064/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7396235/viewspace-129064/