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.
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. SQL 2005
From Wiki
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.
- USE [master]
- GO
- EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2
- GO
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




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