logo  
Google
 

DB2 SQL-Error: -842

SQLState: 08002

Short Description: A CONNECTION TO ALREADY EXISTS

One of the following situations occurred: v A CONNECT statement identifies a location with which the application process has a private connection, using system-directed access. v SQLRULES(STD) is in effect and a CONNECT statement identifies an existing SQL connection. v A private connection, using system-directed access, cannot be established because of an existing SQL connection to that location. v A CONNECT (type 2) request that includes the USER/USING clause identifies an existing SQL connection.System action: The statement cannot be executed. Programmer response: The correction depends on the error, as follows: v If the location name is not the intended name, correct it. v If SQLRULES(STD) is in effect and the CONNECT statement identifies an existing SQL connection, replace the CONNECT with SET CONNECTION or change the option to SQLRULES(DB2). v If the CONNECT statement identifies an existing private connection, destroy that connection (by using the RELEASE statement in a previous unit of work) before executing the CONNECT statement. If the SQL statements following the CONNECT can be executed using system-directed access, an alternative solution is to change the application to use that method. v If system-directed access cannot be used, destroy the conflicting SQL connection (by using the RELEASE statement in a previous unit of work) before executing the SQL statement that requires system-directed access. An alternative solution is to change the application so that only application-directed access is used. v Destroy the connection (by using the RELEASE statement in a previous unik of work) before executing the CONNECT statement which includes the USER/USING clause. Correct the error in the application, rebind the plan or package, and resubmit the job.

 <-  BACK TO INDEX