SQL Create Login and User in SQL Server | Grant and Deny Permissions

Опубликовано: 14 Март 2025
на канале: The SQL Guy
1,144
4

Here we look at how to Create Logins, Create users, grant and deny permissions in SQL Server.

Contents

00:00 Logins vs Users
00:43 Create Login SQL Server
02:38 How to Grant Access to Login
04:13 Map Login to User
05:00 Assign permissions to user and login
07:29 Revoke access for user
08:00 Grant permissions to specific objects

Create Login and User in Database

In this tutorial we look at how to create a login in SQL Server and what that gives us in terms of permissions and access to various databases, we then look at how to map that Login to a User within a database.

We cover the two types of logins - Active Directory logins and SQL Logins and the difference between the two. There is a nice info graphic at the beginning which shows the difference between a Login and a User which should help nicely with any confusion

Database Roles and Server Roles

We also cover how to grant server roles to SQL Logins and then likewise grant database roles to the users in the database.

Assign and Deny Permissions

The SQL tutorial then covers how to assign and deny permissions to both the database and objects in the database, but then likewise deny a user access to a database or objects.

In some cases we need to see how to just grant permissions to a particular object such as a table - and this tutorial covers that also.

Enjoy - and like and subscribe