Friday, December 14, 2007 4:58 AM
I am trying to login to SQL Server 2005 using SQL Server authentication using 'sa' account but it gives the below error
'Login failed for user 'sa'. Not associated with trusted SQL Server Connection'
The authentication mode set for the server was 'Windows Authentication' so i tried to change that to SQL Server and Windows Authentication but it didnt allow me to change the mode. It gives the below mentioned error.
"An exception occured while executing the Transact SQL or Batch Statement.
Execute permission denied on Object 'xp_instance_regwrite' , database 'mssqlsystemresource',schema 'sys' "
Could you anyone kindly let me how to resolve this issue so that i can connect to the SQL Server using sa account.
Friday, December 14, 2007 7:04 AM
Login as Local Administrator to your machine (SQL Server instance machine) and login to SQL Server instance using windows authentication.
(a) Then change the Authenticaiton mode to SQL Server and WIndows (mixed mode)
(b) Enable SA Login
(c) Restart the service
Friday, December 14, 2007 3:36 PMModerator
Hopefully you still have a sysadmin account to access the server either through the local administrator account as Madhu suggested or one you have set up. Change the authentication as advised.
There is a chance that the sa account is disabled (it is by default) so you may also need to enable this (right click the sa login, status, check enabled).
Sunday, March 16, 2008 1:51 PM
what do you mean by "enable sa login"? How do I enable a login?
Sunday, March 16, 2008 2:19 PMYou can enable sa login using the below query. Execute it in SSMS,
Alter login sa enable
Sunday, March 16, 2008 2:48 PM
well I tried to change security mode to "Mixed" and tried to enabled my user's login but I still get the following error:Code Snippet
java.sql.SQLException: Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.
I will add that I'm using JDBC to access SQL Server 2005 Express. I also enabled the TCP protocol in the network configuration. Can someone help?
Sunday, March 16, 2008 3:13 PMAfter changing the Authentication mode did you restart the Sql Service ?
Sunday, March 16, 2008 5:20 PM
Thursday, April 10, 2008 7:59 PM
Look at the last post
Tuesday, October 21, 2008 6:27 PMThank you, Madhu, This worked for me.
Saturday, April 18, 2009 3:05 AMThank you, Madhu, It really helped me out. thanks alot :)
Thursday, July 16, 2009 7:23 AMhaii ahve also same problemjava.sql.SQLException: Login failed for user 'ccms'. what can i doplease hel to me i have tried all the ways mixed authentication and restart sql server and all but i didt get connectionthe error like"java.sql.SQLException: Login failed for user 'ccms'."
Wednesday, March 17, 2010 8:52 PMHi Zain,
I am also getting same error and confirming that SQL Server is inmixed mode, still getting same exception. I got that you resolved this exception by view above URL send by 'ftpex' but unfortunate page not found.
Please could you share here, how did you resolved it.? I will very thankful to you.
Tuesday, January 18, 2011 12:08 AM
Step by step instructions on how to change authentication modes:
Thursday, January 20, 2011 6:30 PM
Read the following article which explains how to change the SQL Server Authentication Mode.
Hope this helps!
Wednesday, February 02, 2011 7:56 AM
i am sql 2008
and i done already as per u said in ur last submission
but still i am facing the same problem
thanks in advance
Friday, August 12, 2011 6:07 PMThanks for your resolve!!!
Wednesday, May 09, 2012 6:47 AM
Worked for me..