How to Enable and Disable Login in SQL Server - SQL Server DBA Tutorial

In this video you will learn how to enable and disable SQL Server login using SQL Server management studio as well as T-SQL Script. It explains the options such as deny, grant, enable and disable login status in SQL Server. It also explains which options to use when.

Scripts used in this video to enable or disable SQL Server Login

--How to enable SQL Server Login
 USE [master]
GO
 
GRANT CONNECT SQL TO [Techbrothers]
GO
 
ALTER LOGIN [Techbrothers] ENABLE
GO

 -- How to disable SQL Server Login 
USE [master]
GO
 
DENY CONNECT SQL TO [Techbrothers]
GO

 ALTER LOGIN [Techbrothers] DISABLE
GO




Disable/Enable SQL Server Login - SQL Server DBA Tutorial

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.