0
votes

I have a problem connecting to DB2 through VBScript. I am using the connecting string as

Driver={IBM DB2 ODBC DRIVER};Database=mydatabase;Hostname=myHostName;Port=myPortName;Protocol=TCPIP;Uid=myUserID;Pwd=myPassword;

Upon using the above connection string, I am getting an error message stating:

[IBM][CLI Driver] SQL3006 1N The database alias or database name "myDatabase" was not found at the remote node. SQLSTATE=08004

Can anyone please suggest a solution for this? I tried using DBALIAS in place of Database, but it says the parameter is incorrect.

Suggestions?

2
I think the error message is pretty clear: the database with the name you specify does not exist on the server you're connecting to.mustaccio
Hi, we are using Aqua Studio to connect to DB2. The same details which are configured in Aqua studio were given in the above mentioned query. But it is not working. Is the servername same as host name?user3855882

2 Answers

0
votes

Looks like your database name is incorrect.

You can find the correct value by issuing following query in either QMF or SPUFI :

SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1
0
votes

Yes, most likely incorrect database name has been specified. Also you can not perform SQL without connection as proposed by Vivek8086, bit you can try to find it in Db2 MSTR output in JES if you have ID on remote system or try to perform -DIS DDF Db2 command (if you know Db2 SYSID).