...
Class.forName
("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://123.123.12.123:1433", "harryc"
, "");
...
Every SQL Server is fine, except one that is not in the
same domain.
The error message is as following:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]
[SQLServer]Login failed for user 'lcg'.
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at java.sql.SQLException.<init>
(SQLException.java:45)
at
com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorTok
en(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyTok
en(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processRep
lyToken(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply
(Unknown Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open
(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection
(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open
(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect
(Unknown Source)
at java.sql.DriverManager.getConnection
(DriverManager.java:459)
at java.sql.DriverManager.getConnection
(DriverManager.java:139)
at JdbcTester.main(JdbcTester.java:13)
Does anybody has any idea?
Harry Chou wrote:
>
> I tried to write a simple test as following.
>
> ...
> Class.forName
> ("com.microsoft.jdbc.sqlserver.SQLServerDriver");
> Connection conn = DriverManager.getConnection
> ("jdbc:microsoft:sqlserver://123.123.12.123:1433", "harryc"
> , "");
> ...
>
> Every SQL Server is fine, except one that is not in the
> same domain.
>
> The error message is as following:
> java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]
> [SQLServer]Login failed for user 'lcg'.
It looks like maybe you didn't recompile or something. The exception
above is from code that sets the user name to 'lcg', not
'harryc'...
Joe
Bill Toleman [MS SQL Support]
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.