#使用shell运行sqlplus执行sql,以获取表的建表语句。
nohup sqlplus ccare/ccare@ccbstd <<EOF >/dev/null 2>&1 &
set pagesize 0
set long 90000
set feedback off
set echo off
spool test.sql
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) FROM USER_TABLES u;
spool off
exit;
EOF