[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儲存過程
- 帶輸出引數的儲存過程儲存過程
- oracle父儲存過程呼叫子儲存過程procedure與輸出引數Oracle儲存過程
- 動態呼叫帶引數的儲存過程儲存過程
- 使用帶有輸出引數的儲存過程儲存過程
- oracle儲存過程procedure輸入引數為空_如果顯示錶列不為 null的記錄Oracle儲存過程Null
- MySQL 儲存過程引數IN OUT INOUT對比MySql儲存過程
- Java呼叫儲存過程(帶輸出引數)Java儲存過程
- oracle儲存過程將引數字串分割sqlOracle儲存過程字串SQL
- Oracle帶輸入輸出引數的儲存過程Oracle儲存過程
- SQLSERVER儲存過程如何寫帶引數的遊標SQLServer儲存過程
- dos下呼叫帶輸出引數的儲存過程儲存過程
- 造數儲存過程儲存過程
- SQL Server-儲存過程(Procedure),帶入引數和出引數SQLServer儲存過程
- 儲存過程的引數可以使用sql的函式儲存過程SQL函式
- SQL Server系統儲存過程和引數示例SQLServer儲存過程
- jdbctemplate呼叫儲存過程傳遞陣列引數JDBC儲存過程陣列
- 儲存過程中巢狀儲存過程的變數執行方式儲存過程巢狀變數
- go 如何呼叫 sqlserver 帶傳出引數的儲存過程GoSQLServer儲存過程
- MySQL儲存過程in、out、inout引數示例與總結MySql儲存過程
- SQL Server系統儲存過程和引數總結SQLServer儲存過程
- 儲存過程單引號問題儲存過程
- 簡單的造數儲存過程儲存過程
- 【DBA】Oracle dba角色不是萬能的,儲存過程需要顯示授權Oracle儲存過程
- 求助:DB2 V7儲存過程引數限制DB2儲存過程
- 從sybase的儲存過程轉向oracle的儲存過程儲存過程Oracle
- 儲存過程輸入引數型別定義引起的問題儲存過程型別
- MySQL儲存過程詳解 mysql 儲存過程MySql儲存過程
- 儲存過程儲存過程
- 在儲存過程A中呼叫儲存過程B的結果儲存過程
- [20140515]解密儲存過程.txt解密儲存過程
- .NET用使用儲存過程獲取輸出引數的程式碼示例!儲存過程
- oracle的儲存過程Oracle儲存過程
- 修改的儲存過程儲存過程
- mysql的儲存過程MySql儲存過程
- 拋磚引玉——通用分頁儲存過程儲存過程
- MySql儲存過程—2、第一個MySql儲存過程的建立MySql儲存過程
- 儲存過程呼叫其他模式的儲存過程需要注意的地方儲存過程模式