If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to connect to db2 instance on my network

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-09, 17:48
adamm_wr adamm_wr is offline
Registered User
 
Join Date: May 2009
Posts: 3
How to connect to db2 instance on my network

Hi, im trying to connect to a db2 installation that we have hosted on a server at work. I tried to do

CONNECT TO server USER adamm USING password

and i get an sql error SQL1013N

I am running windows vista ultimate 64 bit, service pack 1.

The db2 installation i have on my box is 9.5 express-c


BTW: the reason i am doing this is because for some reason i cannot get my visual studio to connect to the db2 instance from code. The people that would normally help me with this are not at work for the next week. I think that i need to download a connector for visual studio but i cannot find it anywhere.

so the reason i am using the command line is to eliminate variables and try to get to the bottom of the problem im having with visual studio. If anyone knows a quick tool or command i can use to just connect to this db2 instance over my network, either using the connect statement above, or whatever, that would be appreciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 05-27-09, 19:19
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by adamm_wr
Hi, im trying to connect to a db2 installation that we have hosted on a server at work. I tried to do

CONNECT TO server USER adamm USING password

and i get an sql error SQL1013N

I am running windows vista ultimate 64 bit, service pack 1.

The db2 installation i have on my box is 9.5 express-c


BTW: the reason i am doing this is because for some reason i cannot get my visual studio to connect to the db2 instance from code. The people that would normally help me with this are not at work for the next week. I think that i need to download a connector for visual studio but i cannot find it anywhere.

so the reason i am using the command line is to eliminate variables and try to get to the bottom of the problem im having with visual studio. If anyone knows a quick tool or command i can use to just connect to this db2 instance over my network, either using the connect statement above, or whatever, that would be appreciated.

Thanks
To connect from the command line, you need the DB2 client installed, and then you have to catalog the remote node and then catalog the remote database. The client comes with DB2 Express-C. You can catalog the node and database with the Client Configuration Assistant (Set up folder).

For your application, you probably just need the DB2 Universal Type IV driver jar on your client and you can connect with with the appropriate url to the database.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 05-27-09 at 19:23.
Reply With Quote
  #3 (permalink)  
Old 05-28-09, 12:49
adamm_wr adamm_wr is offline
Registered User
 
Join Date: May 2009
Posts: 3
Thank you for your response. I was able to "Add Database Using Wizard" which worked, it found the server and the db2 instance i was looking for.

But then when i try to "Configure Another Instance" i select the server, and the instance, and enter in my user id and password. But the request times out after like 5 minutes, with an error:

"SQL22205C The DB2 Administration Server encountered an unexpected error while executing a request.

Explanation:

An unexpected error occurred in the DB2 Administration Server while it
was processing a request.

User response:

Refer to the DB2 Administration Server's First Failure Data Capture Log
for additional information.

If trace was active, invoke the Independent Trace Facility at the
operating system command prompt. Contact IBM Support with the following
required information:
* Problem description
* SQLCODE or message number
* SQLCA contents if possible
* Trace file if possible"


I manually added my user and password to all the different databases by logging directly into the server. Is there a way to add myself to the entire instance ?

So given that do you know why it would time out ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On