Presentation is loading. Please wait.

Presentation is loading. Please wait.

IMS 4212: Data and Database Administration 1 Dr. Lawrence West, Management Dept., University of Central Florida Data & Database Administration.

Similar presentations


Presentation on theme: "IMS 4212: Data and Database Administration 1 Dr. Lawrence West, Management Dept., University of Central Florida Data & Database Administration."— Presentation transcript:

1 IMS 4212: Data and Database Administration 1 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Data & Database Administration Database Backup Backing Up in SQL Server –The Transaction Log –Differential Backup –Full Backup –Copying the Database

2 IMS 4212: Data and Database Administration 2 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Backing up Databases Why should we back up? What are the tradeoffs with backing up? What is the worst thing that could happen to your data? –How likely is it to happen? –What would it cost? What else could happen? –Likelihood? Cost? What backup strategies are available?

3 IMS 4212: Data and Database Administration 3 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Backing up Databases Database Backup Strategies –Mirroring –Offsite mirroring –Logging transactions –Differential backups –Rollback/Commit strategies for business transactions –SQL Server backup

4 IMS 4212: Data and Database Administration 4 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Mirroring Mirroring is the practice of replicating transactions onto two different storage systems as they occur Some DBMS will automatically implement mirroring Can also be implemented at the application level –Create two connection objects to different DB –Execute each Update/Insert/Delete against both connections –Only query one –Second copy is available for full use if the primary becomes unavailable –Either copy can be restored from the other

5 IMS 4212: Data and Database Administration 5 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Off-Site Mirroring Off-Site Mirroring is just mirroring with one copy of the DB located in a geographically distant location –"Distant" should be far enough away to not be affected by the same disaster Network speed must support multi-site operations Reverting to the remote copy for routine operations may be troublesome for queries with large result sets

6 IMS 4212: Data and Database Administration 6 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Backup in SQL Server The Transaction Log Differential Backup Full Backup Copying the Database

7 IMS 4212: Data and Database Administration 7 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu The Transaction Log The transaction log is a separate physical file created when the database is created Every DB event since the last backup is recorded (mirrored) in the transaction log (as SQL statements) In the event of failure:

8 IMS 4212: Data and Database Administration 8 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu The Transaction Log (cont.) The TL should be on a separate physical drive from the database –Faster reads and writes –Less likelihood of losing both data sources at once The TL may also be backed up (which resets the active TL)

9 IMS 4212: Data and Database Administration 9 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu The Transaction Log (cont.) Making more frequent (smaller) TL backups: –Reduces the time needed for backing up –Keeps the TL physical file size smaller –Increases (slightly) the time needed to restore the DB

10 IMS 4212: Data and Database Administration 10 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Differential Backup A differential backup is a backup of the database since the last time a full or differential database backup was performed Smaller than a full backup Good when some parts of the DB are more volatile than others TL backups can be applied on top of a differential backup

11 IMS 4212: Data and Database Administration 11 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Full Backup A Full Backup backs up the entire database Takes longer than the other backup strategies (obviously) Creates a larger file size May be used to copy or move a database

12 IMS 4212: Data and Database Administration 12 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Backup Strategies How frequently is each type of backup performed? –Transaction log backup –Differential backup –Full backup Where is data kept? What is time needed to perform the backup –And performance degradation while backup is in progress How long to restore the DB to full operating condition –Hardware replacement –DB backup

13 IMS 4212: Data and Database Administration 13 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Managing Backup Media Know what media must be restored in what order in the event of a failure Recycle media when its contents have been made redundant –Recommended to keep one backup of a backup Manage age of media—destroy when too old Manage storage of media Manage media labeling

14 IMS 4212: Data and Database Administration 14 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Managing Backup Media (cont.) You should manage backup media so that the same disaster does not burn up your operating data and your backup At a minimum backup media should be removed from the room –Building City –State The abandoned coal mine repository

15 IMS 4212: Data and Database Administration 15 Dr. Lawrence West, Management Dept., University of Central Florida lwest@bus.ucf.edu Backing Up in SQL Server Available in Tasks menu You may select a backup file Backup devices (tape drives) will be recognized if installed


Download ppt "IMS 4212: Data and Database Administration 1 Dr. Lawrence West, Management Dept., University of Central Florida Data & Database Administration."

Similar presentations


Ads by Google