/* ------------------------ My Meta Content Here SEO ------------------------ */

Pages

Main Menu




Sunday, January 8, 2012

SQL SERVER – Enable Login – Disable Login in SQL Server 2005

SQL SERVER – Enable Login – Disable Login using ALTER LOGIC – Change name of the ‘SA’. 
In SQL SERVER 2005, all the login (including ‘sa’ ) can be enabled and disabled using ALTER LOGIN command.

To disable ‘sa’ login:

ALTER LOGIN sa DISABLE
GO

To enable ‘sa’ login:

ALTER LOGIN sa ENABLE
GO

Also for additional security (prevent educated guess from hackers) the name of the ‘sa’ account can be changed.

ALTER LOGIN [sa] WITH NAME = [AdminUser]
GO

No comments:

Post a Comment

Recent Posts

My Blog List