Group 1 - Management of Authorization and Authentication
Group 1 - Management of Authorization and Authentication
AUTHENTICATION AND
AUTORIZATION
GROUP MEMBERS
When installing SQL Server, you have the choice to support only
Windows authentication or both authentication methods, which is
known as mixed mode.
Another method to check which authentication
modes are set up is to use TSQL code. The code in
Listing 1 displays the Authentication mode setup
• Granting permissions:
USE SampleDB;
GRANT SELECT, INSERT, UPDATE ON Employees TO User1;
Example 2: Granting Schema-Level Permissions
Assume we have a schema named "Sales" in the "SampleDB" database, containing
multiple tables. We want to grant SELECT and INSERT permissions to a user named
"User2“
• Granting permissions:
USE SampleDB;
GRANT SELECT, INSERT ON SCHEMA::Sales TO User2;
Example 3: Granting Database-Level Permissions
Suppose we want to grant CREATE PROCEDURE permission at the database level to a
user named "User3".
• Granting permissions:
USE SampleDB;
GRANT CREATE PROCEDURE TO User3;
Create a User:
USE YourDatabaseName;
CREATE USER YourUserName ;
FOR LOGIN YourLoginName;
Grant Permissions:
USE YourDatabaseName;
GRANT EXECUTE ON dbo.GetCustomer TO YourUserName;
Revoking Permissions:
USE YourDatabaseName;
REVOKE EXECUTE ON dbo.GetCustomer TO YourUserName;
Server-Level Permissions:
Examples include CREATE PROCEDURE, ALTER ANY PROCEDURE, VIEW ANY
DEFINITION, etc.