You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mark A. Richman" <ma...@markrichman.com> on 2002/06/22 16:07:40 UTC

Microsoft SQL Server 2000 Driver for JDBC Errors

I am trying to use the JDBC driver with Apache Tomcat 4.0 (JDK 1.4).
Here is
my context configuration for the Datasource from server.xml:

<Context path="/admin" docBase="admin" debug="0" privileged="true">
     <Resource name="jdbc/DremiaDS" auth="SERVLET"
type="javax.sql.DataSource"/>
     <ResourceParams name="jdbc/DremiaDS">
      <parameter>
       <name>User</name>
       <value>sa</value>
      </parameter>
      <parameter>
       <name>Password</name>
       <value>mypassword</value>
      </parameter>
      <parameter>
       <name>DatabaseName</name>
       <value>Dremia</value>
      </parameter>
      <parameter>
       <name>ServerName</name>
       <value>localhost</value>
      </parameter>
      <parameter>
       <name>driverClassName</name>
       <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
      </parameter>
      <parameter>
       <name>driverName</name>

<value>jdbc:microsoft:sqlserver://localhost:1433;ServerName=localhost;Da
taba
seName=Dremia;User=sa;Password=mypassword</value>
      </parameter>
      <parameter>
       <name>maxActive</name>
       <value>8</value>
      </parameter>
      <parameter>
       <name>maxIdle</name>
       <value>4</value>
      </parameter>
     </ResourceParams>
    </Context>

When attempting to access the database, I get the following error:

Debug: SQL Exception:
Debug: State  : 28000
Debug: Message: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Login
failed for user 'sa'.
Debug: Error  : 18456
Debug: State  : 08001
Debug: Message: [Microsoft][SQLServer 2000 Driver for JDBC]An error
occured
while attempting to log onto the database.
Debug: Error  : 0

I am running SQL Server 2000 SP2 with security set to "SQL Server and
Windows". This drivers seems to work fine from Forte CE as well.

Can someone lend a hand?

Thanks,
Mark A. Richman