位置: 编程技术 - 正文
推荐整理分享PHP:oci_set_client_identifier()的用法_Oracle函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 5.3.2, PECL OCI8 >= 1.4.0)
oci_set_client_identifier — Sets the client identifier
说明 bool oci_set_client_identifier ( resource $connection , string $client_identifier )Sets the client identifier used by various database components to identify lightweight application users who authenticate as the same database user.
The client identifier is registered with the database when the next roundtrip from PHP to the database occurs, typically when an SQL statement is executed.
The identifier can subsequently be queried, for example with SELECT SYS_CONTEXT(USERENV,CLIENT_IDENTIFIER) FROM DUAL. Database administration views such as V$SESSION will also contain the value. It can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE for tracing and can also be used for auditing.
The value may be retained across page requests that use the same persistent connection.
参数connection
Oracle 连接标识,由oci_connect(),oci_pconnect(),或oci_new_connect() 返回。
client_identifierUser chosen string up to bytes long.
返回值成功时返回 TRUE, 或者在失败时返回 FALSE。
范例
Example #1 Setting the client identifier to the application user
<?php//Findtheapplicationuser'sloginnamesession_start();$un=my_validate_session($_SESSION['username']);$c=oci_connect('myschema','welcome','localhost/XE');//TellOraclewhothatuserisoci_set_client_identifier($c,$un);//Thenextroundtriptothedatabasewillpiggybacktheidentifier$s=oci_parse($c,'selectmydatafrommytable');oci_execute($s);//...?> 注释 CautionRoundtrip Gotcha一些 OCI8 函数会导致 Roundtrips. 对数据库来说当启用结果缓存时,查询可能不产生Roundtrips。
参见oci_set_module_name() - Sets the module name oci_set_action() - Sets the action name oci_set_client_info() - Sets the client information
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
PHP:oci_set_client_info()的用法_Oracle函数 oci_set_client_info(PHP5.3.2,PECLOCI8=1.4.0)oci_set_client_infoSetstheclientinformation说明booloci_set_client_info(resource$connection,string$client_info)SetstheclientinformationforOracletracing.The
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_set_client_identifier()的用法_Oracle函数
本文链接地址:https://www.jiuchutong.com/biancheng/275231.html 转载请保留说明!友情链接: 武汉网站建设