zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Oracle 参数 PLSCOPE_SETTINGS 官方解释,作用,如何配置最优化建议

Oracle官方配置 如何 建议 作用 解释 参数
2023-06-13 09:11:20 时间
本站中文解释

PLSCOPE_SETTINGS是一个在11g中新添加的参数,可以确定PL/SQL函数或过程中的变量是否可见。它的参数值有:

(1)FALSE(默认)——变量的定义和使用不被追踪,因此不可见。

(2)IMMEDIATE——立即开始追踪变量的定义和使用,从而使变量可见。

(3)DEFERRED——当编辑器运行时,才开始追踪变量的定义和使用,但不一定在追踪期间变量可见。

用户可以使用以下ALTER SESSION命令来正确设置PLSCOPE_SETTINGS参数:

ALTER SESSION SET PLSCOPE_SETTINGS = IMMEDIATE

用户也可以通过在启动时设置SPFILE中的这个参数,使其在整个会话期间有效。

官方英文解释

PLSCOPE_SETTINGS controls the compile time collection, cross-reference, and storage of PL/SQL source code identifier data.


value_clause::=

{ IDENTIFIERS | STATEMENTS } : { ALL | NONE | PUBLIC (for IDENTIFIERS only) | SQL (for IDENTIFIERS only) | PLSQL (for IDENTIFIERS only) }


IDENTIFIERS:ALL

Enables the collection of all source code identifier data.


IDENTIFIERS:NONE

Disables the collection of all source code identifier data.


IDENTIFIERS: PUBLIC

Enables the collection of all PUBLIC user identifier data (except for DEFINITION)


STATEMENTS:ALL

Enables the collection of all SQL statements used in PL/SQL.


PLSCOPE_SETTINGS can be set on a session, system, or per-library unit (ALTER COMPILE) basis. The current setting of PLSCOPE_SETTINGS for any library unit can be attained by querying the *_PLSQL_OBJECT_SETTINGS views. Any identifier data collected by setting this parameter can be accessed using the *_IDENTIFIERS views.

When a STATEMENTS setting is not specified, and IDENTIFIERS is specified but set to a value other than NONE, STATEMENTS defaults to a setting of ALL, which is equal to:

CopyIDENTIFIERS: [ALL|PLSQL|PLSQL|PUBLIC]

Examples

The following parameter setting causes PL/SQL and SQL identifiers and statements to be collected:

CopyPLSCOPE_SETTINGS = "IDENTIFIERS:ALL, STATEMENTS:ALL"

The following parameter setting causes only SQL identifiers and statements to be collected:

CopyPLSCOPE_SETTINGS = "IDENTIFIERS:SQL, STATEMENTS:ALL"

The following parameter setting causes only PL/SQL identifiers to be collected:

CopyPLSCOPE_SETTINGS = "IDENTIFIERS:PLSQL, STATEMENTS:NONE"

The following parameter setting causes no identifier data to be collected, and drops any existing identifier data:

CopyPLSCOPE_SETTINGS = "IDENTIFIERS: NONE"

See Also:


ALL_PLSQL_OBJECT_SETTINGS, DBA_PLSQL_OBJECT_SETTINGS, and USER_PLSQL_OBJECT_SETTINGS


Oracle Database PL/SQL
Language Reference for more information about this parameter


我想要获取技术服务或软件
服务范围:MySQL、ORACLE、SQLSERVER、MongoDB、PostgreSQL 、程序问题
服务方式:远程服务、电话支持、现场服务,沟通指定方式服务
技术标签:数据恢复、安装配置、数据迁移、集群容灾、异常处理、其它问题

本站部分文章参考或来源于网络,如有侵权请联系站长。
数据库远程运维 Oracle 参数 PLSCOPE_SETTINGS 官方解释,作用,如何配置最优化建议