Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    265

    Unanswered: Database connect error..?

    Hi, I have noticed this error when I try to connect sometimes.. how do I prevent it from coming up? We have Linux DB2 UDB version 8.1 FP 18


    [nrg1@localhost ~]$ db2 connect to dbname
    SQL0752N Connecting to a database is not permitted within a logical unit of
    work when the CONNECT type 1 setting is in use. SQLSTATE=0A001

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Code:
    SQL0752N  Connecting to a database is not permitted within a logical
          unit of work when the CONNECT type 1 setting is in use.
    
    Explanation:
    
    An attempt was made to connect to either another database or the same
    database before issuing a COMMIT or ROLLBACK statement. The request
    cannot be processed within a CONNECT type 1 environment.
    
    User response:
    
    
    *  Submit a COMMIT or ROLLBACK statement before requesting a connection
       to another database.
    *  If multiple databases need to be updated within a unit of work,
       change the connection settings to SYNCPOINT TWOPHASE and CONNECT 2 by
       re-precompiling or by issuing the SET CLIENT API from within the
       application.
    
     sqlcode: -752
    
     sqlstate: 0A001
    As the error stipulates, you are trying to connect to either the same database or a different one while you have an active unit of work. You need to issue COMMIT or ROLLBACK before connecting.

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •