• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not associated with a trusted SQL Server connection

 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set up a JAAS Alias for that DataSource with the appropriate userid/password?

Kyle
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic