这个名字牛吗?Mother Of All Tuning Scripts (MOATS)
下载地址: https://github.com/oracle-developer/moats,下载后
scutech@Yao:~/Downloads/moats-master$ ll
total 92
drwxr-xr-x 2 scutech scutech 4096 5月 29 03:53 ./
drwxr-xr-x 17 scutech scutech 4096 8月 28 16:03 ../
-rw-r--r-- 1 scutech scutech 626 5月 29 03:53 LICENSE
-rw-r--r-- 1 scutech scutech 995 5月 29 03:53 moats_install.sql
-rw-r--r-- 1 scutech scutech 35093 5月 29 03:53 moats.pkb
-rw-r--r-- 1 scutech scutech 3368 5月 29 03:53 moats.pks
-rw-r--r-- 1 scutech scutech 1281 5月 29 03:53 moats_privs_grant.sql
-rw-r--r-- 1 scutech scutech 1346 5月 29 03:53 moats_privs_revoke.sql
-rw-r--r-- 1 scutech scutech 1089 5月 29 03:53 moats_remove.sql
-rw-r--r-- 1 scutech scutech 101 5月 29 03:53 moats_settings.sql
-rw-r--r-- 1 scutech scutech 3668 5月 29 03:53 moats_types.sql
-rw-r--r-- 1 scutech scutech 71 5月 29 03:53 moats_views.sql
-rw-r--r-- 1 scutech scutech 10328 5月 29 03:53 README.md
安装
SQL> @moats-master/moats_install.sql
**************************************************************************
**************************************************************************
MOATS Installer (for 10.2+ databases)
=====================================
This will install MOATS v1.0 into the current schema.
......
设置窗口
SQL> set serveroutput on format wrapped
SQL> exec moats.format_window
--------------------------------------------------------------------------------
------------------------------
MOATS: The Mother Of All Tuning Scripts v1.0 by Adrian Billington & Tanel Poder
http://www.oracle-developer.net & http://www.e2sn.com
运行
SQL> set arrays 72 lines 110 head off tab off pages 0
SQL> SELECT * FROM TABLE(moats.top(5));
查看结果: