473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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
Jul 22 '07 #1
4 12766
pbmods
5,821 Expert 4TB
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.
Jul 22 '07 #2
HI,
This is the code. Works on Testserver.
Expand|Select|Wrap|Line Numbers
  1. <?php function dbconnect($verbose) {
  2.  
  3. // _GET Variabelen
  4. //include 'initial.inc';
  5.  
  6. $dbname = 'ATC';
  7. $username = 'db2inst2';
  8. $password = 'xxxxxxxx';
  9.  
  10.  
  11. // db2_connect returns 0 if the connection attempt fails;
  12. // otherwise it returns a connection ID used by other functions
  13. $pconn = db2_pconnect($dbname, $username, $password);
  14.  
  15.  
  16. if ($pconn) {
  17.  //echo "Persistent connection succeeded.";
  18. }
  19. else {
  20.       $SQLState = db2_conn_error();
  21.       echo("<B>Persistent Connection to ATC failed.</B><BR>$SQLState<BR>");
  22.       $sqlerror = db2_conn_errormsg();
  23.       printf("%s\n", $sqlerror);
  24. }
  25. return($pconn);
  26. }
  27. ?>
  28.  
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
Jul 22 '07 #3
pbmods
5,821 Expert 4TB
Heya, Gert.

According to IBM:
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 "DB2INSTANCE" 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.
Jul 22 '07 #4
Heya, Gert.

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

Thanks Gert
Jul 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bob Sparks | last post by:
I upgraded to stinger and got stung. Not all my code compiles. Most of the problems are stinger seems to be more stringent on casting varchars to vargraphics. This I am working out, however, one...
1
by: Oliver Stratmann | last post by:
Hello All, could anyone give me a clou about the above reason code? (Database Version 7.2 UDB on a Windows 2000 Machine) This is what i did: <Begin-Quote> db2 => insert into e_deka_einzel...
5
by: apple | last post by:
UDBV8 fp 6a - AIX 5.1 We have scheduled cron jobs to do backups. Periodically and starting to occur more frequently, a backup fails with this error: SQL2072N Unable to bind the shared library...
6
by: Wito | last post by:
hi, I want to backup database (db2, aix 5.1) using script. When I exec script logging to user db2inst1 then is everything ok, but from cron, I get these error: SQL10007N Message "-1390" could...
3
by: Praveen_db2 | last post by:
Hi All db2 version 8.2.2 Windows I have installed the database and created Sample db. Now when I am giving db2stop ,it says C:\Documents and Settings\buntyaru>db2stop 11/10/2005 00:13:14 ...
3
by: nan | last post by:
Hi All, I am trying to connect the Database which is installed in AS400 using DB2 Client Version 8 in Windows box. First i created the Catalog, then when i selected the connection type...
4
by: jason.awlt | last post by:
Greetings, I recently being bugged by the following error on my DB2. SQL0902C SQLSTATE = 58005 Reason Code = 14 This error comes out everytime i tried to insert some record to a table...
3
by: edmundleungs | last post by:
I have a db2 account on AIX. After connecting to AIX using SSH, i use the account to connect to DB. When I use "db2 connect <DB name>", it works fine. However, when i use "db2 connect to <DB...
2
by: Serman D. | last post by:
Hi all, I'm trying to complete the samples from the excellent 2003 developerWorks article "Bringing the Power of Regular Expression Matching to SQL" by Knut Stolze: http://tinyurl.com/3bhrnn...
1
by: Rudolf Bargholz | last post by:
Hi, We have created triggers to log modifications to tables in our application. The triggers work fine, just on one of the tables in our database the triggers fail with the error message...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.