Lab
Lab:
Task 1:
1.
with
2. In the
3. Click
for
Task 2:
1. Start
using
2. In
3. In the
SQL
Task 3:
1. In
and
Answer Security
Managing
Exercise
Prepare
Ensure are both
running, ADVENTUREWORKS\Student
the
D: click Run as
administrator
Yes file, and wait
the
Verify
SQL database engine
Windows
Object
Server verify that
Server Cancel
Create
SQL Security,
expand
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
1 of 15 26/09/2016 16:03
2. Open
3.
o
o
the
Review
[ADVENTUREWORKS\Database_Managers]
[ADVENTUREWORKS\WebApplicationSvc]
o [ADVENTUREWORKS\InternetSales_Users]
o [ADVENTUREWORKS\InternetSales_Managers]
o Marketing_Application
4. Click Execute Explorer,
right-click created.
Task 4: Manage
1. In SQL to view the
existing
2. Open the
3. Review
o Creates
o Adds the
application
o Grants permissions to the
application_admin
4. Click Execute Explorer,
right-click been created.
Result: After Server instanceshould support logins andserver-level permissions.
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
2 of 15 26/09/2016 16:03
Task 1:
1. In
its
the
2. Open
3.
o
o
o
o
o
4. Click
Task 2:
1. In
and
2. Open
3.
o
Exercise
Create
Object and expand
Security currently defined in
database.
the
Review
Marketing_Application
WebApplicationSvc
InternetSales_Users
InternetSales_Managers
Database_Managers
Execute Explorer,
right-click created.
Manage
Object Roles folder
view
the folder.
Review
Creates customers_reader,
products_reader
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
3 of 15 26/09/2016 16:03
o
o
o
o
o
o
o
4. Click
that
Task 3:
1. Open
2.
o
o
o
o
o
o
o
o
o
Adds database-level
role.
Adds the
sales_reader
Adds
Adds
Marketing_Application
Adds users to the
products_reader
Adds
Creates
Execute Explorer,
right-click Roles to verify
the
Assign
the \Labfiles\Lab09\Solution folder.
Review
SELECT
INSERT, sales_writer.
SELECT, schema to
sales_admin
SELECT
SELECT
EXECUTE
INSERT
INSERT
SELECT
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
4 of 15 26/09/2016 16:03
3. Click
5. Note
6. In the
Execute
Result: After anddatabase-level
Exercise
Task 1: Test
1. Minimize
2. In the command opens the sqlcmd
utility as
runas sqlcmd
3. When you
4. In the SQLCMD identity:
SELECT
GO
that individual user
account,
ADVENTUREWORKS\
ADVENTUREWORKS\ member of the
ADVENTUREWORKS\ which you
created
SQLCMD password of the
Marketing_Application
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
5 of 15 26/09/2016 16:03
7. In the
8.
9.
10.
1.
2.
3. Click
ALTER
'NewPa$$w0rd';
GO
SQLCMD
ADVENTUREWORKS\WebAplicationSvc
ALTER
GO
Close the Studio.
In Object right-click the
ADVENTUREWORKS\WebApplicationSvc
In the Login dialog box, on
the Status
Task 2: Test
In SQL
In the new impersonate the
Marketing_Application
EXECUTE
GO
SELECT
GO
Execute the
Marketing_Application
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
6 of 15 26/09/2016 16:03
4. Enter
5.
6.
7.
8.
9.
10.
the
USE
SELECT Customer’,
'object');
GO
Select the permissions for
Marketing_Application
Enter the
SELECT
GO
Select the can query the
Customers.
Enter the
UPDATE
SET
WHERE
GO
Select the does not have
UPDATE
Enter the
SELECT
GO
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
7 of 15 26/09/2016 16:03
11. Select
12.
13.
14.
1.
the can query the
Product.
Enter the
SELECT
GO
Select the does not have
SELECT
Close SQL
Task 3: Test
In the command sqlcmd as
ADVENTUREWORKS\We
runas /noprofile sqlcmd
2. When you
3. In the SQLCMD
Products.
SELECT vProductCatalog;
GO
4. Verify that
5. In the SQLCMD Products.Product
table:
SELECT
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
8 of 15 26/09/2016 16:03
6.
7.
1.
2.
3.
4.
5.
GO
Verify that Product table.
Close the
Task 4: Test
In the command sqlcmd as
ADVENTUREWORKS\DanDrayton
ADVENTUREWORKS\Sales_NorthAmerica turn a
member group.
runas sqlcmd
When you
In the SQLCMD
Sales.SalesOrderHeader
SELECT SalesOrderHeader;
GO
Verify that
In the SQLCMD
Sales.SalesOrderHeader
UPDATE WHERE
SalesOrderID
GO
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
9 of 15 26/09/2016 16:03
6.
table.
7. Close
1.
2.
3.
4.
5.
6.
Verify that SalesOrderHeader
the
Task 5: Test
In the command sqlcmd as
ADVENTUREWORKS\DeannaBall
ADVENTUREWORKS\Sales_Managers member of
the ADVENTUREWORKS\InternetSales_Managers
runas sqlcmd
When you
In the SQLCMD
Sales.SalesOrderHeader
SELECT SalesOrderHeader;
GO
Verify that
In the SQLCMD
Sales.SalesOrderHeader
UPDATE WHERE
SalesOrderID
GO
Verify that
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
10 of 15 26/09/2016 16:03
7. In the
8.
9.
10.
11.
12.
13.
SQLCMD
Products.
UPDATE
ProductID
GO
Verify that
In the SQLCMD
Products.
EXEC
GO
Verify that permission on the
Products.
In the SQLCMD from the
Sales.SalesOrderDetail
DELETE =
37747;
GO
Verify that table.
In the SQLCMD sales_admin
application
EXEC
GO
DELETE =
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
11 of 15 26/09/2016 16:03
14. application
role
15. Close
37747;
GO
Verify that sales_admin
has
the
Result: After the MIA-SQLinstance and
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
12 of 15 26/09/2016 16:03
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
13 of 15 26/09/2016 16:03
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
14 of 15 26/09/2016 16:03
Lab Answer Key: Module 9: Managing SQL Server Security https://skillpipe.courseware-marketplace.com/reader/fr-FR/Book/Book...
15 of 15 26/09/2016 16:03