wood burning stoves*
The moose likes Websphere and the fly likes Not associated with a trusted SQL Server connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Not associated with a trusted SQL Server connection" Watch "Not associated with a trusted SQL Server connection" New topic
Author

Not associated with a trusted SQL Server connection

Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
I had no problem getting connection to the SQLServer on my local WSAD 5.1. On my local WSAD, I got a connection via driver manager and datasource. After setting up connection pool in websphere admin console, I got the following error.

[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I googled the error message and got solution which instructed to set the authentication mode of the SQL Server to Mixed mode. Inspecting the setting, I saw that the SQl Server already is set to the mixed mode. Could anybody give me a hint? Thanks in advance.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Have you set up a JAAS Alias for that DataSource with the appropriate userid/password?

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
Kyle,
No, I haven't. Could you show me how to set up a JAAS? Is it like hardcoding userid/password?

What I did was when a connection is needed, userid/passwd were retrieved from a table and invoke datasource.getConnection(userid, passwd); I can get Oracle and Informix connection without any problem.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
No guarantee this will work -- but it's worth a try. You create the JAAS authentication aliases in the Server editor on the page labeled "Security". Just give it a name (like "default") and enter the uid/password. Then in the Datasource configuration dialog you set this as the container-managed security alias.

Do a search in the infoCenter for "JAAS Alias" and you should find more information with screenshots.

Good luck.

Kyle
Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
We found the solution. Unlike Oracle and Informix, SQL Server attempted to authenticate when setLoginTimeOut() was invoked. By avoid setting login timeout, we got the connection.
What I don't understand was why it worked on my desktop. I did not need to make any modification on my desktop. The only difference was I needed to avoid setting loggin timeout when configuring sql server datasource in admin console.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not associated with a trusted SQL Server connection
 
Similar Threads
How to make a data source connection without writing a User name & Password and the -ds.xml file
Login failure Microsoft Sqlserver 2000
SQL Server 2000 and WSAD 5.1 issues
DBCP -- connection string for SQL Server
SQL Server DB connection