Upload
praveen-bachu
View
228
Download
0
Embed Size (px)
Citation preview
8/9/2019 SQL Server Advaced Topics.pdf
1/15
SQL Server Recovery Models (2008R2) .................................................................................. 2
What is a Recovery Model ? ................................................................................................... 2
Full Recovery Model ............................................................................................................... 2
Bulk Logged Recovery Model ................................................................................................. 3
Simple Recovery Model .......................................................................................................... 5
Backup .................................................................................................................................... 5
Steps Of Restore & Recover Database ................................................................................... 6
Which Databases Are Needed To Be Included For Backup .................................................... 6
HA - SQL Server High Availability ............................................................................................ 7
Database Mirroring ............................................................................................................... 7
Log Shipping ........................................................................................................................... 8
Replication .............................................................................................................................. 81. Server - to - Server .............................................................................................................. 9
2. Server - to - Client ............................................................................................................... 9
Types Of Replication ............................................................................................................. 10
Roles In Replication ............................................................................................................. 10
SQL Agent And Its Role ......................................................................................................... 12
Replication - Push And Pull ................................................................................................... 12
Resource Governor ............................................................................................................... 13
Performing Data Management Tasks ................................................................................... 13
Importing and Exporting Data .............................................................................................. 13
Maintaining Indexes ............................................................................................................. 14
Data Compression ................................................................................................................ 14
Performance Monitoring ...................................................................................................... 14
When do we need SQL Profiler / SQL Trace ? ...................................................................... 15
SQL Server Monitoring Tools Comparison ........................................................................... 15
This is indeed 100% copy and paste from material, but not my preparation
8/9/2019 SQL Server Advaced Topics.pdf
2/15
SQL Server Recovery Models (2008R2)
The following are the Recovery Models (2008R2) :
Full, Bulk Logged and Simple Recovery Model
What is a Recovery Model ?
Determines what's available to be backed up what you are saving
Where do you find which Recovery Model was being used to a Database?
Right Click on Database and Select Properties Window and here you can see the last backup
and Recovery Model.
Full Recovery Model
What is the use of Full Recovery Model ?
For example the System crashes at 7pm. You can restore the database to this point
8/9/2019 SQL Server Advaced Topics.pdf
3/15
When do you use this Full Recovery Model?
Bulk Logged Recovery Model
It is an adjunct to Full Recovery Model
So what gets lost ?
8/9/2019 SQL Server Advaced Topics.pdf
4/15
Let's say you are doing bulk load operation
So, first we do full back and also log back up
Started some bulk load operation. Things are cool if it is successful !
If some disaster happened, let's say, some changes to database etc. So, what do you
lose now? Entire thing until that last log backup
What we do to reduce this loss or fix such loss?
Backup your Log just before you do bulk operation and also after bulk operation
When to use this Bulk Logged Recovery Model ?
Note :
As soon as a set of bulk operations finished, immediately switch back to the Full Recovery
Model
8/9/2019 SQL Server Advaced Topics.pdf
5/15
Simple Recovery Model
When do you use simple recovery model ?
Backup
8/9/2019 SQL Server Advaced Topics.pdf
6/15
8/9/2019 SQL Server Advaced Topics.pdf
7/15
HA - SQL Server High Availability
Replication is the preferred choice !!!
Failover Clustering :
Expensive and the License costs go high
Database Mirroring
8/9/2019 SQL Server Advaced Topics.pdf
8/15
Log Shipping
Replication
Comparisons
8/9/2019 SQL Server Advaced Topics.pdf
9/15
Two Main Categories :
1. Server - to - Server
Note : two way arrows indicate Replication in both directions
2. Server - to - Client
The big question is what gets where and when ? This leads to
8/9/2019 SQL Server Advaced Topics.pdf
10/15
Types Of Replication
Roles In Replication
8/9/2019 SQL Server Advaced Topics.pdf
11/15
8/9/2019 SQL Server Advaced Topics.pdf
12/15
SQL Agent And Its Role
SS Agent plays a major player in automating Replication. Some other Agents are :
Replication - Push And Pull
8/9/2019 SQL Server Advaced Topics.pdf
13/15
Resource Governor
Performing Data Management Tasks
Importing and Exporting Data
Maintaining Indexes
Importing and Exporting Data
Navigation :
Right click on - -> tasks --> export data
8/9/2019 SQL Server Advaced Topics.pdf
14/15
Maintaining Indexes
Data Compression
Performance Monitoring
The Tools are :
8/9/2019 SQL Server Advaced Topics.pdf
15/15
When do we need SQL Profiler / SQL Trace ?
SQL Server Monitoring Tools Comparison