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 > DB2 database connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-08, 02:10
sushma007 sushma007 is offline
Registered User
 
Join Date: Aug 2007
Posts: 64
DB2 database connection

I want to connect to a DB2 server. I don't have any database . Please tell me to which database i need to connect.

Which is the default database in DB2(like MASTER in SQL Server)
Reply With Quote
  #2 (permalink)  
Old 03-07-08, 02:45
azs0309 azs0309 is offline
Registered User
 
Join Date: Jan 2008
Posts: 88
there is no default database(or master database). you have a instance and you have databases under the instances. do a db2 list db directory to see the databases...read more about db2.
Reply With Quote
  #3 (permalink)  
Old 03-07-08, 03:44
sushma007 sushma007 is offline
Registered User
 
Join Date: Aug 2007
Posts: 64
Then, how to connect from command line using
Quote:
db2 connect to <Database>
command
Reply With Quote
  #4 (permalink)  
Old 03-07-08, 03:53
azs0309 azs0309 is offline
Registered User
 
Join Date: Jan 2008
Posts: 88
yes,
db2 connect to <database>

do
"db2 list db directory"
you can see the databases on the server
Reply With Quote
  #5 (permalink)  
Old 03-07-08, 03:57
pravin3032 pravin3032 is offline
Registered User
 
Join Date: Mar 2008
Posts: 3
Quote:
Please tell me to which database i need to connect.
you have a answer in your question.
if database exist find out using which schema you need to connect.
Reply With Quote
  #6 (permalink)  
Old 03-07-08, 06:53
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can ATTACH to an instance and CONNECT to a database (not to a schema).
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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