How to enable or disable ‘sa’ login?


/* To disable 'sa' Login */
ALTER LOGIN [sa] DISABLE
GO
/* To Enable 'sa' Login */
ALTER LOGIN [sa] ENABLE
GO

2 thoughts on “How to enable or disable ‘sa’ login?

  1. Santhosh's avatarSanthosh

    Where this command is run ? I tried on SQL Query Analyzer, it give error

    Server: Msg 170, Level 15, State 1, Line 1
    Line 1: Incorrect syntax near ‘LOGIN’.

    Reply

Leave a reply to Santhosh Cancel reply