位置: 编程技术 - 正文

PHP:oci_set_module_name()的用法_Oracle函数

编辑:rootadmin
oci_set_module_name

推荐整理分享PHP:oci_set_module_name()的用法_Oracle函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 5.3.2, PECL OCI8 >= 1.4.0)

oci_set_module_name — Sets the module name

说明 bool oci_set_module_name ( resource $connection , string $module_name )

Sets the module name for Oracle tracing.

The module name is registered with the database when the next &#;roundtrip&#; from PHP to the database occurs, typically when an SQL statement is executed.

The name can subsequently be queried from database administration views such as V$SESSION. It can be used for tracing and monitoring such as with V$SQLAREA and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE.

The value may be retained across persistent connections.

参数

connection

Oracle 连接标识,由oci_connect(),oci_pconnect(),或oci_new_connect() 返回。

module_name PHP:oci_set_module_name()的用法_Oracle函数

User chosen string up to bytes long.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

注释

Note: Oracle 版本需求

当 PHP 是与 Oracle 数据库 g 及更新版本的 扩展库链接时,此函数可用。

Tip性能

使用旧版的 OCI8 或 ORACLE 数据库 ,可使用 Oracle DBMS_APPLICATION_INFO 包来设置客户端信息。这比使用 oci_set_client_info() 较低效。

CautionRoundtrip Gotcha

一些 OCI8 函数会导致 Roundtrips. 对数据库来说当启用结果缓存时,查询可能不产生Roundtrips。

范例

Example #1 Setting the module name

<?php$c=oci_connect('hr','welcome','localhost/XE');//Recordthemoduleoci_set_module_name($c,'HomePage');//Codethatcausesaroundtrip,forexampleaquery:$s=oci_parse($c,'select*fromdual');oci_execute($s);oci_fetch_all($s,$res);sleep();?>

参见

oci_set_action() - Sets the action name oci_set_client_info() - Sets the client information oci_set_client_identifier() - Sets the client identifier

PHP:oci_set_prefetch()的用法_Oracle函数 oci_set_prefetch(PHP5,PECLOCI8=1.1.0)oci_set_prefetch设置预提取行数说明booloci_set_prefetch(resource$statement[,int$rows])在成功调用oci_execute()之后设定预提取的行数。rows的

PHP:oci_set_client_identifier()的用法_Oracle函数 oci_set_client_identifier(PHP5.3.2,PECLOCI8=1.4.0)oci_set_client_identifierSetstheclientidentifier说明booloci_set_client_identifier(resource$connection,string$client_identifier)Setstheclientidentifi

PHP:oci_set_edition()的用法_Oracle函数 oci_set_edition(PHP5.3.2,PECLOCI8=1.4.0)oci_set_editionSetsthedatabaseedition说明booloci_set_edition(string$edition)Setsthedatabaseeditionofobjectstobeusedbyasubsequentconnections.OracleEditionsallo

本文链接地址:https://www.jiuchutong.com/biancheng/275229.html 转载请保留说明!

上一篇:PHP:oci_statement_type()的用法_Oracle函数

下一篇:PHP:oci_set_prefetch()的用法_Oracle函数

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络