Often I experienced the connection problem while connecting to SQL Server 2005 on Windows Vista with the message "login failed for user" even with an administrator account - sounds strange.
Lets trace why this happens:
- In order to connect to SQL Server 2005 your account must be added to 'sysadmin' fixed server role.- Windows Vista has a new feature called User Account Control or UAC in short which allows admins to manage privileges.- By default accounts on Windows Vista are not part of 'sysadmin' fixed role.
Let's fix the problem
In order to add ordinary user to 'sysadmin' fixed server role - To add a normal user to the 'sysadmin' fixed role execute this system stored procedure
EXEC sp_grantlogin 'domain\user'EXEC sp_addsrvrolemember 'domain\user', 'sysadmin'After executing these stored procedure(s) user who has been granted login and added to 'sysadmin' fixed role no longer receive this error.
Remember Me
Powered by: newtelligence dasBlog 1.8.5223.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2009, Danish Sami, et.al.
User Group Lead