If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2, Instances and PHP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-17-09, 04:55
Fredodido Fredodido is offline
Registered User
 
Join Date: Jun 2009
Posts: 3
DB2, Instances and PHP

Hello all,

Got 2 db2 instances DB2 and DB2_915, using on IBM z/VM 9 & 10. (DB2 CONNECT Client 8.1 on Windows )

I have cataloged LATIN1(819) DB on DB2 ($server1) and CYRILLIC (915) DB on DB2_915 ($server2)

I have set codepage by DB2SET CODEPAGE=xxx for each one.
So, that works and i can connect and select in every DB.

On php, when using

putenv("DB2INSTANCE=DB2");
$db = db2_connect($server1,$Logindba1,$Passdba1);
putenv("DB2INSTANCE=DB2_915");
$db = db2_connect($server2,$Logindba2,$Passdba2);

The first is ok, second returns [IBM][CLI Driver] SQL3282N error.

if I change order

putenv("DB2INSTANCE=DB2_915");
$db = db2_connect($server1,$Logindba1,$Passdba1);
putenv("DB2INSTANCE=DB2");
$db = db2_connect($server2,$Logindba2,$Passdba2);

The first is ok, second returns [IBM][CLI Driver] SQL3282N error.

So that works separately in PHP pages.

But I dont understand :
when I use db2_connect function, the following putenv() fonction seems to be inoperand.

I can't use one instance, cause DB are in different codepages.
I need to connect several DB in same PHP Page

Any solution ?

Thanks
Fred

Last edited by Fredodido; 06-17-09 at 05:00.
Reply With Quote
  #2 (permalink)  
Old 09-02-09, 06:03
Fredodido Fredodido is offline
Registered User
 
Join Date: Jun 2009
Posts: 3
up ! if someone got any solution
Reply With Quote
  #3 (permalink)  
Old 09-02-09, 17:22
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I would start with reading the explanation for the error message:
Quote:
SQL3282N The supplied credentials are not valid.

Explanation:

Either or both the distinguished name (DN) of the user and the password
that were specified were not valid.

This error may occur when a user is running in a Windows 2000 domain
environment , which supports LDAP, and logs into a local account which
may not have sufficient authority.

User response:

Resubmit the command using valid values for both the distinguished name
(DN) of the user and the password.

If you are working in a Windows 2000 domain environment, ensure that
logon with an account that has sufficient authority.
SQL3282N The supplied credentials are not valid.

Explanation:

Either or both the distinguished name (DN) of the user and the password
that were specified were not valid.

This error may occur when a user is running in a Windows 2000 domain
environment , which supports LDAP, and logs into a local account which
may not have sufficient authority.

User response:

Resubmit the command using valid values for both the distinguished name
(DN) of the user and the password.

If you are working in a Windows 2000 domain environment, ensure that
logon with an account that has sufficient authority.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On