aci_set_db_operation¶
aci_set_db_operation-设置数据库操作
说明¶
aci_set_db_operation(resource $connection, string $action): bool
设置神通数据库跟踪的DBOP。
当从PHP到数据库的下一次“往返”发生时(通常是在执行SQL语句时),数据库操作名将注册到数据库。
返回值¶
成功时返回 true, 或者在失败时返回 false。
范例¶
示例 #1 Setting the DBOP
<?php
$c = aci_connect('hr', 'welcome', 'localhost/XE');
// Record the operation
aci_set_db_operation($c, 'main query');
// 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 database operations
// being performed:
sqlplus system/welcome
SQL> select dbop_name from v$sql_monitor;
注释¶
警告
警告 Roundtrip Gotcha 一些 ACI8 函数会导致 Roundtrips. 对数据库来说当启用结果缓存时,查询可能不产生 Roundtrips。