Database Diagram
Store Procedure - uspMonthlyFee RESULTS “ Before” “ After”
Store Procedure - uspNightlyUpdate RESULTS “ Before” “ After”
Inline Table-Valued Function
Create an Indexed View Create a clustered index  on an existing view
Create Views for Reports Result From  View Selection
XML Loading
Configure Merge Replication
Merge Replication
Security Model Managing Security:  login, server scope permission, password police, certificate, symmetric key, asymmetric key database role,  user group,  authentication schemas, views, triggers, store procedure
Code for Encryption
Create BFManager role and add a member to the Role Add Securables and grant execution permission to BFManager
Get Sensitive Data by Authorized User EXECUTE AS USER  =  ‘NingYin'  EXEC sales .uspGetCreditCardNumber 1 REVERT ; GO Result: UnencryptedCCValue ------------------------------ 6598452635478965 (1 row(s) affected)
Schemas and Views Schemas: Inventory, Sales Create a view for inventory search
Triggers   Use DML triggers to enforce data integrity Use DDL trigger to respond object changes in database CREATE TRIGGER AuditOperations ON DATABASE FOR DDL_TABLE_VIEW_EVENTS AS RAISERROR('DDL Database level changes are prevented by  the AuditOperations trigger', 16, 1)  ROLLBACK GO CREATE TRIGGER TransDeleteAuditor ON dbo.Transactions INSTEAD OF DELETE NOT FOR REPLICATION AS BEGIN RAISERROR('Transactions delete is prevented by the MDL trigger', 16, 1)  ROLLBACK END GO  CREATE TRIGGER AuditOperations ON DATABASE FOR DDL_DATABASE_LEVEL_EVENTS AS DECLARE @data xml DECLARE @cmd nvarchar(350) DECLARE @logMsg nvarchar(400) SET @data = eventdata() SET @cmd = @data.value ('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'nvarchar(350)') SET @logMsg = @cmd + ' (' + SYSTEM_USER + ' on ' + HOST_NAME() + ')' RAISERROR (@logMsg, 10, 1) WITH LOG GO
Maintenance Jobs Backup Agent jobs Table partitioning Email notification Other: Performance monitoring and tuning
Backup Strategy Backup Plan: Full Backup:  Once a week Sunday night at 12:00am Differential Backup:  Every night 11:00pm Transaction Log Backup:  Every hour from 6:00am ~ 11:00pm
Schedule Agent Job: Daily Due Fee Update A store procedure is executed every night on SQL Server agent to check all customers and update information.
Table Partition Partition  Transaction table into 3 different file groups CREATE PARTITION FUNCTION pf_TransactionDate (datetime) AS RANGE RIGHT FOR VALUES('01/01/2008','01/01/2009') CREATE PARTITION SCHEME ps_TransactionDate AS PARTITION pf_TransactionDate  TO (fg1, fg2, fg3) CREATE TABLE dbo.TransactionArchive (TransactionID int IDENTITY NOT NULL, TransactionTYpeID int NOT NULL, CustomerID int NOT NULL, CopyID int NOT NULL, MediaID int NOT NULL, StoreID int NOT NULL, TransactionDate datetime NOT NULL) ON ps_TransactionDate(TransactionDate) Implement  partitioning and verify: USE BlockFlix INSERT INTO dbo.MediaArchive(MediaID, Title, GenreID, RatingID, [Year]) SELECT MediaID, Title, GenreID, RatingID, [Year] FROM dbo.Media SELECT MediaID, Title, $Partition.pf_MediaReleaseYear([Year]) PartitionNo FROM dbo.MediaArchive MediaID  Title  PartitionNo ----------- -------------------------------------------------- ----------- 1011  A Great Flick  1 1012  Ba BOO  1 1013  Botle Neck  1 1016  Lefty    1 1017  Looking Down  3 1018  Too Much SQL  3 1019  Moo Money  3 1020  Late For Dinner  3
Table Partition
Configure Database Mail for Notification
Configure Agent to Use Database Mail
System Monitoring
BlockFlix Database Maintenance Plan Backup  Database Task Create Reorganize Index Task Check BlockFlix Database IntegrityTask Resource Error Task Execute SQL Server Agent Job: Check Media Due Process Execute T-SQL statement Task Maintenance cleanup task Rebuild index task History cleanup task Shrink database task Update statistics task
BlockFlix Database Maintenance Plan
Report: Membership
Report: Available Movies

More Related Content

PDF
日経平均上下予想Botを作った話
PPTX
229 mentally ill tracked, treated
DOCX
CV-Mudar_Alhmidi
PDF
Project_Overview_ecopy
PDF
Modulgufran
DOCX
Writting Assignment 2
DOCX
Resume ashish
DOC
CV_SAPHCM_JUNE16
日経平均上下予想Botを作った話
229 mentally ill tracked, treated
CV-Mudar_Alhmidi
Project_Overview_ecopy
Modulgufran
Writting Assignment 2
Resume ashish
CV_SAPHCM_JUNE16

Viewers also liked (14)

PDF
Bonus pelajaran bahasa arab
DOCX
Tugas kewarganegaraan x ap 1
PPTX
Context and culture in language teaching
PDF
Social Housing and the New Urban Agenda
PPTX
Preparing the new urban agenda
DOCX
Bab 6 rpp ppkn sma kls xi menyibak kasus pelanggaran hak dan pengingkaran ke...
PPT
Propulsion
PPTX
Perbandingan pancasila dengan ideologi ideologi lainnya
PDF
Powertrain and suspension layout of Nissan GTR
DOC
Makalah indonesia dan perdamaian dunia
PDF
Revisando o quinhentismo, 01
PDF
Hukum Hukum Dasar Kimia
DOC
Surat pemulangan buku teks 2015
PPTX
Visual Resume (Draft)
Bonus pelajaran bahasa arab
Tugas kewarganegaraan x ap 1
Context and culture in language teaching
Social Housing and the New Urban Agenda
Preparing the new urban agenda
Bab 6 rpp ppkn sma kls xi menyibak kasus pelanggaran hak dan pengingkaran ke...
Propulsion
Perbandingan pancasila dengan ideologi ideologi lainnya
Powertrain and suspension layout of Nissan GTR
Makalah indonesia dan perdamaian dunia
Revisando o quinhentismo, 01
Hukum Hukum Dasar Kimia
Surat pemulangan buku teks 2015
Visual Resume (Draft)
Ad

Similar to Database Development Replication Security Maintenance Report (20)

PPT
Kevin Bengtson Portfolio
PDF
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
PDF
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
PPTX
Enhancements that will make your sql database roar sp1 edition sql bits 2017
PDF
Apache Calcite Tutorial - BOSS 21
PPTX
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
PPTX
Training on Microsoft SQL Server(older version).pptx
PPTX
New Features of SQL Server 2016
PDF
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
PDF
SQL Performance Tuning and New Features in Oracle 19c
DOCX
Oracle 12c Automatic Data Optimization (ADO) - ILM
PPT
Evolutionary db development
PPT
IBM Informix dynamic server 11 10 Cheetah Sql Features
PDF
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
PDF
What’s New in MariaDB Server 10.2
PPT
PHP tips by a MYSQL DBA
PPTX
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
PDF
Streaming SQL for Data Engineers: The Next Big Thing?
PDF
Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...
PPT
Database Foundation Training
Kevin Bengtson Portfolio
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Apache Calcite Tutorial - BOSS 21
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
Training on Microsoft SQL Server(older version).pptx
New Features of SQL Server 2016
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
SQL Performance Tuning and New Features in Oracle 19c
Oracle 12c Automatic Data Optimization (ADO) - ILM
Evolutionary db development
IBM Informix dynamic server 11 10 Cheetah Sql Features
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
What’s New in MariaDB Server 10.2
PHP tips by a MYSQL DBA
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Streaming SQL for Data Engineers: The Next Big Thing?
Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...
Database Foundation Training
Ad

Recently uploaded (20)

PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Benefits of Physical activity for teenagers.pptx
PPT
Geologic Time for studying geology for geologist
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPT
What is a Computer? Input Devices /output devices
PPTX
Configure Apache Mutual Authentication
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
The influence of sentiment analysis in enhancing early warning system model f...
DOCX
search engine optimization ppt fir known well about this
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Microsoft Excel 365/2024 Beginner's training
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
sbt 2.0: go big (Scala Days 2025 edition)
Benefits of Physical activity for teenagers.pptx
Geologic Time for studying geology for geologist
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
What is a Computer? Input Devices /output devices
Configure Apache Mutual Authentication
NewMind AI Weekly Chronicles – August ’25 Week III
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
The influence of sentiment analysis in enhancing early warning system model f...
search engine optimization ppt fir known well about this
Consumable AI The What, Why & How for Small Teams.pdf
Custom Battery Pack Design Considerations for Performance and Safety
Zenith AI: Advanced Artificial Intelligence
Developing a website for English-speaking practice to English as a foreign la...
Abstractive summarization using multilingual text-to-text transfer transforme...
Convolutional neural network based encoder-decoder for efficient real-time ob...
OpenACC and Open Hackathons Monthly Highlights July 2025
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf

Database Development Replication Security Maintenance Report

  • 2. Store Procedure - uspMonthlyFee RESULTS “ Before” “ After”
  • 3. Store Procedure - uspNightlyUpdate RESULTS “ Before” “ After”
  • 5. Create an Indexed View Create a clustered index on an existing view
  • 6. Create Views for Reports Result From View Selection
  • 10. Security Model Managing Security: login, server scope permission, password police, certificate, symmetric key, asymmetric key database role, user group, authentication schemas, views, triggers, store procedure
  • 12. Create BFManager role and add a member to the Role Add Securables and grant execution permission to BFManager
  • 13. Get Sensitive Data by Authorized User EXECUTE AS USER = ‘NingYin' EXEC sales .uspGetCreditCardNumber 1 REVERT ; GO Result: UnencryptedCCValue ------------------------------ 6598452635478965 (1 row(s) affected)
  • 14. Schemas and Views Schemas: Inventory, Sales Create a view for inventory search
  • 15. Triggers Use DML triggers to enforce data integrity Use DDL trigger to respond object changes in database CREATE TRIGGER AuditOperations ON DATABASE FOR DDL_TABLE_VIEW_EVENTS AS RAISERROR('DDL Database level changes are prevented by the AuditOperations trigger', 16, 1) ROLLBACK GO CREATE TRIGGER TransDeleteAuditor ON dbo.Transactions INSTEAD OF DELETE NOT FOR REPLICATION AS BEGIN RAISERROR('Transactions delete is prevented by the MDL trigger', 16, 1) ROLLBACK END GO CREATE TRIGGER AuditOperations ON DATABASE FOR DDL_DATABASE_LEVEL_EVENTS AS DECLARE @data xml DECLARE @cmd nvarchar(350) DECLARE @logMsg nvarchar(400) SET @data = eventdata() SET @cmd = @data.value ('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'nvarchar(350)') SET @logMsg = @cmd + ' (' + SYSTEM_USER + ' on ' + HOST_NAME() + ')' RAISERROR (@logMsg, 10, 1) WITH LOG GO
  • 16. Maintenance Jobs Backup Agent jobs Table partitioning Email notification Other: Performance monitoring and tuning
  • 17. Backup Strategy Backup Plan: Full Backup: Once a week Sunday night at 12:00am Differential Backup: Every night 11:00pm Transaction Log Backup: Every hour from 6:00am ~ 11:00pm
  • 18. Schedule Agent Job: Daily Due Fee Update A store procedure is executed every night on SQL Server agent to check all customers and update information.
  • 19. Table Partition Partition Transaction table into 3 different file groups CREATE PARTITION FUNCTION pf_TransactionDate (datetime) AS RANGE RIGHT FOR VALUES('01/01/2008','01/01/2009') CREATE PARTITION SCHEME ps_TransactionDate AS PARTITION pf_TransactionDate TO (fg1, fg2, fg3) CREATE TABLE dbo.TransactionArchive (TransactionID int IDENTITY NOT NULL, TransactionTYpeID int NOT NULL, CustomerID int NOT NULL, CopyID int NOT NULL, MediaID int NOT NULL, StoreID int NOT NULL, TransactionDate datetime NOT NULL) ON ps_TransactionDate(TransactionDate) Implement partitioning and verify: USE BlockFlix INSERT INTO dbo.MediaArchive(MediaID, Title, GenreID, RatingID, [Year]) SELECT MediaID, Title, GenreID, RatingID, [Year] FROM dbo.Media SELECT MediaID, Title, $Partition.pf_MediaReleaseYear([Year]) PartitionNo FROM dbo.MediaArchive MediaID Title PartitionNo ----------- -------------------------------------------------- ----------- 1011 A Great Flick 1 1012 Ba BOO 1 1013 Botle Neck 1 1016 Lefty 1 1017 Looking Down 3 1018 Too Much SQL 3 1019 Moo Money 3 1020 Late For Dinner 3
  • 21. Configure Database Mail for Notification
  • 22. Configure Agent to Use Database Mail
  • 24. BlockFlix Database Maintenance Plan Backup Database Task Create Reorganize Index Task Check BlockFlix Database IntegrityTask Resource Error Task Execute SQL Server Agent Job: Check Media Due Process Execute T-SQL statement Task Maintenance cleanup task Rebuild index task History cleanup task Shrink database task Update statistics task