Granting rights to the sa account using osql
Posted
by Jan Jongboom
on Server Fault
See other posts from Server Fault
or by Jan Jongboom
Published on 2009-08-18T09:29:11Z
Indexed on
2010/03/20
23:01 UTC
Read the original article
Hit count: 429
sql-server
|osql
I'm installing sql instances through script, and after creating a certain instance, I cannot get the sa account to be enabled through osql.
What I've tried
osql -S .\INSTANCENAME -E
use master
ALTER LOGIN sa ENABLE
GOUsing SSMS to enable the account (by logging in using Windows Auth., 'New query', and exactly the same query as in 1.)
Suggestions in this issue
No. 2. is actually working; and the account is enabled instantly. No 1 is not working, not even with the suggestions provided in 3., I have restarted the SQL services after executing the commands in osql.
Additional info
Windows 2003 Server, Microsoft SQL Server 2005 Enterprise, No password policies apply to the account.
© Server Fault or respective owner