Authorizing Users To Access Resources
Authorizing Users To Access Resources
Authorizing Users To Access Resources
• Windows Principals:
• Windows group
• Domain user account
• Local user account
• Database Principals:
• User
• Database role
• Application role
What Are Securables?
USE MarketDev;
GO
GRANT SELECT ON OBJECT::Marketing.Salesperson TO
HRApp;
GO
GRANT SELECT ON Marketing.Salesperson TO HRApp;
GO
Column-Level Security
• Advantages:
• Logic held with data—reduces risk of errors and
simplifies security
• Similar to horizontal partitioning or using a
WHERE clause
• Implement by adding a security predicate defined
as an inline table-valued function
WITH GRANT Option
USE MarketDev;
GO
Table1
owned by
View 1 User2
Table 1
View1 owned
by User2
Table 2
User1
granted
View 2 Table2
permission to
owned by
both views
User3
View2 owned
by User2
Demonstration: Authorizing Users to Execute
Code
• Built-in schemas:
• dbo and guest
• sys and INFORMATION_SCHEMA
Object Name Resolution
USE MarketDev;
GO
Logon Information
Virtual machine: 20764B-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa$$w0rd
Customers schema:
• Customer table