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

本站中文解释

PLSQL_CCFLAGS参数指定外部和内部C语言编译的任何特定选项,从而影响后端编译器产生的代码。如果您使用性能资料库,您可以设置此参数以使优化程度接近本地C编译器时提供的水平。

正确的设置方法:

1、在Oracle数据库的spfile或pfile中设置PLSQL_CCFLAGS参数,例如:

alter system set PLSQL_CCFLAGS=’-g -z noexecstack -z relro -z now’ scope=spfile;

2、重启数据库,使新参数生效:

shutdown immediate
startup

3、验证新参数是否生效:

show parameter PLSQL_CCFLAGS

官方英文解释

PLSQL_CCFLAGS provides a mechanism that allows PL/SQL programmers to control conditional compilation of each PL/SQL library unit independently.

Property Description

Parameter type

String

Syntax

PLSQL_CCFLAGS = ‘<v1>:<c1>,<v2>:<c2>,…,<vn>:<cn>’

Default value

Empty string

Modifiable

ALTER SESSION, ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

Any string literal that satisfies the internal syntax

Basic

No

Examples

ALTER SESSION SET PLSQL_CCFLAGS = 'DeBug:TruE';

ALTER SESSION SET PLSQL_CCFLAGS = 'debug:TRUE';

Values

  • <vi> has the form of an unquoted PL/SQL identifier. It is unrestricted and can be a reserved word or a keyword. The text is insensitive to case. Each one is known as a flag or flag name. Each <vi> can occur more than once in the string, each occurrence can have a different flag value, and the flag values can be of different kinds.

  • <ci> is one of the following: a PL/SQL boolean literal, a PLS_INTEGER literal, or the literal NULL. The text is insensitive to case. Each one is known as a flag value and corresponds to a flag name.

You can define any allowable value for PLSQL_CCFLAGS. However, Oracle recommends that this parameter be used for controlling the conditional compilation of debugging or tracing code. It is recommended that the following identifiers not be used as flag name values:

  • Names of Oracle parameters (for example, NLS_LENGTH_SEMANTICS)

  • Identifiers with any of the following prefixes: PLS_, PLSQL_, PLSCC_, ORA_, ORACLE_, DBMS_, SYS_

See Also:

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


数据运维技术 » Oracle 参数 PLSQL_CCFLAGS 官方解释,作用,如何配置最优化建议