Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Professional Azure SQL Managed Database Administration

You're reading from   Professional Azure SQL Managed Database Administration Efficiently manage and modernize data in the cloud using Azure SQL

Arrow left icon
Product type Paperback
Published in Mar 2021
Publisher Packt
ISBN-13 9781801076524
Length 724 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ahmad Osama Ahmad Osama
Author Profile Icon Ahmad Osama
Ahmad Osama
Shashikant Shakya Shashikant Shakya
Author Profile Icon Shashikant Shakya
Shashikant Shakya
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introduction to Azure SQL managed databases 2. Service tiers FREE CHAPTER 3. Migration 4. Backups 5. Restoration 6. Security 7. Scalability 8. Elastic and instance pools 9. High availability and disaster recovery 10. Monitoring and tuning 11. Database features 12. App modernization Index

Activity: Implementing RLS

In this section, we will look at how to implement RLS using our example of ToyStore Ltd. Mike has been asked to implement RLS so that every customer is able to view and edit only their records. The CustomerAdmin user, however, should be allowed to view and edit all customer records. Follow these steps to complete the activity:

  1. Execute the following query to create the dpl.Customers table and populate it with sample records:
    CREATE TABLE Customers (
    CustomerID int identity, Name sysname, CreditCardNumber varchar(100), Phone varchar(100), Email varchar(100)
    )
    Go
    INSERT INTO Customers VALUES('Mike',0987654312345678,9876543210,'mike@
    outlook.com'), ('Mike',0987654356784567,9876549870,'mike1@outlook.
    com'), ('Mike',0984567431234567,9876567210,'mike2@outlook.com'), (' john@dpl.com ',0987654312345678,9876246210,'john@outlook.com'),
    ('john@dpl.com ',0987654123784567,9876656870...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image