1 Reply Latest reply on Sep 21, 2004 9:46 AM by KT KT

    setup datasource with MS sql server

    ge zhang Newbie

      I got following error message while setup datasource with sql server 2000:

      Login in failed for user sa, Reason: Not associated with a trusted SQL Server connection.

      I tried both Microsoft jdbc driver and jtds jdbc driver. Got the same result.

      Here is some of the key setup:

      <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=lportal</connection-url>
      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      <user-name>sa</user-name>
      password


      I am not familar with sql server/jdbc at all. Can anybody help me out?

      Thanks.

      Ge

        • 1. Re: setup datasource with MS sql server
          KT KT Newbie

          copy msbase.jar,mssqlserver.jar,msutil.jar to your server//{server_config}/deploy/lib folder

          your mssql-ds.xml should look like something like this

          <?xml version="1.0" encoding="UTF-8"?>

          <local-tx-datasource>
          <jndi-name>YourJNDIName</jndi-name>
          <connection-url>jdbc:microsoft:sqlserver://servername:1433;DatabaseName=DatabaseName</connection-url>
          <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
          <min-pool-size>100</min-pool-size>
          <max-pool-size>1000</max-pool-size>
          <blocking-timeout-millis>5000</blocking-timeout-millis>
          <user-name>x</user-name>
          y



          hope it helps