Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
spillo491
Starting Member
3 Posts |
Posted - 2010-09-09 : 10:50:33
|
| Can you help me with correct java code to connect to sql server with windows authentication ?dbUrl=jdbc:jtds:sqlserver://192.168.3.6:1099/db_test;instance=testConnection con = DriverManager.getConnection( dbUrl, "", "" );Sql server and web server (tomcat on my machine) are on the same local network !Thank youRegards |
|
|
RobertKaucher
Posting Yak Master
169 Posts |
Posted - 2010-09-09 : 13:19:11
|
| You should probably ask this in a Java forum.===http://www.ElementalSQL.com/ |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
spillo491
Starting Member
3 Posts |
Posted - 2010-09-10 : 03:02:26
|
| Problem is that sql server have windows authetication now !! Before with sql authentication mode I could connect to sql server.sql server is on machine 192.168.3.6Web server (clinet, my machine) is 192.168.3.10 |
 |
|
|
spillo491
Starting Member
3 Posts |
Posted - 2010-09-10 : 03:04:13
|
| Same error with thisdbUrl=jdbc:jtds:sqlserver://serverName:1099/db_test;instance=testConnection con = DriverManager.getConnection( dbUrl, "", "" );java.sql.SQLException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. |
 |
|
|
RobertKaucher
Posting Yak Master
169 Posts |
Posted - 2010-09-10 : 16:15:41
|
Try something like this:jdbc:sqlserver://serverName:1099;databaseName=AdventureWorks;integratedSecurity=true; See this article:http://msdn.microsoft.com/en-us/library/ms378428(SQL.90).aspxI still think you would get better results posting this to a Java forum.===http://www.ElementalSQL.com/ |
 |
|
|
|
|
|