位置: 编程技术 - 正文
推荐整理分享PHP:oci_set_action()的用法_Oracle函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 5.3.2, PECL OCI8 >= 1.4.0)
oci_set_action — Sets the action name
说明 bool oci_set_action ( resource $connection , string $action_name )Sets the action name for Oracle tracing.
The action name is registered with the database when the next roundtrip from PHP to the database occurs, typically when an SQL statement is executed.
The action 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() 返回。
action_nameUser chosen string up to bytes long.
返回值成功时返回 TRUE, 或者在失败时返回 FALSE。
范例
Example #1 Setting the action
<?php$c=oci_connect('hr','welcome','localhost/XE');//Recordtheactionoci_set_action($c,'FriendLookup');//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_client_info() - Sets the client information oci_set_client_identifier() - Sets the client identifier
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
PHP:oci_server_version()的用法_Oracle函数 oci_server_version(PHP5,PECLOCI8=1.1.0)oci_server_version返回服务器版本信息说明stringoci_server_version(resource$connection)以字符串返回connection所连接的Oracle服务器的版本
标签: PHP:oci_set_action()的用法_Oracle函数
本文链接地址:https://www.jiuchutong.com/biancheng/275234.html 转载请保留说明!友情链接: 武汉网站建设