DB2 Connection Erro

1,688 views
Skip to first unread message

Renee Murray

unread,
Jun 24, 2016, 1:55:40 AM6/24/16
to ibm_db
Hello,

I'm getting an error when trying to connect. Does anyone recognize this error?

Exception: [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved.  Reason code: "3". SQLCODE=-1042

Thanks,
Renee Murray

Amarnath N Reddy

unread,
Jun 24, 2016, 2:20:22 AM6/24/16
to ibm...@googlegroups.com

Hello,

Please check this link if you may find this helpful.
https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/ibm_db_on_MAC_OS_Hints_and_Tips?lang=en

It already has resolution to SQL1042C error .

If above information is not sufficient for you to resolve the error you are hitting, then let us know the following,
1. how CLI driver is installed in your machine ? Did it get installed as part of ibm_db installation or did you set IBM_DB_HOME to already installed driver in your machine.
2. check if you have set DYLD_LIBRARY_PATH and if so, where it is pointing to.

Thanks,
Amar

Inactive hide details for Renee Murray ---06/24/2016 11:26:01 AM---Hello, I'm getting an error when trying to connect. Does anyRenee Murray ---06/24/2016 11:26:01 AM---Hello, I'm getting an error when trying to connect. Does anyone recognize this

--
You received this message because you are subscribed to the Google Groups "ibm_db" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ibm_db+un...@googlegroups.com.
To post to this group, send email to
ibm...@googlegroups.com.
Visit this group at
https://groups.google.com/group/ibm_db.
For more options, visit
https://groups.google.com/d/optout.


gonzale...@gmail.com

unread,
Feb 28, 2017, 7:07:48 AM2/28/17
to ibm_db
Hi Amar,

I came across this issue and have not been able to resolve it. I have followed the tips in the blog post above.

Here is my OS stats:
Mac OSX El Capitan (10.11.6)

Here is how I installed the cli driver:

pip install ibm_db_django
cd /Users/gonzalezma/.pyenv/versions/3.5.2/envs/test-db/lib/python3.5/site-packages
install_name_tool -change libdb2.dylib `pwd`/libdb2.dylib ibm_db.cpython-35m-darwin.so
ln -s clidriver/lib/libdb2.dylib libdb2.dylib

echo $DYLD_LIBRARY_PATH

/Users/gonzalezma/.pyenv/versions/3.5.2/envs/test-db/lib/python3.5/site-packages/clidriver/lib/icc:/Users/gonzalezma/.pyenv/versions/3.5.2/envs/test-db/lib/python3.5/site-packages/clidriver/lib


This is the commands in the python shell:


import ibm_db

ibm_db.connect("DATABASE=BIGSQL;HOSTNAME=mn0204.chop.edu;PORT=32051;PROTOCOL=TCPIP;UID=<removed>;PWD=<removed>;", "", "")


This is the error:

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

Exception: [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved.  Reason code: "3". SQLCODE=-1042


Any help would be appreciated!

Thanks,
Mike

On Friday, June 24, 2016 at 6:20:22 AM UTC, amarredd wrote:

Hello,

Please check this link if you may find this helpful.
https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/ibm_db_on_MAC_OS_Hints_and_Tips?lang=en

It already has resolution to SQL1042C error .

If above information is not sufficient for you to resolve the error you are hitting, then let us know the following,
1. how CLI driver is installed in your machine ? Did it get installed as part of ibm_db installation or did you set IBM_DB_HOME to already installed driver in your machine.
2. check if you have set DYLD_LIBRARY_PATH and if so, where it is pointing to.

Thanks,
Amar

Inactive hide details for Renee Murray ---06/24/2016 11:26:01 AM---Hello, I'm getting an error when trying to connect. Does anyRenee Murray ---06/24/2016 11:26:01 AM---Hello, I'm getting an error when trying to connect. Does anyone recognize this

From: Renee Murray <r.mur...@gmail.com>
To: ibm_db <ibm...@googlegroups.com>
Date: 06/24/2016 11:26 AM
Subject: [ibm_db:1110] DB2 Connection Erro
Sent by: ibm...@googlegroups.com





Hello,

I'm getting an error when trying to connect. Does anyone recognize this error?

Exception: [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved.  Reason code: "3". SQLCODE=-1042

Thanks,
Renee Murray

--
You received this message because you are subscribed to the Google Groups "ibm_db" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ibm_db+unsubscribe@googlegroups.com.


To post to this group, send email to

Alejandro Rodriguez Cuellar

unread,
Jun 18, 2017, 10:52:45 PM6/18/17
to ibm_db
Hi Mike,

I have the same issue. Did you solve it?

Thanks.

Best,

Alejandro 
Reply all
Reply to author
Forward
0 new messages