[20160501]查看包参数脚本.txt

[20160501]查看包参数脚本.txt

--我以前写的脚本

SCOTT@book> @ &r/desc_proc sys dbms_stats get_table%
INPUT OWNER PACKAGE_NAME OBJECT_NAME
sample : @desc_proc sys dbms_stats gather_%_stats

OWNER      PACKAGE_NAME         OBJECT_NAME                      SEQUENCE ARGUMENT_NAME        DATA_TYPE            IN_OUT    DATA_TYPE            D
---------- -------------------- ------------------------------ ---------- -------------------- -------------------- --------- -------------------- -
SYS        DBMS_STATS           GET_TABLE_STATS                         1 OWNNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        1 OWNNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        2 TABNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        2 TABNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        3 PARTNAME             VARCHAR2             IN        VARCHAR2             Y
                                                                        3 PARTNAME             VARCHAR2             IN        VARCHAR2             Y
                                                                        4 STATTAB              VARCHAR2             IN        VARCHAR2             Y
                                                                        4 STATTAB              VARCHAR2             IN        VARCHAR2             Y
                                                                        5 STATID               VARCHAR2             IN        VARCHAR2             Y
                                                                        5 STATID               VARCHAR2             IN        VARCHAR2             Y
                                                                        6 NUMROWS              NUMBER               OUT       NUMBER               N
                                                                        6 NUMROWS              NUMBER               OUT       NUMBER               N
                                                                        7 NUMBLKS              NUMBER               OUT       NUMBER               N
                                                                        7 NUMBLKS              NUMBER               OUT       NUMBER               N
                                                                        8 AVGRLEN              NUMBER               OUT       NUMBER               N
                                                                        8 AVGRLEN              NUMBER               OUT       NUMBER               N
                                                                        9 STATOWN              VARCHAR2             IN        VARCHAR2             Y
                                                                        9 STATOWN              VARCHAR2             IN        VARCHAR2             Y
                                                                       10 CACHEDBLK            NUMBER               OUT       NUMBER               N
                                                                       11 CACHEHIT             NUMBER               OUT       NUMBER               N

20 rows selected.

--很明显这样的输出参数排序了,不是自己需要的.删除排序操作看看:

SCOTT@book> @ &r/desc_proc sys dbms_stats get_table%
INPUT OWNER PACKAGE_NAME OBJECT_NAME
sample : @desc_proc sys dbms_stats gather_%_stats

OWNER      PACKAGE_NAME         OBJECT_NAME                      SEQUENCE ARGUMENT_NAME        DATA_TYPE            IN_OUT    DATA_TYPE            DEFAULTED
---------- -------------------- ------------------------------ ---------- -------------------- -------------------- --------- -------------------- ----------
SYS        DBMS_STATS           GET_TABLE_STATS                         1 OWNNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        2 TABNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        3 PARTNAME             VARCHAR2             IN        VARCHAR2             Y
                                                                        4 STATTAB              VARCHAR2             IN        VARCHAR2             Y
                                                                        5 STATID               VARCHAR2             IN        VARCHAR2             Y
                                                                        6 NUMROWS              NUMBER               OUT       NUMBER               N
                                                                        7 NUMBLKS              NUMBER               OUT       NUMBER               N
                                                                        8 AVGRLEN              NUMBER               OUT       NUMBER               N
                                                                        9 STATOWN              VARCHAR2             IN        VARCHAR2             Y
                                                                        1 OWNNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        2 TABNAME              VARCHAR2             IN        VARCHAR2             N
                                                                        3 PARTNAME             VARCHAR2             IN        VARCHAR2             Y
                                                                        4 STATTAB              VARCHAR2             IN        VARCHAR2             Y
                                                                        5 STATID               VARCHAR2             IN        VARCHAR2             Y
                                                                        6 NUMROWS              NUMBER               OUT       NUMBER               N
                                                                        7 NUMBLKS              NUMBER               OUT       NUMBER               N
                                                                        8 AVGRLEN              NUMBER               OUT       NUMBER               N
                                                                        9 STATOWN              VARCHAR2             IN        VARCHAR2             Y
                                                                       10 CACHEDBLK            NUMBER               OUT       NUMBER               N
                                                                       11 CACHEHIT             NUMBER               OUT       NUMBER               N

$ cat desc_proc.sql
column owner format a10
column package_name format a20
column object_name format a30
column data_type format a20
column ARGUMENT_NAME format a20
column defaulted format a10
set verify off
break on owner on package_name on object_name  skip 1
PROMPT INPUT OWNER PACKAGE_NAME OBJECT_NAME
PROMPT sample : @desc_proc sys dbms_stats gather_%_stats
Prompt
SELECT owner,
         package_name,
         object_name,
         sequence,
         argument_name,
         data_type,
         in_out,
         data_type,
         defaulted
    FROM dba_arguments
   WHERE     owner = NVL(upper('&1'),'SYS')
         AND package_name = NVL(upper('&2'),'DBMS_STATS')
         AND object_name like NVL(upper('&3'),object_name)
AND data_level = 0
--ORDER BY owner,package_name,object_name,sequence;

时间: 2024-09-30 14:28:20

[20160501]查看包参数脚本.txt的相关文章

[20171109]查看隐含参数脚本.txt

[20171109]查看隐含参数脚本.txt --//查看隐含参数的脚本,今天没事修改一下增加查询description字段的内容.也有网友要求提供这个脚本,实际上这些脚本都是自己工作 --//中不断收集整理.网上许多地方都能找到. $ cat hide.sql col name format a40 col description format a66 col session_value format a22 col default_value format a22 col system_va

[20150821]简单编写解除阻塞的脚本.txt

[20150821]简单编写解除阻塞的脚本.txt --主要是在rac环境下查杀阻塞的会话,以前的一些脚本不好用. SELECT    'alter system kill session '''          || blocking_session          || ','          || blocking_session_serial#          || ',@'          || blocking_inst_id          || ''' immedia

[20151021]理解dbms_xplan.display_cursor的format参数all.txt

[20151021]理解dbms_xplan.display_cursor的format参数all.txt --今天才理解dbms_xplan.display_cursor的format参数all,看来看书与看文档不够仔细. --我一般看执行计划使用我自己的脚本: $ cat dpcz.sql set verify off --select * from table(dbms_xplan.display_cursor(NVL('&1',NULL),NULL,'ALLSTATS LAST PEEK

[20160516]统计分析参数method_opt.txt

[20160516]统计分析参数method_opt.txt --统计分析参数method_opt我个人感觉是最能折腾人的参数.我自己曾经在这个参数上栽过跟头,通过例子来说明看看. 1.环境: SCOTT@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- ------------------------------

二、SQL语句映射文件(2)增删改查、参数、缓存

 二.SQL语句映射文件(2)增删改查.参数.缓存 2013-09-06 17:05:42 标签:配置文件 动态 元素 MyBatis学习 之 一.MyBatis简介与配置MyBatis+Spring+MySql MyBatis学习 之 二.SQL语句映射文件(1)resultMap MyBatis学习 之 二.SQL语句映射文件(2)增删改查.参数.缓存 MyBatis学习 之 三.动态SQL语句 MyBatis学习 之 四.MyBatis配置文件 2.2 select 一个select 元素

QQ阅读查看包月VIP体验卡信息方法详解

给各位QQ阅读软件的使用者们来详细的解析分享一下QQ阅读查看包月VIP体验卡信息的方法. 方法分享: 1.打开QQ阅读,点击左上角的"头像";   2.在侧边栏的包月特权一栏中,可以看到包月VIP体验卡的信息:到期时间.   好了,以上的信息就是小编给各位QQ阅读的这一款软件的使用者们带来的详细的QQ阅读查看包月VIP体验卡信息的方法解析分享的全部内容了,各位看到这里的使用者们,小编相信大家现在那是非常的清楚了查看的方法了吧,希望小编上面给各位使用者们分享的信息能够给各位带去帮助.

[20171117]参数filesystemio_options.txt

[20171117]参数filesystemio_options.txt --//前几天看别人的awr报表发现设置参数filesystemio_options=setall,问为什么?对方给出一个链接,某某人都是这样设置的, --//自己很无语,我希望对方能提出自己的见解. --//首先给出oracle官方的解析: https://docs.oracle.com/cd/E11882_01/server.112/e41573/os.htm#PFGRF94410 9.1.1.2 FILESYSTEM

[20171105]exp imp buffer参数解析.txt

[20171105]exp imp buffer参数解析.txt oracle官方所给的关于buffer的解释如下: https://docs.oracle.com/cd/A84870_01/doc/server.816/a76955/ch01.htm BUFFER Default: operating system-dependent. See your Oracle operating system-specific documentation to determine the defaul

[20170515]检查数据库scn脚本.txt

[20170515]检查数据库scn脚本.txt --//简单写一个脚本检查数据库各个scn的大小: column TABLESPACE_NAME format a20 SELECT b.file#       ,b.name       ,c.STATUS       ,c.FUZZY       ,a.checkpoint_change# "数据库记录的scn"       ,b.checkpoint_change# "控制文件记录的开始scn"       ,