Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
10 replies Latest Post - ‏2011-04-19T18:11:43Z by Nafeespari
Nafeespari
Nafeespari
18 Posts
ACCEPTED ANSWER

Pinned topic Connecting to DB2 Server from Design Studio

‏2011-04-19T14:29:07Z |
Hi,

Server: InfoSphere 9.7 installed on win 2008 server 64 bit machine.
Client: win 7 64 bit

I did "setup communication" and enabled TCP/IP.

But I can connect from my Design Studio to a database on the DB2 server.
A screen shot of the connection parameter is attached and I would appreciate a quick reply.

Thanks.

Nafees
Updated on 2011-04-19T18:11:43Z at 2011-04-19T18:11:43Z by Nafeespari
  • JP_Parkin
    JP_Parkin
    128 Posts
    ACCEPTED ANSWER

    Re: Connecting to DB2 Server from Design Studio

    ‏2011-04-19T14:53:16Z  in response to Nafeespari
    What error are you getting when you attempt to connect with the Test Connection button?

    Might also be useful to collect a JDBC trace to see whether there is anything else in the flow to indicate a reason for the error. To enable the JDBC trace, just uncheck the "Disable tracing" option from the "Tracing" tab in the dialog you provided, set the directory to a temporary location and I typically choose to trace everything ( never know what information is useful sometimes ).

    JP
    • Nafeespari
      Nafeespari
      18 Posts
      ACCEPTED ANSWER

      Re: Connecting to DB2 Server from Design Studio

      ‏2011-04-19T15:03:39Z  in response to JP_Parkin
      The error is:

      No Start Database Command Was Issued: ErrorCode= -4499, SQLState=08001

      The trace file is also attached here.

      Thanks.
      • JP_Parkin
        JP_Parkin
        128 Posts
        ACCEPTED ANSWER

        Re: Connecting to DB2 Server from Design Studio

        ‏2011-04-19T15:09:24Z  in response to Nafeespari
        You need to issue a db2start on the target database server - that message indicates the database is not running.
        • Nafeespari
          Nafeespari
          18 Posts
          ACCEPTED ANSWER

          Re: Connecting to DB2 Server from Design Studio

          ‏2011-04-19T15:13:42Z  in response to JP_Parkin
          The database is running. I even stopped and ran it again. But no luck.
          • Nafeespari
            Nafeespari
            18 Posts
            ACCEPTED ANSWER

            Re: Connecting to DB2 Server from Design Studio

            ‏2011-04-19T15:38:16Z  in response to Nafeespari
            Thanks for the quick replies. I can connect to the database locally.
            The value for SVCENAME is db2c_db2 but its not listed in the services, though other services are there.

            But I CAN CONNECT to this miningdb. Please have a look at the screen shot that depicts both Services window and
            the command line activity that I did.

            But from Design Studio, same error.

            Thanks again.
        • JP_Parkin
          JP_Parkin
          128 Posts
          ACCEPTED ANSWER

          Re: Connecting to DB2 Server from Design Studio

          ‏2011-04-19T15:18:45Z  in response to JP_Parkin
          The other possibility is that your database is actually listening on a different port ( or is a different IP address ).

          To confirm, goto your DB2 Server and open a DB2 command window for the DB2 instance that you want to connect with.
          From the command line issue the command :
          db2 get dbm cfg
          and search for the SVCENAME entry - that will be the port number ( or name ) that the database manager is listening on. If it's a name, look it up in the services file ( typically c:\Windows\System32\drivers\etc\services in Windows ).

          The last thing to confirm from the db2 command line is that you can connect to the database locally too :

          db2set
          db2start
          db2 connect to miningdb user Administrator
          ( enter the password when prompted )

          Just a couple more thoughts in case someone else runs into a similar issue and needs some ideas for tracking down this type of connectivity problem.
          • Nafeespari
            Nafeespari
            18 Posts
            ACCEPTED ANSWER

            Re: Connecting to DB2 Server from Design Studio

            ‏2011-04-19T15:41:10Z  in response to JP_Parkin
            Thanks for the quick replies. I can connect to the database locally.
            The value for SVCENAME is db2c_db2 but its not listed in the services, though other services are there.

            But I CAN CONNECT to this miningdb. Please have a look at the screen shot that depicts both Services window and
            the command line activity that I did.

            But from Design Studio, same error.

            Thanks again.
            • JP_Parkin
              JP_Parkin
              128 Posts
              ACCEPTED ANSWER

              Re: Connecting to DB2 Server from Design Studio

              ‏2011-04-19T16:00:19Z  in response to Nafeespari
              Try adding the following to your services file on the database server ( surprising that it's not already there ) :

              db2c_DB201 50000/tcp

              This will explicitly set the port to 50000.

              Then issue :
              db2stop
              db2start

              The other option is to just explicitly set the SVCENAME to 50000

              db2 update dbm cfg using svcename 50000
              db2stop
              db2start
              • Nafeespari
                Nafeespari
                18 Posts
                ACCEPTED ANSWER

                Re: Connecting to DB2 Server from Design Studio

                ‏2011-04-19T17:46:57Z  in response to JP_Parkin
                Hi JP,

                I explicitly set the port to 50000 but still the same error message appears. Another thing that I noticed, even if I use a wrong database name that does not exist, the same error appears.

                I don't know what the problem could be!

                Nafees
                • Nafeespari
                  Nafeespari
                  18 Posts
                  ACCEPTED ANSWER

                  Re: Connecting to DB2 Server from Design Studio

                  ‏2011-04-19T18:11:43Z  in response to Nafeespari
                  Using the servername (in my case "winserver") in the host name instead of the IP address solved the problem for me. Mentioning it for others who may also face this problem.

                  JP, you have been of great help. Thanks a lot.
                  Nafees