[20140820]顯示儲存過程的引數.txt
[20140820]顯示儲存過程的引數.txt
--上午寫一個顯示儲存過程引數的例子,便於自己以後使用。
--主要是desc顯示的資訊太大,檢視不是很方便。
SCOTT@test> desc dbms_stats
PROCEDURE ALTER_DATABASE_TAB_MONITORING
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
MONITORING BOOLEAN IN DEFAULT
SYSOBJS BOOLEAN IN DEFAULT
PROCEDURE ALTER_SCHEMA_TAB_MONITORING
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
OWNNAME VARCHAR2 IN DEFAULT
MONITORING BOOLEAN IN DEFAULT
PROCEDURE ALTER_STATS_HISTORY_RETENTION
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
RETENTION NUMBER IN
....
PROCEDURE UPGRADE_STAT_TABLE
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
OWNNAME VARCHAR2 IN
STATTAB VARCHAR2 IN
SCOTT@test> desc dbms_stats.gather_table_stats
ERROR:
ORA-04043: object dbms_stats.gather_table_stats does not exist
--如果支援這種顯示方式就好了。
$ 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
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;
SCOTT@test> @desc_proc sys dbms_stats gather_s%_stats
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 GATHER_SCHEMA_STATS 1 OWNNAME VARCHAR2 IN VARCHAR2 N
1 OWNNAME VARCHAR2 IN VARCHAR2 N
2 ESTIMATE_PERCENT NUMBER IN NUMBER Y
2 ESTIMATE_PERCENT NUMBER IN NUMBER Y
3 BLOCK_SAMPLE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
3 BLOCK_SAMPLE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
4 METHOD_OPT VARCHAR2 IN VARCHAR2 Y
4 METHOD_OPT VARCHAR2 IN VARCHAR2 Y
5 DEGREE NUMBER IN NUMBER Y
5 DEGREE NUMBER IN NUMBER Y
6 GRANULARITY VARCHAR2 IN VARCHAR2 Y
6 GRANULARITY VARCHAR2 IN VARCHAR2 Y
7 CASCADE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
7 CASCADE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
8 STATTAB VARCHAR2 IN VARCHAR2 Y
8 STATTAB VARCHAR2 IN VARCHAR2 Y
9 STATID VARCHAR2 IN VARCHAR2 Y
9 STATID VARCHAR2 IN VARCHAR2 Y
10 OPTIONS VARCHAR2 IN VARCHAR2 Y
10 OPTIONS VARCHAR2 IN VARCHAR2 Y
11 STATOWN VARCHAR2 IN VARCHAR2 Y
11 OBJLIST TABLE OUT TABLE N
12 NO_INVALIDATE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
13 GATHER_TEMP PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
14 GATHER_FIXED PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
15 STATTYPE VARCHAR2 IN VARCHAR2 Y
16 FORCE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
17 OBJ_FILTER_LIST TABLE IN TABLE Y
18 STATOWN VARCHAR2 IN VARCHAR2 Y
19 NO_INVALIDATE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
20 GATHER_TEMP PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
21 GATHER_FIXED PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
22 STATTYPE VARCHAR2 IN VARCHAR2 Y
23 FORCE PL/SQL BOOLEAN IN PL/SQL BOOLEAN Y
24 OBJ_FILTER_LIST TABLE IN TABLE Y
GATHER_SYSTEM_STATS 1 GATHERING_MODE VARCHAR2 IN VARCHAR2 Y
2 INTERVAL NUMBER IN NUMBER Y
3 STATTAB VARCHAR2 IN VARCHAR2 Y
4 STATID VARCHAR2 IN VARCHAR2 Y
5 STATOWN VARCHAR2 IN VARCHAR2 Y
40 rows selected.
SCOTT@test> @desc_proc sys dbms_metadata get_ddl
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_METADATA GET_DDL 1 CLOB OUT CLOB N
2 OBJECT_TYPE VARCHAR2 IN VARCHAR2 N
3 NAME VARCHAR2 IN VARCHAR2 N
4 SCHEMA VARCHAR2 IN VARCHAR2 Y
5 VERSION VARCHAR2 IN VARCHAR2 Y
6 MODEL VARCHAR2 IN VARCHAR2 Y
7 TRANSFORM VARCHAR2 IN VARCHAR2 Y
7 rows selected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1254433/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql儲存過程的引數MySql儲存過程
- 造數儲存過程儲存過程
- go 如何呼叫 sqlserver 帶傳出引數的儲存過程GoSQLServer儲存過程
- MySQL儲存過程in、out、inout引數示例與總結MySql儲存過程
- [20180502]PLDEVELOP與儲存過程除錯.txtdev儲存過程除錯
- 【DBA】Oracle dba角色不是萬能的,儲存過程需要顯示授權Oracle儲存過程
- oracle的儲存過程Oracle儲存過程
- Oracle儲存過程乾貨(一):儲存過程基礎Oracle儲存過程
- SQL 儲存過程裡呼叫另一個儲存過程SQL儲存過程
- 詳解MySQL儲存過程引數有三種型別(in、out、inout)MySql儲存過程型別
- 儲存過程與儲存函式儲存過程儲存函式
- unidac儲存過程儲存過程
- firedac儲存過程儲存過程
- 呼叫儲存過程儲存過程
- mysql 儲存過程MySql儲存過程
- SQLSERVER儲存過程SQLServer儲存過程
- Oracle儲存過程Oracle儲存過程
- Mysql 儲存過程的使用MySql儲存過程
- Sqlserver中的儲存過程SQLServer儲存過程
- [20190118]toad下如何除錯儲存過程和函式.txt除錯儲存過程函式
- mssql 儲存過程呼叫另一個儲存過程中的結果的方法分享SQL儲存過程
- MySQL---------儲存過程MySql儲存過程
- linux呼叫儲存過程Linux儲存過程
- Oracle儲存過程-1Oracle儲存過程
- 儲存過程——遊標儲存過程
- Winform呼叫儲存過程ORM儲存過程
- 儲存過程 傳 datatable儲存過程
- mysql儲存過程整理MySql儲存過程
- JAVA儲存過程(轉)Java儲存過程
- JdbcTemplate調儲存過程JDBC儲存過程
- MySQL之儲存過程MySql儲存過程
- mysql和orcale的儲存過程和儲存函式MySql儲存過程儲存函式
- Sqlsugar呼叫Oracle的儲存過程SqlSugarOracle儲存過程
- plsqlDevloper 儲存過程的除錯SQLdev儲存過程除錯
- LMT下表儲存引數的使用
- Sql儲存過程分頁--臨時表儲存SQL儲存過程
- mybatis儲存過程返回listMyBatis儲存過程
- 資料庫儲存過程資料庫儲存過程
- mysql如何呼叫儲存過程MySql儲存過程