Topic
3 replies Latest Post - ‏2013-04-25T15:59:24Z by RuiNie
jeet87
jeet87
3 Posts
ACCEPTED ANSWER

Pinned topic How to connect to my database with my instance in Data studio 3.2

‏2013-04-17T07:01:25Z |

Hi,

I had created the Instance using db2icrt -u db2admin db2inst1, set the db2 instance using %DB2INSTANCE% to my instance "db2inst1" and Start the DB2 instance using db2start and Create SAMPLE database using db2sampl -

Earlier when I install the Data studio using First Steps I created the Sample database.

So now I want to list my Sample DB in Data studio with that instance "db2inst1". Right now if I see there is SAMPLE in database connection tree for which connection url is jdbc:db2://localhost:50000/SAMPLE:retrieveMessagesFromServerOnGetMessage=true; I think this SAMPLE is associated with db2 instance not with my instance

Could you please help me how to see my SAMPLE database for my instance "db2inst1". Actually I run certain sqls for my SAMPLE database for which I want to see the tables.

Data studio is new to me as in control center we can do it very easily. Am attaching my Data studio screenshot for your reference


 

Attachments

  • jeet87
    jeet87
    3 Posts
    ACCEPTED ANSWER

    Re: How to connect to my database with my instance in Data studio 3.2

    ‏2013-04-17T13:16:46Z  in response to jeet87

    Please reply to next topic for which Am getting PING failed error. We can discuss this after closing that topic.

    • David.Zhu
      David.Zhu
      66 Posts
      ACCEPTED ANSWER

      Re: How to connect to my database with my instance in Data studio 3.2

      ‏2013-04-24T16:41:30Z  in response to jeet87

      Hi,Jeet87,

      How many instance on you machine? If you have more than one instance in your machine, then each instance should have a port. then means if you want connect to other instance's sample database, you should use the port which listen to the connection to that instance. you can check the port information from 

      Windows

      C:\Windows\System32\drivers\etc\services

      Linux/Unix

      /etc/services

      something similar as following.

      db2c_DB2 50000/tcp

      In you system the DB2 need to use you instance name and the value like 50000 is the port listen the connection to that instance.

  • RuiNie
    RuiNie
    13 Posts
    ACCEPTED ANSWER

    回复:How to connect to my database with my instance in Data studio 3.2

    ‏2013-04-25T15:59:24Z  in response to jeet87

    Hi ,

    When launch DS3.2 with a fresh workspace, DS3.2  will automatically catalog the local databases and create db connection profile for the local Databases in the workspace, In your scenario,  I guess DS3.2 automatically created a connection profile for sample db under instance DB2. but you want to create a db connection for sample under instance db2inst1.   It's simple to create db connections in DataStudio.  Below are steps:

     In Administration Explorer View, click the arrow icon from the tool bar, then select New connection to a database, then the New Connection wizard will pop up,  in the wizard , specify a Connection Name or you can use the default,  and then input appropriate values for all required options(pls refer to my attached pic), next click button "Test Connection" to make sure DS can connect to the db successfully, finally click Finish , you will find the db connection profile show up in the Administration Explorer View .

    Pls let me know if I really understood your questions? 

     

     

    Attachments