生成 html 文件
1、main.sql – 用以设置环境,调用具体功能脚本
set linesize 200
set term off verify off feedback off pagesize 999
set markup html on entmap ON spool on preformat off
spool /u01/tables.html
@/u01/get_tables.sql
spool off
exit
2、get_tables.sql – 功能脚本,实现具体功能的脚本,通过这两个脚本可以避免 spool 中的冗余信息。
select owner,table_name,tablespace_name,blocks,last_analyzed
from all_tables order by 1,2;
3、执行并获得输出
sqlplus -S “/ as sysdba" @/u01/main.sql
生成 xls 文件
1、main.sql – 用以设置环境,调用具体功能脚本
set linesize 200
set term off verify off feedback off pagesize 999
set markup html on entmap ON spool on preformat off
spool /u01/tables.xls
@/u01/get_tables.sql
spool off
exit
2、get_tables.sql – 功能脚本,实现具体功能的脚本,通过这两个脚本可以避免 spool 中的冗余信息。
select owner,table_name,tablespace_name,blocks,last_analyzed
from all_tables order by 1,2;
3、执行并获得输出
sqlplus -S “/ as sysdba" @/u01/main.sql
生成 css 文件
set linesize 200
set pagesize 999
set term off verify off feedback off heading off trims on
set markup csv on
spool /u01/tables.csv
select * from scott.emp;
spool off
exit
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




