PHP 8.1.28 Released!


(PHP 7 >= 7.2.14, PHP 8, PHP 7 >= 7.3.1, PHP 8, PECL OCI8 >= 2.2.0)

oci_set_db_operationSets the database operation


oci_set_db_operation(resource $connection, string $action): bool

Sets the DBOP for Oracle tracing.

The database operation name is registered with the database when the next 'round-trip' from PHP to the database occurs, typically when a SQL statement is executed.

The database operation can subsequently be queried from database administration views such as V$SQL_MONITOR.

The oci_set_db_operation() function is available when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later).

Bağımsız Değişkenler


An Oracle connection identifier, returned by oci_connect(), oci_pconnect(), or oci_new_connect().


User chosen string.

Dönen Değerler

Başarı durumunda true, başarısızlık durumunda false döner.


Örnek 1 Setting the DBOP


= oci_connect('hr', 'welcome', 'localhost/XE');

// Record the operation
oci_set_db_operation($c, 'main query');

// Code that causes a round-trip, for example a query:
$s = oci_parse($c, 'select * from dual');
oci_fetch_all($s, $res);


// 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;



Round-trip Gotcha

Some but not all OCI8 functions cause round-trips. Round-trips to the database may not occur with queries when result caching is enabled.

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top