3 Replies Latest reply on Dec 1, 2016 7:45 PM by Bjoern Steffens

    DB2 Deadlock Reason Code 68

    Bjoern Steffens

      Colleagues,

       

      I have Tableau Desktop V10 installed and have issues connecting to a DB2 database. I get the following error message trying to connect.

       

      tableau_dashDB_ConnectIssue.png

       

      I have verified the following:

       

      1)     I can telnet to the server from the Windows command line (telnet server_ip_address 50000)

      2)     I can connect and query the database using razorSQL from the Windows machine

      3)     I have cleared the Tableau cache (Clearing the Tableau Desktop Query Cache | Tableau Software)

      4)     I can change the database connection to another database and see data fine. Switching back to the one I need gets me the error message above

       

      What else can I do to "reset" the DB2 connection for Tableau Desktop?

       

      ThnX in advance for any hints and tips!

        • 1. Re: DB2 Deadlock Reason Code 68

          Hi Bjoern Steffens,

           

          This specific error is issued from the DB2 database and indicates that the database wasn't able to perform the operation that the Tableau Online sync client requested. Based on this information, I have a few follow-up questions:

           

          1. During the same time frame of the scheduled refresh (10:05 am for Ops Custom Report Source and 10:16am for Dan's Working File SQL Source), attempt to manually refresh the data source through Tableau Desktop using the following steps:
            1. In Tableau Desktop, open a workbook that is connected to the published data source, or create a new data source connected to the published data source.
            2. Go to Data > [name of the data source] > Tableau Data Server > Refresh from Source.
          2. Does this issue occur for all published data sources connected to this DB2 database, or only some of them?
          3. Does an error occur if you refresh the data source manually through the sync client using the Run Now (circular arrow) icon?

           

          Please reply to this message with the above information and then I will continue my investigation.

          Thank you!

          • 2. Re: DB2 Deadlock Reason Code 68
            AB Commendatore

            HI Bjoern,

             

            As Lénaïc mentions, the error is coming from the DB2 database and Tableau is simply reporting it to you. This type of error can occur when other users are running queries at the same time you are trying to access the same data. To determine what else is accessing the data you need, you'll need to query the database directly. If you are not the database administrator for this database, you'll likely need to reach out to that person to give you a hand here because initial investigation of the lock will need to be conducted on the database itself.

             

            This stackoverflow article has directions that can be used to investigate the lock and  some Microsoft documentation on correcting the issue and preventing it moving forward:

            DB2 deadlock timeout Sqlstate: 40001, reason code 68 due to update statements called from servlet using SQL - Stack Over…

             

            Also, here's some Microsoft documentation on why this issue occurs and how to reset the lock:

            IBM Knowledge Center

            IBM Resolving SQL0911N Reason Code = 68 - United States

            • 3. Re: DB2 Deadlock Reason Code 68
              Bjoern Steffens

              HI,

               

              Yes this was indeed related to a DB2 error. The issue was a specific problem where the server was not able to provide the meta data about the table. Funnily enough tooling and applications not reading that specific metadata (Table columns, indexes etc) were able to grab the data hence our confusion that some tooling could still function and others not.

               

              Perhaps this is something to think about going forward? If you cannot read the table and database meta data, just try and read the data and return that with an appropriate warning message instead of doing nothing?

               

              Rgds,

              Bjoern