1 Reply Latest reply: Feb 24, 2012 2:36 PM by cj RSS

    How to view pending transactions?

    919671
      I have a problem where for some reason, things that should be rolled back when ocirollback is called, aren't. I'd like the user to be able to see a list of pending transactions, on that connection, but I haven't had any luck. All I find are posts about tables that I don't have.
      I wish I could tell you what version of Oracle I have, but I don't even know. rpm -qa | grep -i oracle turns up empty. I can tell you that lsb_release -a gives
      LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
      Distributor ID: RedHatEnterpriseAS
      Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
      Release: 4
      Codename: NahantUpdate8
        • 1. Re: How to view pending transactions?
          cj
          Make sure that every ociexecute call uses OCI_DEFAULT, else the active transaction in the connection will be committed.

          Make sure that your application isn't doing DDL, e.g. CREATE TABLE, since this will commit the active transaction.

          Pending transactions are shown in v$transaction, which may (or should) not be visible to normal users.
          By "list of pending transactions, on that connection" do you means list of SAVEPOINTS, or are you suspending transactions via
          a transaction manager or even by DBMS_XA?

          Use <?php phpinfo(); ?> and check you have a recent version of the PHP OCI8 extension. 1.3 onwards is OK, 1.4 onwards is good.
          You can get the latest source from http://pecl.php.net/package/oci8