db2_pconnect SQL10007N Reason code: "3"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gertdorn
    New Member
    • Jul 2007
    • 5

    db2_pconnect SQL10007N Reason code: "3"

    Hi All.

    I have a big problem to connect to my DB2 with (ZEND) PHP.
    On commadline and wit DB2CC everything works fine.

    If start my Webpage a-t-c.ch in some links i did a connect to DB2 in a PHP script iget this error.

    All is well configured. (see http://www.a-t-c.ch/phpinfo.php)

    db2 error description did not help. DB2INSTANCE and others is set.
    all files have premission 777 ind unix db2ins1 is also in root grop.

    Can help someone ?

    Thanks Gert
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Gert. Welcome to TSDN!

    What is the error message that you're getting?

    Let's see the code that you're using to connect to the database.

    Comment

    • gertdorn
      New Member
      • Jul 2007
      • 5

      #3
      HI,
      This is the code. Works on Testserver.
      [code=php]
      <?php function dbconnect($verb ose) {

      // _GET Variabelen
      //include 'initial.inc';

      $dbname = 'ATC';
      $username = 'db2inst2';
      $password = 'xxxxxxxx';


      // db2_connect returns 0 if the connection attempt fails;
      // otherwise it returns a connection ID used by other functions
      $pconn = db2_pconnect($d bname, $username, $password);


      if ($pconn) {
      //echo "Persistent connection succeeded.";
      }
      else {
      $SQLState = db2_conn_error( );
      echo("<B>Persis tent Connection to ATC failed.</B><BR>$SQLState <BR>");
      $sqlerror = db2_conn_errorm sg();
      printf("%s\n", $sqlerror);
      }
      return($pconn);
      }
      ?>
      [/code]
      Thist is teh error:

      Persistent Connection to ATC failed.
      08001 [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3". SQLCODE=-1013 -> Ungültige Abfrage: 08001

      No error in Error.log.

      Thanks gert

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, Gert.

        According to IBM:
        Originally posted by http://publib.boulder. ibm.com/infocenter/db2luw/v8/index.jsp?topic =/com.ibm.db2.udb .doc/core/rql10000.htm
        Message msgno could not be retrieved. Reason code: code .
        Explanation:
        The requested message <msgno> could not be retrieved from the message file. Reason code <code> is one of the following:
        1. The environment variable "DB2INSTANC E" is either not set, or is set to an invalid instance. Correct it and try again.
        2. The message file was found, but the file could not be opened because of permissions. Check the file permissions of the files under the message directory.
        3. The message file could not be found. Either the file does not exist, or the directory the message file should be in does not exist. Check that a either a 'prime' directory (the default) or a directory with the same name as the 'LANG' environment variable exists under the message directory.
        4. The requested message does not exist in the message file. Either the message file is outdated, or it is the wrong one.
        5. Either DB2CODEPAGE is set to a code page which the database does not support, or the client's locale is not supported by the database.
        6. An unexpected system error occurred. Try execution again. If problem persists, contact your IBM representative.
        7. Not enough memory. An attempt to get private memory failed. Try again.

        Comment

        • gertdorn
          New Member
          • Jul 2007
          • 5

          #5
          Originally posted by pbmods
          Heya, Gert.

          According to IBM:
          Hi, I know that, but all DB2 t works fine without using PHP. I wrote that in my problemdescript ion.

          Thanks Gert

          Comment

          Working...