Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The database alias name or database name "" could not be found. SQLSTATE=42705 error #33

Closed
rochal opened this issue Apr 3, 2015 · 12 comments

Comments

@rochal
Copy link

rochal commented Apr 3, 2015

Hi,

I'm trying to connect to Informix database and I'm getting following error:

{ [Error: [IBM][CLI Driver] SQL1013N  The database alias name or database name "" could not be found.  SQLSTATE=42705
]
  error: '[node-odbc] SQL_ERROR',
  message: '[IBM][CLI Driver] SQL1013N  The database alias name or database name "" could not be found.  SQLSTATE=42705\
r\n',
  state: '08001' }

My configuration is as follows:

ibmdb.open("DRIVER={Informix};DATABASE=my_db_name;SERVER=my_db_server;HOST=127.0.0.1;UID=my_user;PWD=my_user_pwd;PORT=8000;PROTOCOL=onsoctcp;", function (err,conn) {
if (err) return console.log(err);
// query goes here...
});

Note the above meant to map to the following connection string: jdbc:informix-sqli://127.0.0.1:8000/my_db-name:INFORMIXSERVER= my_db_server.

I can connect to the same instance of Informix using a GUI DBVisualizer tool using same credentials so it's not the problem with the instance itself.

Any idea why the connection string in ibmdb.open does not correctly recognize my database name?

@avikalar
Copy link
Contributor

avikalar commented Apr 6, 2015

Hi Piotr,

Which version of Informix are you using ? Can you please refer to the issue(#25). It talks about connecting to an Informix server

@rochal
Copy link
Author

rochal commented Apr 6, 2015

Hi @avikalar,

I'm connecting to Informix version 11.70.FC7XOB4.

@rochal
Copy link
Author

rochal commented Apr 6, 2015

From linked google discussion I read "onsoctcp" is not supported (this is what I was using to get the error above), but when I use TCPIP protocol I instead get this connection error:

{ [Error: [IBM][CLI Driver] SQL30081N  A communication error has been detected. Communication protocol being used: "TCP/
IP".  Communication API being used: "SOCKETS".  Location where the error was detected: "127.0.0.1".  Communication fu
nction detecting the error: "recv".  Protocol specific error code(s): "*", "*", "0".  SQLSTATE=08001
]}

Does it mean I should be using TCPIP protocol?

@avikalar
Copy link
Contributor

avikalar commented Apr 7, 2015

You need to use the TCPIP protocol. Can you please check if you are connecting to the correct PORT by finding an entry for DRDA protocol nettype in sqlhost file of Informix server. To check if DRDA is enabled please check entries in your sqlhost file by running 'echo $INFORMIXSQLHOSTS'. If it is empty or not set you can find sqlhost file under $INFORMIXDIR/etc/sqlhosts. If the sqlhost file has an entry with drsoctcp protocol , then use that port number in the connection string. If not found enable DRDA by adding a new entry into the sqlhost file. Then you can connect to the db using the following connection string with the port number taken from the sqlhost file entry for drsoctcp and protocol set to TCPIP.

@bimalkjha
Copy link
Member

@rochal I hope, you are not facing this issue now. If so, can we close this ticket?

@achurak
Copy link

achurak commented Jun 15, 2015

So what can I do if the Informix server I need to connect to only supports onsoctcp?
Is there any way to overcome this issue?

@bimalkjha
Copy link
Member

@achurak all informix server supports both onsoctcp and drsoctcp. You just need to configure it on server. If Informix server is not configured for drsoctcp, you can not correct to such server using node ibm_db driver.

@achurak
Copy link

achurak commented Jun 15, 2015

@bimalkjha What I meant to say was that I don't have access to this server's settings. That's too bad, but thanks for the reply anyway.

@robert-shade
Copy link

@bimalkjha Will onsoctcp ever be supported? Cisco's products make use of Informix and they only expose onsoctcp.

@bimalkjha
Copy link
Member

@robert-shade No node ibm_db driver can't support onsoctcp. It uses underlying DB2 CLI/ODBC driver which supports only DRDA protocol. Thanks.

@forrejam
Copy link

@bimalkjha Thats a pitty I wanted to use this against Cisco CCX Informix database. How hard would it be to use a different ODBC driver? Like the one contained in the Informix client sdk. Would it be a huge undertaking to build some abstractions into this library that would allow us to swap out the ODBC Driver?

@bimalkjha
Copy link
Member

@Gumpy @robert-shade For node.js application connectivity against Cisco CCX Informix database, you can install ifx_db using npm install ifx_db. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants