0

I am able to connect to our database given the following connection string (OLEDB).

"Provider=IBMDA400;Data Source=10.33.xx.x;User Id=user;Password=pass;Default Collection=mm370lib;";

Then tried (Python ibm_db)

import ibm_db, ibm_db_dbi
ibm_db_conn = ibm_db.connect("DRIVER={IBM DB2 CLI DRIVER};DATABASE=mm370lib;HOSTNAME=10.33.xx.x;PORT=446;PROTOCOL=TCPIP;UID=user;PWD=pass;", '', '')

But this error occured.

Exception: [IBM][CLI Driver] SQL30061N  The database alias or database name "MM370LIB          " was not found at the remote node.  SQLSTATE=08004 SQLCODE=-30061

What did I missed? Are the database Name and Default Collection different?

1 Answer 1

2

Yes, the DB name is usually the system name; though it doesn't have to be.

Originally, the AS/400 support only a single DB.

With the introduction of independent storage pools (iASP), today's IBM i machines can have multiple DBs.

From a 5250 session, try:

WRKRDBDIRE

Look for the *LOCAL entry, may be the only one.

You can also see the DB names using IBM i Navigator for Windows or the web based IBM Navigator. The DB names are shown under the "Databases" iNav for Windows screen shot,
there are three DBs on the system: Rchasma1, Iasp320, Ima1db1.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.