aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes MS SQL Server / JDBC / Ant problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "MS SQL Server / JDBC / Ant problems" Watch "MS SQL Server / JDBC / Ant problems" New topic
Author

MS SQL Server / JDBC / Ant problems

Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
Hello,
I am having trouble using Ant and MS SQL Server... Here's the info:
<target name="run.prelim.sql" depends="" >
<sql
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://baba:1433;database=FishStore"
userid="foobar"
password="barbaz"
rdbms="mssqlserver"
>
<transaction
src="E:\Apps\FishStore\FishScripts\test.sql"/>
</sql>
</target>
When I run this ant target:
BUILD FAILED
E:\Apps\FishStore\FishScripts\build.xml:45: java.sql.SQLException: [Microsoft][SQL Server 2000 Driver for JDBC][SQLServer]Login failed for user 'foobar'. Reason: Not associated with a trusted SQL Server connection.
Any suggestions, hints, & tips?
Kindest regards,
Philippe Ebersohl
Greenhorn

Joined: May 04, 2004
Posts: 2
I am also playing with ant,
building a makefile for oracle/pgsql/mssql
1) I use rdbms="microsoft sql server" not rdbms="mssqlserver"
the later is not recognized. I use an SQL Server 2000 Enterprise Edition SP3a
What version/edition do you use ?
2) "Not associated with a trusted SQL Server connection."
May be the security settings
Use SQL Server Enterprise Manager, connect as "sa" or "security operator"
/ Right click on "YourServerName(Windows NT)"
/ "SQL Server Properties (configure)" choos "security" tab
/ Authentication:
(o) SQL Server and Windows
(_) Windows only
When Windows only, only trusted windows connections are allowed.
The scripting way (isql)
EXEC xp_loginconfig 'login mode'
should report 'mixed' or 'windows'
Hope that helps
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MS SQL Server / JDBC / Ant problems
 
Similar Threads
Ant, JDBC, MS SQL Server
IllegalArgumentException with Ant
JBoss 4.0 and MSSQL Server 2000
no sqljdbc_auth in java.library.path
using ant sql task with mssql server 2000