Oracle 视图 ALL_SOURCE 官方解释,作用,如何使用详细说明

本站中文解释

View

Oracle 视图ALL_SOURCE用于在当前数据库中内观察创建的源码对象,可以查看包、存储过程、函数和触发器等对象的源代码。

使用方法:

1、查看存储过程的源代码:
SELECT text FROM all_source WHERE owner = ‘schema_name’ AND name = ‘package_name’ AND type = ‘PACKAGE BODY’;

2、查看函数的源代码:
SELECT text FROM all_source WHERE owner = ‘schema_name’ AND name = ‘procedure_name’ AND type = ‘FUNCTION’;

3、查看触发器的源代码:
SELECT text FROM all_source WHERE owner = ‘schema_name’ AND name = ‘trigger_name’ AND type = ‘TRIGGER’;

官方英文解释

ALL_SOURCE describes the text source of the stored objects accessible to the current user.

Related Views

  • DBA_SOURCE describes the text source of all stored objects in the database.

  • USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the object

NAME

VARCHAR2(128)

NOT NULL

Name of the object

TYPE

VARCHAR2(12)

Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY

LINE

NUMBER

NOT NULL

Line number of this line of source

TEXT

VARCHAR2(4000)

Text source of the stored object

ORIGIN_CON_ID

VARCHAR2(256)

The ID of the container where the data originates. Possible values include:

  • 0: This value is used for rows in non-CDBs. This value is not used for CDBs.

  • n: This value is used for rows containing data that originate in the container with container ID n (n = 1 if the row originates in root)

See Also:

  • “DBA_SOURCE”

  • “USER_SOURCE”


数据运维技术 » Oracle 视图 ALL_SOURCE 官方解释,作用,如何使用详细说明