• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

MS SQL Server / JDBC / Ant problems

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic