位置: 编程技术 - 正文

PHP:oci_set_client_info()的用法_Oracle函数

编辑:rootadmin
oci_set_client_info

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

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

(PHP 5.3.2, PECL OCI8 >= 1.4.0)

oci_set_client_info — Sets the client information

说明 bool oci_set_client_info ( resource $connection , string $client_info )

Sets the client information for Oracle tracing.

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

The client information can subsequently be queried from database administration views such as V$SESSION.

The value may be retained across persistent connections.

参数

connection

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

client_info PHP:oci_set_client_info()的用法_Oracle函数

User chosen string up to bytes long.

返回值

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

范例

Example #1 Setting the client information

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

注释

Note: Oracle 版本需求

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

Tip性能

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

CautionRoundtrip Gotcha

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

参见

oci_set_module_name() - Sets the module name oci_set_action() - Sets the action name oci_set_client_identifier() - Sets the client identifier

PHP:oci_set_action()的用法_Oracle函数 oci_set_action(PHP5.3.2,PECLOCI8=1.4.0)oci_set_actionSetstheactionname说明booloci_set_action(resource$connection,string$action_name)SetstheactionnameforOracletracing.Theactionnameisregisteredwiththe

PHP:oci_pconnect()的用法_Oracle函数 oci_pconnect(PHP5,PECLOCI8=1.1.0)oci_pconnect使用一个持久连接连到Oracle数据库说明resourceoci_pconnect(string$username,string$password[,string$db[,string$charset[,int$session_mode]]])oci

PHP:oci_rollback()的用法_Oracle函数 oci_rollback(PHP5,PECLOCI8=1.1.0)oci_rollback回滚未提交的事务说明booloci_rollback(resource$connection)oci_rollback()回滚Oracle连接connection上所有未提交的语句。成功时返回T

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

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

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

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

鄂ICP备2023003026号

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

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