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 > Connect remote db problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-03-04, 00:18
carmenlei carmenlei is offline
Registered User
 
Join Date: Jun 2004
Posts: 24
Connect remote db problem

I am a beginner of DB2 and I have problems when I try to connect to the remote DB2 server. Is there any method other than add a new db alias in the configuration assistant? Or can I connect to a database server without specifying any database name? thanks very much~

Last edited by carmenlei; 06-03-04 at 00:21.
Reply With Quote
  #2 (permalink)  
Old 06-03-04, 04:20
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You can define DB2DBDFT using db2set command ... If an application has no database connection but SQL statements are issued, an implicit connect will be made if the DB2DBDFT database ...

BTW, what is your problem connecting to a database ?

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 06-03-04, 05:24
carmenlei carmenlei is offline
Registered User
 
Join Date: Jun 2004
Posts: 24
Actually I want to connect to the db2 server with my application written by VC++ and SQLAPI. The problem is that I found that I can connect to the datebase only when the application and database rest in the same machine. I use the connection string as "DSN=data source name, Uid=id, PWD=pwd". I guess that if I install the DB2 client in the client machine and use the configuration assistant to set the configuration, then I will success, isn't it? I want to know is there any method other than install the DB2 client? Did I use the right connection string?
Reply With Quote
  #4 (permalink)  
Old 06-03-04, 08:06
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by carmenlei
Actually I want to connect to the db2 server with my application written by VC++ and SQLAPI. The problem is that I found that I can connect to the datebase only when the application and database rest in the same machine. I use the connection string as "DSN=data source name, Uid=id, PWD=pwd". I guess that if I install the DB2 client in the client machine and use the configuration assistant to set the configuration, then I will success, isn't it? I want to know is there any method other than install the DB2 client? Did I use the right connection string?
Correct - you need the client installed.
__________________
--
Jonathan Petruk
DB2 Database Consultant
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