Problem with MSSQL SPRINTA 2000 JDBC Driver

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Swami

    Problem with MSSQL SPRINTA 2000 JDBC Driver

    Hi,
    I have installed MQ SQL Server 2000 on my laptop and trying to use
    SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I
    wrote a sample Java app to test the connection and I get the following
    error trace,

    DriverManager.i nitialize: jdbc.drivers = null
    JDBC DriverManager initialized
    SQLException: SQLState(08S01)
    {sql7=true, port=1433, user=sa, url=jdbc:inetda e7:US0211737-WP01:1433,
    password=wasfe, host=US0211737-WP01}
    getConnection failed: com.inet.tds.SQ LException: Connection refused:
    connect
    com.inet.tds.SQ LException: Connection refused: connect
    java.net.Connec tException: Connection refused: connect
    at java.net.PlainS ocketImpl.socke tConnect(Native Method)
    at java.net.PlainS ocketImpl.doCon nect(Unknown Source)
    at java.net.PlainS ocketImpl.conne ctToAddress(Unk nown Source)
    at java.net.PlainS ocketImpl.conne ct(Unknown Source)
    at java.net.Socket .connect(Unknow n Source)
    at java.net.Socket .connect(Unknow n Source)
    at java.net.Socket .<init>(Unknow n Source)
    at java.net.Socket .<init>(Unknow n Source)
    at com.inet.tds.Td sDriver.a(Unkno wn Source)
    at com.inet.tds.Td sDriver.run(Unk nown Source)
    at java.lang.Threa d.run(Unknown Source)

    I tried searching the web and product doc. Nothing seems to help me.
    Has anyone come across similiar problems? Any pointers will be
    appreciated also.

    Thanks,
    Swami.
  • Sandro Lopopolo

    #2
    Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

    Hi

    you should print your code ,maybe you did anything wrong....

    "Swami" <chamuramya@gma il.com> schrieb im Newsbeitrag
    news:f9704653.0 407110508.1c2b7 e3e@posting.goo gle.com...[color=blue]
    > Hi,
    > I have installed MQ SQL Server 2000 on my laptop and trying to use
    > SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I
    > wrote a sample Java app to test the connection and I get the following
    > error trace,
    >
    > DriverManager.i nitialize: jdbc.drivers = null
    > JDBC DriverManager initialized
    > SQLException: SQLState(08S01)
    > {sql7=true, port=1433, user=sa, url=jdbc:inetda e7:US0211737-WP01:1433,
    > password=wasfe, host=US0211737-WP01}
    > getConnection failed: com.inet.tds.SQ LException: Connection refused:
    > connect
    > com.inet.tds.SQ LException: Connection refused: connect
    > java.net.Connec tException: Connection refused: connect
    > at java.net.PlainS ocketImpl.socke tConnect(Native Method)
    > at java.net.PlainS ocketImpl.doCon nect(Unknown Source)
    > at java.net.PlainS ocketImpl.conne ctToAddress(Unk nown Source)
    > at java.net.PlainS ocketImpl.conne ct(Unknown Source)
    > at java.net.Socket .connect(Unknow n Source)
    > at java.net.Socket .connect(Unknow n Source)
    > at java.net.Socket .<init>(Unknow n Source)
    > at java.net.Socket .<init>(Unknow n Source)
    > at com.inet.tds.Td sDriver.a(Unkno wn Source)
    > at com.inet.tds.Td sDriver.run(Unk nown Source)
    > at java.lang.Threa d.run(Unknown Source)
    >
    > I tried searching the web and product doc. Nothing seems to help me.
    > Has anyone come across similiar problems? Any pointers will be
    > appreciated also.
    >
    > Thanks,
    > Swami.[/color]


    Comment

    • John Bell

      #3
      Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

      Hi

      Have you checked that you are using the TCP/IP protocol and given port?
      Check the client configuration and see if you can connect using Query
      Analyser.

      John

      "Swami" <chamuramya@gma il.com> wrote in message
      news:f9704653.0 407110508.1c2b7 e3e@posting.goo gle.com...[color=blue]
      > Hi,
      > I have installed MQ SQL Server 2000 on my laptop and trying to use
      > SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I
      > wrote a sample Java app to test the connection and I get the following
      > error trace,
      >
      > DriverManager.i nitialize: jdbc.drivers = null
      > JDBC DriverManager initialized
      > SQLException: SQLState(08S01)
      > {sql7=true, port=1433, user=sa, url=jdbc:inetda e7:US0211737-WP01:1433,
      > password=wasfe, host=US0211737-WP01}
      > getConnection failed: com.inet.tds.SQ LException: Connection refused:
      > connect
      > com.inet.tds.SQ LException: Connection refused: connect
      > java.net.Connec tException: Connection refused: connect
      > at java.net.PlainS ocketImpl.socke tConnect(Native Method)
      > at java.net.PlainS ocketImpl.doCon nect(Unknown Source)
      > at java.net.PlainS ocketImpl.conne ctToAddress(Unk nown Source)
      > at java.net.PlainS ocketImpl.conne ct(Unknown Source)
      > at java.net.Socket .connect(Unknow n Source)
      > at java.net.Socket .connect(Unknow n Source)
      > at java.net.Socket .<init>(Unknow n Source)
      > at java.net.Socket .<init>(Unknow n Source)
      > at com.inet.tds.Td sDriver.a(Unkno wn Source)
      > at com.inet.tds.Td sDriver.run(Unk nown Source)
      > at java.lang.Threa d.run(Unknown Source)
      >
      > I tried searching the web and product doc. Nothing seems to help me.
      > Has anyone come across similiar problems? Any pointers will be
      > appreciated also.
      >
      > Thanks,
      > Swami.[/color]


      Comment

      • Dallas Cowboy

        #4
        Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

        John,
        Good catch. I did try connecting using the client config. My server name
        is US0211737-WP01. When I tried to specify that as my SQL server name,
        it will not connect. But when I appended my instance name (PALYDB) like
        US0211737-WP01\PLAYDB it connected. I tried the same thing in the JDBC
        url, jdbc:inetdae:US 0211737-WP01\\PLAYDB, I get the message,
        java.net.Unknow nHostException: US0211737-WP01\PLAYDB

        Any help??



        *** Sent via Devdex http://www.devdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • Dallas Cowboy

          #5
          Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

          import java.sql.*; // JDBC package

          public class PooledDriver
          {

          public static void main(String[] argv){
          String url =
          "jdbc:inetpool: inetdae7:US0211 737-WP01:1433"; // use your hostname and
          port number here
          String login = "sa"; // use your login here
          String password = "wasfe"; // use your password here

          try {
          DriverManager.s etLogStream(Sys tem.out); // to create more info
          // for technical support

          Class.forName(" com.inet.pool.P oolDriver").new Instance();
          //or
          //new com.inet.pool.P oolDriver();


          //set a timeout for login and query
          DriverManager.s etLoginTimeout( 10);


          //open a connection to the database
          Connection connection =
          DriverManager.g etConnection(ur l,login,passwor d);

          //to get the driver version
          DatabaseMetaDat a conMD = connection.getM etaData();
          System.out.prin tln("Driver Name:\t" +
          conMD.getDriver Name());
          System.out.prin tln("Driver Version:\t" +
          conMD.getDriver Version());

          //select a database
          connection.setC atalog( "SBM_1_0" );

          //create a statement
          Statement st = connection.crea teStatement();

          //execute a query
          ResultSet rs = st.executeQuery ("SELECT * FROM sysusers");

          // read the data and put it to the console
          while (rs.next()){
          for(int j=1; j<=rs.getMetaDa ta().getColumnC ount(); j++){
          System.out.prin t( rs.getObject(j) +"\t");
          }
          System.out.prin tln();
          }


          //close the objects
          st.close();
          connection.clos e();

          } catch(Exception e) {
          e.printStackTra ce();
          }
          }
          }



          *** Sent via Devdex http://www.devdex.com ***
          Don't just participate in USENET...get rewarded for it!

          Comment

          • Dan Guzman

            #6
            Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

            The product doc on the inetsoftware web site indicates that a named instance
            should be specified in the form 'hostname/instancename'. Note the forward
            slash instead of the customary back slash.

            If that doesn't work, you might try contacting the vendor.

            --
            Hope this helps.

            Dan Guzman
            SQL Server MVP

            "Dallas Cowboy" <coowboy@yahoo. com> wrote in message
            news:40f1eaf8$0 $16455$c397aba@ news.newsgroups .ws...[color=blue]
            > John,
            > Good catch. I did try connecting using the client config. My server name
            > is US0211737-WP01. When I tried to specify that as my SQL server name,
            > it will not connect. But when I appended my instance name (PALYDB) like
            > US0211737-WP01\PLAYDB it connected. I tried the same thing in the JDBC
            > url, jdbc:inetdae:US 0211737-WP01\\PLAYDB, I get the message,
            > java.net.Unknow nHostException: US0211737-WP01\PLAYDB
            >
            > Any help??
            >
            >
            >
            > *** Sent via Devdex http://www.devdex.com ***
            > Don't just participate in USENET...get rewarded for it![/color]


            Comment

            • John Bell

              #7
              Re: Problem with MSSQL SPRINTA 2000 JDBC Driver

              Hi

              If Dan's option doesn't work then creating an alias may work.

              John

              "Dallas Cowboy" <coowboy@yahoo. com> wrote in message
              news:40f1eaf8$0 $16455$c397aba@ news.newsgroups .ws...[color=blue]
              > John,
              > Good catch. I did try connecting using the client config. My server name
              > is US0211737-WP01. When I tried to specify that as my SQL server name,
              > it will not connect. But when I appended my instance name (PALYDB) like
              > US0211737-WP01\PLAYDB it connected. I tried the same thing in the JDBC
              > url, jdbc:inetdae:US 0211737-WP01\\PLAYDB, I get the message,
              > java.net.Unknow nHostException: US0211737-WP01\PLAYDB
              >
              > Any help??
              >
              >
              >
              > *** Sent via Devdex http://www.devdex.com ***
              > Don't just participate in USENET...get rewarded for it![/color]


              Comment

              Working...