Using DRDA connections

General discussion on Zend Core for IBM System i
Post Reply
rbaril
Posts: 9
Joined: Tue Apr 28, 2009 5:15 pm
Location: Winnipeg, MB, Canada
Contact:

Using DRDA connections

Post by rbaril » Tue Apr 28, 2009 5:24 pm

I'm trying to access an LPAR database using DRDA but I can't seem to get it working.
Here's the results from displaying the remote database from WRKRDBDIRE

Relational database . . . . . . : TRAF9406
Relational database alias . . : TWEB
Remote location:
Remote location . . . . . . . : 10.0.1.7
Type . . . . . . . . . . . . : *IP
Port number or service name . : *DRDA
Remote authentication method:
Preferred method . . . . . . : *USRID
Allow lower authentication . : *ALWLOWER
Text . . . . . . . . . . . . . . : DRDA LINK TO TWEB DATABASE
Relational database type . . . . : *REMOTE

I'm accessing using this: $conn = i5_pconnect('TWEB','','');
I've tried several username/password combinations to no avail.
Error results were:
Error number: 8
Error category: 6
Error message: TCP/IP error 8
Error description: Hostname and service name not provided or found on TWEB:6078

Any help would be appreciated!

ledahu
Posts: 19
Joined: Mon Mar 23, 2009 9:36 am

Re: Using DRDA connections

Post by ledahu » Tue Apr 28, 2009 8:41 pm

I never try to connect lpar database but i think you can't do it without free license from aura.

Try to register your ZendCore here http://www.easycom-aura.com/en/registration_php.asp.
This registration give you limited support for i5_toolkit.

David

rbaril
Posts: 9
Joined: Tue Apr 28, 2009 5:15 pm
Location: Winnipeg, MB, Canada
Contact:

Re: Using DRDA connections

Post by rbaril » Wed Apr 29, 2009 2:54 pm

I guess I should let you know that we have Zend Platform installed (fully licensed) and we're running V5R3 (upgrading shortly to V6R1). So I don't think licensing is an issue...

ledahu
Posts: 19
Joined: Mon Mar 23, 2009 9:36 am

Re: Using DRDA connections

Post by ledahu » Thu Apr 30, 2009 8:35 am

With ZendCore for I5 you can connect to local database only. If you want to connect drda database, you have to register your ZendCore as i said in my last post.
Zend Platform do not give you multi database license.
Easycom was chosen to be installed with every PHP For i5/OS. It is the i5 Toolkit.
By installing PHP For i5/OS, you have got restricted usage rights on EASYCOM For PHP.
Register and get an extended license to increase the capabilities of your “PHP i5 Toolkit” on your System i.

* You can ask our technical support about Easycom and PHP i5 Toolkit.
* You will get the ability to connect to multiple System i, using PHP i5 Toolkit.

User avatar
shlomov
Zend Global Support
Posts: 139
Joined: Mon Dec 29, 2008 2:38 pm

Re: Using DRDA connections

Post by shlomov » Thu Apr 30, 2009 4:10 pm

In addition to previous notes:

1. The i5_connect refers to the host name/ip of the i5/OS it is running on and as such can only reference the local DB2.
$conn = i5_connect($hostname,$username,$password,array(I5_OPTIONS_SQLNAMING => "SQL", I5_OPTIONS_DECIMALPOINT =>'.'));

2. Unlike, the db_connect uses the name of the relational data base described in the connection and will refer to this DB2 name regardless of local or remote.
$conn = db2_connect($DB2_Name, $user, $password, array("i5_lib"=>"MY_LIB"));

3. You can always define a DDM file.
4. Use the previous suggestions and install the toolkit on the second i5 LPAR.
Shlomo Vanunu
IBM System i

rbaril
Posts: 9
Joined: Tue Apr 28, 2009 5:15 pm
Location: Winnipeg, MB, Canada
Contact:

Re: Using DRDA connections

Post by rbaril » Thu Apr 30, 2009 6:07 pm

Thanks for clarifying that Shlomo! I used db2_connect with no username and password and it worked perfectly! Does that mean it's running as user Nobody?

User avatar
shlomov
Zend Global Support
Posts: 139
Joined: Mon Dec 29, 2008 2:38 pm

Re: Using DRDA connections

Post by shlomov » Tue May 05, 2009 2:36 pm

i5/OS DB2 data access considerations:

1. When you create the connection to a DB2 for i5/OS (with db2_connect) without specifying the user profile(user ID/password), the database is accessed within the same process that the PHP script is executed.
2. When you create the connection by passing the user profile, then the database is accessed through a QSQSRVR server job.
Shlomo Vanunu
IBM System i

User avatar
shlomov
Zend Global Support
Posts: 139
Joined: Mon Dec 29, 2008 2:38 pm

Re: Using DRDA connections

Post by shlomov » Tue May 05, 2009 2:37 pm

To your question:
Yes, the user NOBODY is used when no profile is attached.
Shlomo Vanunu
IBM System i

Post Reply