Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. SQL 2005

From Wiki

Jump to: navigation, search

I am seeing a lot of searches on Lessthandot from Yahoo and Google with this search “SQL 2005 Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.” So this is what causes the problem: your SQL Server has been setup with windows authentication only. In order to make it mixed mode authentication right click on the server name in enterprise manager select properties and click on the security tab. Select SQL server and Windows Authentication mode(see picture…) and that will fix it

The cool thing about SQL server 2005 is that you can script this out so that you can run the code on multiple servers instead of going to all the servers and clicking etc. Just click on script and code like the one below will be generated.


  1. USE [master]
  2. GO
  3. EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2
  4. GO


Image:sql2005Security_0.jpg


For the SQL server 2000 version go here: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. SQL 2000


Contributed by: --SQLDenis 15:42, 9 June 2008 (GMT)


Part of SQL Server Admin Hacks

394 Rating: 2.9/5 (7 votes cast)