aci_set_client_info¶
aci_set_client_info-设置客户端信息
说明¶
aci_set_client_info(resource $connection, string $client_info): bool
设置数据库跟踪的客户端信息。
当从PHP到数据库的下一次“往返”发生时(通常是在执行SQL语句时),客户机信息会注册到数据库。
随后可以从数据库管理视图(如V$SESSION)查询客户机信息。
该值可以跨持久连接保留。
返回值¶
成功时返回 true, 或者在失败时返回 false。
范例¶
示例 #1 Setting the client information
<?php
$c = aci_connect('sysdba', 'szoscar55', 'localhost:2003/OSRDB');
// Record the client information
aci_set_client_info($c, 'My Application Version 2');
// Code that causes a round-trip, for example a query:
$s = aci_parse($c, 'select * from dual');
aci_execute($s);
aci_fetch_all($s, $res);
sleep(30);
?>
// While the script is running, the administrator can see the client
// information:
sqlplus system/welcome
SQL> select client_info from v$session;
注释¶
警告
警告 Roundtrip Gotcha 一些 ACI8 函数会导致 Roundtrips. 对数据库来说当启用结果缓存时,查询可能不产生 Roundtrips。