Microsoft SQL Server JDBC Connection with Enterprise

I'm trying to establish a JDBC connection to a SQL Server 2005 database server within XML Publisher Enterprise with no luck. What I have defined is:
url = jdbc:sqlserver://servername where servername is the database server name
Database Driver Class = com.microsoft.sqlserver.jdbc.SQLServerDriver
And I have placed the sqljdbc.jar file in the c:\OraHome_1\jdk\jre\lib directory as the help file states to do. Bounced the server, but still no luck.
Is there a log file for connection issues to help point you to the potential cause?

Thank you for your quick response. I followed the instruction on Tim's blog and still no luck. Here is the URL and Driver Class I entered:
URL-
jdbc:sqlserver://our server name:1433;databaseName=northwind
Database driver class -
com.microsoft.jdbc.sqlserver.sqlServerDriver
My question:
1. Am I right to use one of databases as northwind or should use server name after "databaseName="
2. I used username "sa" that is sql server user. Is it correct?
3. Some articles mentioned "sqljdbc.jar" file. Does this mean files mssqlserver.jar, msbase.jar and msutil.jar?
Thank you for your help!
- Jessie

Similar Messages

  • Microsoft SQL Server JDBC driver and WLS JMS problem?

              Greetings,
              I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
              persisted to SQL Server, during WLS startup the JMS attempts to
              read the JMSStore and JMSState tables in the db, if they are
              already present (say, from a previous run) the driver kicks out:
              java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
              not re-read row data for column 1.
              If the tables are not present, then WLS creates them and
              everything proceeds fine. Now, its not a good thing to attempt
              to reread row data for a ResultSet, especially for portability. Why is WLS JMS
              doing this? is there some config I can use to adjust JMS startup behavior for
              persisted JMS stores?
              Jay Houghton
              Centiv
              [email protected]
              long exception trace follows:
              <Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory "BroadcastTopicFactory"
              is started.>
              <Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer", Opening
              JDBC store tables "JMSStore
              " and "JMSState" using connection pool "JMSConnectionPool".>
              <Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer", store
              failed to open, java.io.IOEx
              ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix = <null>:
              recover
              java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
              not re-read row data for colum
              n 1.
              at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
              at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
              at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
              at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
              at weblogic.jms.backend.BEStore.open(BEStore.java:179)
              at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
              at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
              at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
              at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
              3)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              at $Proxy40.updateDeployments(Unknown Source)
              at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
              .java:2734)
              at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
              at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              at $Proxy57.start(Unknown Source)
              at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
              _CachingStub.java:480)
              at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
              at weblogic.management.Admin.finish(Admin.java:571)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
              at weblogic.Server.main(Server.java:35)
              

              Tom,
              thanks for the info, I'll bring this to support.
              I did try the weblogic jDriver for SQL Server and it works fine, so i think it
              must be the way JMS is interacting with the MS driver.
              here are my components:
              WLS 6.1sp1
              Microsoft® SQL Server™ 2000 Driver for JDBC™ is a (Type 4 JDBC) which provides
              partial JDBC 2 support (no blobs, clobs, etc)
              MS SQL Server 2000 (sp2?)
              thanks!
              Jay Houghton
              [email protected]
              Tom Barnes <[email protected]> wrote:
              >Hi Jay,
              >
              >This is not a known issue at BEA as far as I know, perhaps it is the
              >result
              >of a new driver/database combination. Try using a different driver,
              >or a different
              >version of the current driver. Meanwhile, use a file store (just as
              >reliable but faster) and log a case with customer support, including
              >information on your version, service-pack, and what driver you are using.
              >
              >Tom, BEA
              >
              >Jay Houghton wrote:
              >
              >> Greetings,
              >>
              >> I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
              >> persisted to SQL Server, during WLS startup the JMS attempts to
              >> read the JMSStore and JMSState tables in the db, if they are
              >> already present (say, from a previous run) the driver kicks out:
              >>
              >> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
              >can
              >> not re-read row data for column 1.
              >>
              >> If the tables are not present, then WLS creates them and
              >> everything proceeds fine. Now, its not a good thing to attempt
              >> to reread row data for a ResultSet, especially for portability. Why
              >is WLS JMS
              >> doing this? is there some config I can use to adjust JMS startup behavior
              >for
              >> persisted JMS stores?
              >>
              >> Jay Houghton
              >> Centiv
              >> [email protected]
              >>
              >> long exception trace follows:
              >>
              >> <Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory
              >"BroadcastTopicFactory"
              >> is started.>
              >> <Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer",
              >Opening
              >> JDBC store tables "JMSStore
              >> " and "JMSState" using connection pool "JMSConnectionPool".>
              >> <Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer",
              >store
              >> failed to open, java.io.IOEx
              >> ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix
              >= <null>:
              >> recover
              >> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
              >can
              >> not re-read row data for colum
              >> n 1.
              >> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              >> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
              >> at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
              >> at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
              >> at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
              >> at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
              >> at weblogic.jms.backend.BEStore.open(BEStore.java:179)
              >> at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
              >> at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
              >> at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
              >> at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
              >> 3)
              >> at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              >> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              >> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              >> at $Proxy40.updateDeployments(Unknown Source)
              >> at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
              >> java:2734)
              >> at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
              >> )
              >> at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
              >> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
              >> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
              >> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
              >> at $Proxy57.start(Unknown Source)
              >> at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
              >> _CachingStub.java:480)
              >> at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
              >> at weblogic.management.Admin.finish(Admin.java:571)
              >> at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
              >> at weblogic.Server.main(Server.java:35)
              >
              

  • Microsoft SQL Server JDBC Drivers 4.0.2206 timeout on first connection to SQL Server Express after it sleeps

    Our builds kick off and run integration tests. They are configured to hit a SQL Server Express server.
    If the builds have been quiet for a while, the first test to connect fails after stalling for 20 minutes.
    Subsequent tests are fine.
    Reversing test order does the same thing, with a different test.
    We noticed in the SQL Server express log the server saying it is waking up after being idle.
    Microsoft SQL Server Express with Microsoft SQL Server JDBC Drivers 4.0.2206.
    Connection times out after 20 minutes.Occurs with the first connection made after the SQL Server Express server wakes up from going to sleep.Connections after the first are just fine, until SQL Server Express sleeps.SSL enabled. Timeout duration for the connection failure is unaffected by setting timeout options for the connection.  Work around:
    cron-like job that runs every minute that makes a simple query on the server keeps the server from going to sleep.
    Has anyone else run into this?

    Hello,
    SQL Server Express will go to sleep if idle, this behavior is not configurable.
    When SQL Express transitions from idle to active some of the memory that was released needs to be reclaimed; this results is a slight lag during "startup time" when you're first connecting to SQL Express.
    The other sort of sleep occurs when a database with AUTO_CLOSE unloading itself after a period of inactivity. This can be resolved by setting AUTO_CLOSE to false.
    You can refer to the following blog about more details about this:
    http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx
    You can try to upgrade the SQL Server Express to a non-free version to get rid of this.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Binding in Prepared Statement is not working with Microsoft SQL Server JDBC

    I ran the following program with sqljdbc4.jar in the class path. There is data in the EMPLOYEE table for the employee name DEMO but the following program is not retrieving data for DEMO. When the same program was run with Merlia.jar in the class path, it was retrieving data for DEMO.
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
    String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
    PreparedStatement sts = con.prepareStatement(sqlSele);
    sts.setString(1, "DEMO" );
    ResultSet rs = sts.executeQuery();
    while(rs.next())
    System.out.println("driverConn.main()" + rs.toString());
    catch(Exception e)
    System.out.println(e);
    e.printStackTrace();
    Can someone help me out from this issue.

    This is the program that I used for testing the behaviour of prepared statement with sqljdbc4.jar. Also included the code for Merlia.jar.
    import java.sql.*;
    public class driverConn {
         public static void main(String [] a)
              try{
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              //Class.forName("com.inet.tds.TdsDriver");
              Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
              //Connection con = DriverManager.getConnection("jdbc:inetdae7a:SERVER23:5000?database=TESTDB", "SYSADM", "SYSADM");
              String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
              //String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ‘%DEMO%’”;
              PreparedStatement sts = con.prepareStatement(sqlSele);
              sts.setString(1, "DEMO" );
              //sts.setString(1, "%DEMO%" );          
              java.sql.ResultSet rs = sts.executeQuery();          
              while(rs.next())
                   System.out.println("EMPNAME is " + rs.getString(“EMPNAME”) + “”);                    }
              catch(Exception e)
                   System.out.println(e);
                   e.printStackTrace();
    Following are the specifications:
    Version of the Driver:
    Microsoft JDBC Driver 4.0 for SQL Server CTP3
    Downloaded the driver using the link http://www.microsoft.com/download/en/details.aspx?id=11774
    Java Version:
    Java 1.7.0_02
    Database Version:
    Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)

  • UCCX 8.x Database access - Anyone test the Microsoft SQL Server JDBC Driver 3.0 from Microsoft ?

    2 questions come to mind.
    will it work
    will TAC support you ?
    available here
    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=en
    Brief Description
    Download the SQL Server JDBC Driver 3.0, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5 and above.

    You can test it using DBvisualizer. If you can make it work in that (actually it gives you more information about connection errors etc.), it should working in UCCX also.

  • Microsoft SQL Server JDBC Driver problem

    Hi all,
    I've downloaded the JDBC driver for SQL Server 2000 from Microsoft website and I
    tried creating connection pool in Weblogic (WL 6.1 SP2).
    Following are the configuration from the admin console,
    Name - SQL2K
    URL - jdbc:microsoft:sqlserver://127.0.0.1:1433
    Driver Classname - com.microsoft.jdbc.sqlserver.SQLServerDriver
    ACLName - sa
    Password - tonypet
    After creating the config, I select to chose the target server from the Servers tab
    in Targets main tab in the admin console and when I click on Apply I saw in the WL
    server command prompt the following error,
    <16/07/2002 11:22:55> <Error> <JDBC> <Cannot startup connection pool "SQL2K" Cannot
    load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
    I have assigned the classpath env var as follows,
    CLASSPATH=;.;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program
    Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;
    C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;c:\bea\wlserver6.1\lib\weblogic.jar
    I've tried even copying the .JAR files to the ext and lib directory of bea directory
    but I'm getting the same error.
    Can anyone help me please.
    Thanks a lot for your help
    Cheers
    Nanik

    Hi. You will also be wanting to add this property for the pool to apply to that driver:
    SelectMethod=cursor
    Joe
    Nanik Tolaram wrote:
    Hi all,
    After fiddling around I found a solution (hope this will help those who are having
    the same problem),
    1. Make sure you add the complete directory of the library of the .JAR files in the
    classpath in the STARTWEBLOGIC.CMD, I made a mistake of specifying the path in the
    CLASSPATH and NOT IN the STARTWEBLOGIC.CMD as the classpath is overriden in the STARTWEBLOGIC.CMD
    file.
    2. The other thing I found was the configuration setting. I put the full settings
    in the URL in admin console as follows,
    jdbc:microsoft:sqlserver://127.0.0.1:1433;user=nanik;password=tonypet;databasename=scriptbuilder
    When I put it individually in the Properties filed it won't work as it is not picking
    it up from there but when I moved it to the URL and put it all together it worked
    fine.
    Whew !!! it's been a looong day, hope the info will help.
    Cheers
    Nanik
    "Nanik Tolaram" <[email protected]> wrote:
    Hi all,
    I've downloaded the JDBC driver for SQL Server 2000 from Microsoft website
    and I
    tried creating connection pool in Weblogic (WL 6.1 SP2).
    Following are the configuration from the admin console,
    Name - SQL2K
    URL - jdbc:microsoft:sqlserver://127.0.0.1:1433
    Driver Classname - com.microsoft.jdbc.sqlserver.SQLServerDriver
    ACLName - sa
    Password - tonypet
    After creating the config, I select to chose the target server from the
    Servers tab
    in Targets main tab in the admin console and when I click on Apply I saw
    in the WL
    server command prompt the following error,
    <16/07/2002 11:22:55> <Error> <JDBC> <Cannot startup connection pool "SQL2K"
    Cannot
    load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
    I have assigned the classpath env var as follows,
    CLASSPATH=;.;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program
    Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;
    C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;c:\bea\wlserver6.1\lib\weblogic.jar
    I've tried even copying the .JAR files to the ext and lib directory of bea
    directory
    but I'm getting the same error.
    Can anyone help me please.
    Thanks a lot for your help
    Cheers
    Nanik

  • Urgent Clarification - Microsoft SQL Server JDBC Driver Problem

    Hi,
    Can somebody tell me how to create a connection Pool in weblogic 7 using Microsoft
    SQL Server Driver for JDBC.(should be XADataSource).
    I mean the pool should be created using com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    class.
    The error message i am getting is "Unknown source" during providing targets for
    the connection pool.
    Thanks in advance,
    Rahul.

    <JDBCConnectionPool
    DriverName="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
    Name="SQL2000JDBC"
    Properties="serverName=nc-answline-w2k;url=jdbc:microsoft:sqlserver;dataSourceName=SQL2000JDBC;user=test;databaseName=test;selectMethod=curosr;userName=test;password=test;portNumber=1435"
    URL="jdbc:microsoft:sqlserver"/>
    Try this is your config.xml and make sure you have mssqlsriver first thing in classpath.
    Thanks,
    Mitesh
    Rahul wrote:
    Hi,
    Can somebody tell me how to create a connection Pool in weblogic 7 using Microsoft
    SQL Server Driver for JDBC.(should be XADataSource).
    I mean the pool should be created using com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    class.
    The error message i am getting is "Unknown source" during providing targets for
    the connection pool.
    Thanks in advance,
    Rahul.

  • Sql server 2000 connect with other than jdbc?

    Is there any other way to connect to a Sql Server 2000 database other than with jdbc? My problem actually resides in the fact that I did a small program to test the connection to the database and it works perfectly on my computer but on the server that it's going to stay on, it doesn't.
    the program is classic:
    try{
         DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());     
         Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://12.345.67.890\ \INSTANCENAME:1433;databaseName=NAME;selectMethod=cursor;","user","pass");
    if (connection != null) {
         System.out.println("Successfully connected");
    this small program works ok on my computer(win xp, tomcat 6) but on the other computer(ubuntu, tomcat 5.2) says
    Exceptionjava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The requested instance is either invalid or not running.
    I pinged the ip(12.3...) from the server and it works. So I can't figure out what could cause the error. I tried 20 different connection string and don't work. I'm thinking it might have to do with using MS jdbc drivers on a unix platform? or maybe it's from the server firewall(it's a virtual server), anybody can confirm if they had similar problem? Since I can't figure out the problem, I'm trying to test connection using something else than jdbc but google didn't help much
    thanks in advance!
    Edited by: Biggie_mac on Sep 28, 2007 6:48 AM

    Biggie_mac wrote:
    Is there any other way to connect to a Sql Server 2000 database other than with jdbc? My problem actually resides in the fact that I did a small program to test the connection to the database and it works perfectly on my computer but on the server that it's going to stay on, it doesn't.Something's different between the two servers. Obviously.
    I pinged the ip(12.3...) from the server and it works. So I can't figure out what could cause the error. I tried 20 different connection string and don't work. Why did you do that if the Tomcat version "works"? You're looking in the wrong place.
    I'm thinking it might have to do with using MS jdbc drivers on a unix platform? Why would that matter if you're using type IV 100% Java JDBC drivers?
    or maybe it's from the server firewall(it's a virtual server), anybody can confirm if they had similar problem? If you can ping it successfully, how can it be a firewall issue?
    You're doing something else wrong.
    %

  • Java.lang.OutOfMemoryError (Microsoft SQL Server JDBC driver)

    Hi everyone,
    I am getting a java.lang.OutOfMemoryError when performing a simple query to a database. The query produces only one row (and will always produce only one row). However, the statement that produces the second column in the resultset is very long (>256) characters, so could that be it?
    Also, I am executing thousands of SQL statements with no difficulty. I have double-checked that I am cleaning up all of my database resources, so I don't think that this is it. Do I have to do anything else besides closing the statement and resultset?
    There is no stack trace, otherwise I would have posted it :(
    Also, as an aside - is the Microsoft JDBC driver for SQL Server the best one to use? It seems poorly supported and slow at times. Are there any alternatives?
    Thanks for your time :)
    Ben

    It is running after thousands of other queries. I'll test to see what happens if I run it by itself.
    I am closing the connection. In fact, I am running all of these statements over the same connection and simply opening and closing resultsets.
    So a bug in the driver you think?
    Thanks for the reply :)
    Ben

  • [Microsoft][SQL Server JDBC Driver] No Rows Affected

    hi guys,
    I am getting following error when I insert a row into a Table
    TallymanDB: Error - INSERT INTO RAISEDEVENTS(Accountid,Eventid,Operationid,Date
    Time,ReviewDate,Deleted) VALUES(2,4,0,1047999439002,'16-APR-2003',null)
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]No rows affected.
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown S
    ource)
    at com.microsoft.jdbc.base.BaseStatement.executeUpdate(Unknown Source)
    at com.sanderson.tallyman.util.TallymanDB.executeUpdate(TallymanDB.java:
    217)
    at Test.main(Test.java:14)
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]No rows affected.
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown S
    ource)
    at com.microsoft.jdbc.base.BaseStatement.executeUpdate(Unknown Source)
    at com.sanderson.tallyman.util.TallymanDB.executeUpdate(TallymanDB.java:
    217)
    at Test.main(Test.java:14)
    I am using SQL Server 2000 as the database.
    The row is getting inserted correctly in the table. There is one trigger on this table which seems to give this error.
    The trigger calls a .dll which connects to some other program using the Sockets.
    The functionality seems to be working fine but we get the above mentioned error in the log.
    Can anyone help me regarding this.
    Regards,
    Rahul
    Does anyone has idea

    hi...
    following is the insert code:
    TallymanDB is the class which deals with the Database interaction.
    Regards,
    Rahul
    try
    psRecord = this.aTallymanDB.getPreparedStatement(
                   "INSERT INTO RaisedEvents (ACCOUNTID,EVENTID,OPERATIONID,DATETIME,REVIEWDATE) VALUES (?,?,?,?,?)");
              //Get Timestamp
              ts = this.aTallymanDB.getCurrentDate();
              if (ts == null)
                   ts = new Timestamp(System.currentTimeMillis());
              strErrorCode = "CM028";
              //Log event
    System.out.println("##### Inserting in LogEvent #### " );
              System.out.println("iAccountID: "+iAccountID+" iEventID: "+iEventID+" ts.getTime(): "+ts.getTime()+" tsReviewDate: "+tsReviewDate );
              psRecord.setInt(1, iAccountID);
              psRecord.setInt(2, iEventID);
              psRecord.setInt(3, 0);
              psRecord.setLong(4, ts.getTime());
              psRecord.setTimestamp(5, tsReviewDate);
              psRecord.executeUpdate();
    psRecord.close();
    aTallymanDB.releasePreparedStatement();
    psRecord = null;
         catch (Exception e)
              bCloseStmt = true;
              ErrorLog.log(strErrorCode,iAccountID);
              throw e;
         finally
              if (rs != null)
                   rs.close();
              if (bCloseStmt)
                   if (this.psSelect != null)
                        psSelect.close();
         }

  • Microsoft SQL Server JDBC Driver

    Hi everyone,
    I know it's a bit off topic but I couldn't find a related group.
    Does anyone know of the best way to access SQL Server via JDBC. I have tried
    the JDBC-ODBC bridge but it does not seem to support all types of queries
    (e.g. using a PreparedStatement).
    I have looked at Microsoft's JDBC driver but I'm not allowed to implement it
    as it is a Beta version.
    I would be very grateful if anyone could help me.
    Thanks,
    Nick.

    Neil Pike wrote:
    Nick - there are plenty of other jdbc drivers :-
    Q. Where can I get a JDBC driver for SQL Server? Do Microsoft write one?
    Which is the best one?
    A. Microsoft doesn't supply a native JDBC driver for SQL Server,Actually, yes it does, now. This is a recent thing. It is a type-4 driver built by
    DataDirect/Merant.
    It is free, now in beta, will be GA soon, and is available for download from MS's sqlserver support
    pages.
    but it does
    offer a JDBC-to-ODBC bridge that allows Java programmers to access back-end
    data sources using available ODBC drivers. The Microsoft JDBC-ODBC bridge is
    part of the core set of classes that come with the Microsoft Virtual Machine
    (Microsoft VM) for Java. For more information, see
    http://www.microsoft.com/java/.
    Avoid the jdbc-odbc bridge for use with weblogic. The JDBC-ODBC bridge is buggy,
    unsupported, and not thread-safe.
    You can get 3rd party drivers, servers, and bridges from a variety of vendors
    and some free open-source ones as well.
    Which is the best one? As I don't use any of them I can't comment from
    personal experience. The two most commonly used seem to be WebLogic and
    OpenLink - and feedback on them seems good.
    Some of the sites listed below maintain up to date lists of all vendors.
    The full list that I know of are :-
    1. WebLogic : http://weblogic.beasys.com and http://www.weblogic.com. (type
    2, 3 or 4. SQL 6.5 and 7.0). Download type-4 driver direct from
    http://www.weblogic.com/download/downloadkona.html
    2. http://www.inetsoftware.de. JDBC Type 4 drivers for the Microsoft
    SQLServer 6.5, 7.0, and 2000. JDBC 1.22 driver to use with JDK 1.1x and a JDBC
    2.0 driver (i-net Sprinta) to use with Java 2 (JKD 1.2x).
    JDBC 1.22 : http://www.inetsoftware.de/English/produkte/jdbctreiber/Default.htm
    JDBC 2.0 : http://www.inetsoftware.de/English/produkte/jdbc2/Default.htm.
    3. http://www.openlinksw.com (http://www.openlinksw.co.uk)
    4. http://www.easysoft.com and http://beta.easysoft.com. JDBC/ODBC bridge.
    5. ftp://freetds.internetcds.com/pub/freetds_jdbc. Type 4 open-source driver
    that is designed to work with SQL Server 6.5 and Sybase 11.x
    6. http://java.sun.com/products/jdbc From this page you may search or browse
    the database of JDBC technology drivers that support the JDBC 2.x and JDBC 1.x
    APIs.
    7. http://lpv.home.texas.net (LpVodbc is a multi-threaded JDBC-ODBC database
    server that runs on Windows 95, 98, and NT platforms)
    8. http://www.avenir.net/products/jdbcdrivers.htm
    9. http://www.jturbo.com
    10. http://ourworld.compuserve.com/homepages/Ken_North/jdbcvend.htm is another
    list of JDBC drivers, servers, and vendors compiled by Ken North.
    11. http://www.sco.com/java/
    12. Merant. http://www.merant.com/datadirect/products/jdbc/sl50/overview.asp
    ===
    v1.19 2000.06.13
    Applies to SQL Server versions : All
    FAQ Categories : Connectivity
    Related FAQ articles : odbcunix
    Related Microsoft Kb articles : n/a
    Other related information : n/a
    Authors : Neil Pike

  • SQL Server Database Connectivity with Visual Studio 2012 - Help Needed

    Hello,
    I am having Visual Studio 2012 and SQL Developer 4.0 installed on my system with Windows 8 - 64bit
    I want to shift a VS project with an SQL database connectivity to another new Laptop (above mentioned) ...
    I have the project opened in VS without bieng connected to the database.. 
    I have a backup file of the database (which needs to be restored to a new created database on SQL Developer) 
    The problem:
    I am unable to create a server connection in SQL Developer which will allow me to create a new database followed by the recovery from backup file.
    I am getting the following error message when I try to create a connection:
    Status: Faliure - IO error: The network adapter could not establish a connection
    Please help me in setting up a server connection and adding a new sql database

    The error message seemed unfamiliar to me and since I had never heard of SQL Developer before, I went to Google. Google might be pulling my legs, but it appears that SQL Developer is related to Oracle. This forum is devoted to SQL Server, so you are in the
    wrong place.
    Try finding a forum for SQL Developer.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Configuration manager requires microsoft sql server 2008 sp2 with cumulative update 9 or higher

    Hi,
    I have this error during setup of SCCM 2012 R2 to a sql server. Patch level is higher then what is mentioned in popup.
    Please advise.
    Note: build of SQL is 10.50.4000
    J.
    Jan Hoedt

    Thanks. There is no c:\configmgrprereq.log but there is a configmgrsetup.log:
    INFO: setupdl.exe: Finish  $$<Configuration Manager Setup><12-16-2013 13:33:10.799-60><thread=1660 (0x67C)>
    CWmiRegistry::GetStr: Failed to get string value MSSQLSERVER  $$<Configuration Manager Setup><12-16-2013 13:34:56.756-60><thread=3068 (0xBFC)>
    Failed to retrieve SQL Server instance name[MSSQLSERVER].  $$<Configuration Manager Setup><12-16-2013 13:34:56.761-60><thread=3068 (0xBFC)>
    WARNING: failed to retrieve port number for SQL.ourcompany.com.  $$<Configuration Manager Setup><12-16-2013 13:34:56.763-60><thread=3068 (0xBFC)>
    WARNING: failed to retrieve port number for SQL.ourcompany.com.  $$<Configuration Manager Setup><12-16-2013 13:34:56.763-60><thread=3068 (0xBFC)>
    INFO: Registered type SQL.ourcompany.com MASTER for SQL.ourcompany.com master  $$<Configuration Manager Setup><12-16-2013 13:34:56.763-60><thread=3068 (0xBFC)>
    INFO: Registered type SMS Master for SQL.ourcompany.com master  $$<Configuration Manager Setup><12-16-2013 13:34:56.764-60><thread=3068 (0xBFC)>
    INFO: Registered type SQL.ourcompany.com SCCM2012R2 for SQL.ourcompany.com SCCM2012R2 $$<Configuration Manager Setup><12-16-2013 13:34:56.764-60><thread=3068 (0xBFC)>
    INFO: Registered type SMS ACCESS for SQL.ourcompany.com SCCM2012R2 $$<Configuration Manager Setup><12-16-2013 13:34:56.764-60><thread=3068 (0xBFC)>
    *** [08001][14][Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.  $$<Configuration Manager Setup><12-16-2013 13:35:57.478-60><thread=3068 (0xBFC)>
    *** [01000][14][Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()).  $$<Configuration Manager Setup><12-16-2013 13:35:57.478-60><thread=3068 (0xBFC)>
    *** Failed to connect to the SQL Server, connection type: SQL.ourcompany.com MASTER.  $$<Configuration Manager Setup><12-16-2013 13:35:57.479-60><thread=3068 (0xBFC)>
    *** [08001][14][Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.  $$<Configuration Manager Setup><12-16-2013 13:36:58.135-60><thread=3068 (0xBFC)>
    *** [01000][14][Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()).  $$<Configuration Manager Setup><12-16-2013 13:36:58.135-60><thread=3068 (0xBFC)>
    *** Failed to connect to the SQL Server, connection type: SQL.ourcompany.com MASTER.  $$<Configuration Manager Setup><12-16-2013 13:36:58.136-60><thread=3068 (0xBFC)>
    Could the error be related to other prereqs not met?
    Jan Hoedt

  • Changing Microsoft SQL Server jdbc encoding

    How do i override the encoding of strings using jdbc against a MsSQL database? In MysqL, i see there is an override in the connection URL ;characterSet=UtF-8
    How would i do the same for MsSQL?
    I am using jdbc to migrate data and i need to write utf-8 encoded data into varchar columns (I cannot use nvarchar for legacy reasons). My jvm file.encoding is set to CP1250, so if change that to utf-8 the data is stored correctly. Is there a different
    way to override the character encoding used by MsSQL jdbc drivers?
    I see CodePageOverride, SetStringsAsUnicode connection parameters, but they dont seem to help.

    Hello,
    SQL Server don't support UTF-8 encoding, only ASCII (varchar) and Unicode (nvarchar).
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQL Server 2005 replaced with SQL Server 2014 trying to connect front end Access as guest (read only ODBC)

    We have replaced a SQL Server 2005 with a SQL Server 2014 (new physical server.)  Have the new server set up to use SQL Server login OR Windows user login. Had old server connecting (for a particular DB) to front end Access (2010 or 2013) as guest for
    anyone logged into the Windows NT Network with a read only ODBC connection. Have the DB in the new server set to include guest as db_datareader (with only SELECT permission for the securables of each table and view being linked) but when any Windows user not
    specifically listed as a SQL DB user tries to use the front end they get an error of:
    Microsoft SQL Server Login
    Connection failed:
    SQL State: '28000'
    SQL Server Error: 18456
    [Microsoft][OCBC SQL Server Driver][SQL Server] Login failed for user {domain\user}.
    After closing that pop-up window a server login window appears. Of course, since the guest user is not specifically listed as a user in the DB that fails also. It seems like there should be a very simple solution to this, but I can't seem to find it. I want
    to allow anyone logged in on the Windows system (locally) to be able to open the MS Access file (on their work station machine) and run their own (read only; select) queries on the SQL Server database. Any suggestions?
    Thanks a billion in advance ----

    Thanks for the response Olaf. I have now spent weeks researching this. I realize that using the guest account in most situations is not advised. As mentioned, I have restricted the guest account to allow the db_datareader role only, and have explicitly denied
    all other roles, as well as allowing select only, and still have no access for the guest account.
    The suggested fix in the second link you provided, of using Windows groups is not plausible for my situation either. We are a scientific field research institution, with a few long term users and lots of users that may have Windows accounts for a few months,
    and then they are gone. It would be a nightmare for the network tech to try to keep a group account up to date, and we need to give access (read only, of course) to anyone logged into the system. Realize that the ONLY access of any kind to this database is
    thru MS Access ACCDB, using a (by default) read only OCDB connection.
    This type of access is used particularly because researchers need to be able to set up their own queries, and the MS Access query interface is particularly convenient for people who are not themselves SQL experts, yet are trying to get some very advanced
    levels of output. Putting the database online is not practical because then we are back to the need for a comprehensive query interface, and just picking up general subsets of the data online (from a basic web page search feature) would be out of the question,
    since the result set would involve hundreds of thousands if not millions of records.
    So - that said - what exactly would you suggest, assuming we don't have the funds to buy a whole new system, and have spent plenty of money with Microsoft's Enterprise level MS Office so that all work stations have MS Access, and Microsoft's SQL Server,
    as well as running our network on Microsoft's network software.

Maybe you are looking for

  • Dunning won't print to smartform

    Hey all, I've been trying to set up the Dunning process to print to the standard SAP dunning smartform (F150_DUNN_SF). Here's what I've done so far: 1. Used transaction BF31 to change the function module for dunning to FI_PRINT_DUNNING_NOTICE_SMARTF.

  • Chris Meyer - Creating Motion Graphics CS5 vs CS3

    I am looking at purchasing the Chris Meyer "Creating Motion Graphics with After Effects" book. The 2007 edition for CS3 is significantly cheaper than the 2010 edition for CS5. Since the CS5 version is already out of date, would I be missing any signi

  • Installing Vista after replacing hard drive in a Toshiba Satellite L45-57423

    The hard drive in my old Toshiba laptop went bad and had to be replaced. I no longer have (and am unsure I ever had) the Windows recovery disk. Do I need to purchase a new Windows Vista recovery disk for this computer or is it better to buy a Windows

  • HP Pavilion DV6 Graphics Upgrade

    Hello ladies & gentlemen, I'm the proud owner of a HP Pavilion DV6 Notebook. The only flaw I've found is that it doesn't have a good video performance (which is a shame for a having an 720p HD display). The graphics device installed is a Mobile Intel

  • Reconciliation to other tables (than USR)

    Hello, I am using Database Tables Connector to reconcile data from HR system to OIM, the connector reconciles data from table e.g. USERS in HR system to OIM (USR table - it is hard-coded in the connector) - this mechanism works really fine... ...but.