Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Getting error can't serialize access for this transaction

Getting error can't serialize access for this transaction

Scheduled Pinned Locked Moved Database
helpcsharporacle
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kjsl2k9
    wrote on last edited by
    #1

    Hi All, I am using Oracle Transaction for getting records from Oracle 11g from my .net Application while retreiving the records I am getting the error, ORA-08177 can't serialize access for this transaction error. How can this problem be solved from transactions while using in .net Application. Thanks.

    W 1 Reply Last reply
    0
    • K kjsl2k9

      Hi All, I am using Oracle Transaction for getting records from Oracle 11g from my .net Application while retreiving the records I am getting the error, ORA-08177 can't serialize access for this transaction error. How can this problem be solved from transactions while using in .net Application. Thanks.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Hi, There are several possible reasons for this. Beasically the problem is that when the transaction is run in SERIALIZABLE mode some data change has been encountered so the transaction fails. If READ COMMMITTED would have been used the data would have been gotten based on SCN's and undo information. Few things you could check: - are triggers involved - do you have autonomus transactions - is the SERIALIZABLE mode hte isolation level you really want to use

      The need to optimize rises from a bad design.My articles[^]

      K 1 Reply Last reply
      0
      • W Wendelius

        Hi, There are several possible reasons for this. Beasically the problem is that when the transaction is run in SERIALIZABLE mode some data change has been encountered so the transaction fails. If READ COMMMITTED would have been used the data would have been gotten based on SCN's and undo information. Few things you could check: - are triggers involved - do you have autonomus transactions - is the SERIALIZABLE mode hte isolation level you really want to use

        The need to optimize rises from a bad design.My articles[^]

        K Offline
        K Offline
        kjsl2k9
        wrote on last edited by
        #3

        Hi, Thanks for reply.I am using the Serializable mode but there no autonomus transactions and triggers.But, there are only multiple queries like first there is an insertion in a table, then deletion from the same table and then selection from other tables and so on. Also, while doing a new transaction the connection is reopened every time with the Oracle. Thanks.

        W 1 Reply Last reply
        0
        • K kjsl2k9

          Hi, Thanks for reply.I am using the Serializable mode but there no autonomus transactions and triggers.But, there are only multiple queries like first there is an insertion in a table, then deletion from the same table and then selection from other tables and so on. Also, while doing a new transaction the connection is reopened every time with the Oracle. Thanks.

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          As this is a concurrency problem it's kinda hard pointing out the problem without seeing the whole scenario. However to demonstrate the problem, do the following: 1. Create a test table and insert data into it

          CREATE TABLE Test (
          a NUMBER PRIMARY KEY NOT NULL
          );
          INSERT INTO Test VALUES (1);
          COMMIT;

          2. Now in this session start a transaction and delete the rows. Leave the transaction open

          -- SESSION 1
          ALTER SESSION SET ISOLATION_LEVEL=SERIALIZABLE;
          DELETE FROM Test;

          3. Start another session and select data from the test table in serializable mode

          -- SESSION 2
          ALTER SESSION SET ISOLATION_LEVEL=SERIALIZABLE;
          SELECT a FROM Test FOR UPDATE OF a;

          4. The session 2 hangs and waits for the result from session 1. Now go back to session 1 and commit the transaction:

          -- SESSION 1
          COMMIT;

          The result in session 2 is:

          SELECT a FROM Test FOR UPDATE OF a
          *
          ERROR at line 1:
          ORA-08177: can't serialize access for this transaction

          Hopefully this clarifies the problem. Best regards, mika

          The need to optimize rises from a bad design.My articles[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups