1 / 32

IT390 Business Database Administration Unit 5 : Backup and Restoring Tasks

IT390 Business Database Administration Unit 5 : Backup and Restoring Tasks. Objectives. Backup, Recover and Replicate a Microsoft SQL Database Server. Implement database backup in SQL Server 2000. Explain the importance of database restoration in SQL Server 2000.

naomi
Télécharger la présentation

IT390 Business Database Administration Unit 5 : Backup and Restoring Tasks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IT390 Business Database AdministrationUnit 5 :Backup and Restoring Tasks

  2. Objectives • Backup, Recover and Replicate a Microsoft SQL Database Server. • Implement database backup in SQL Server 2000. • Explain the importance of database restoration in SQL Server 2000. • Explain various database recovery models in SQL Server 2000. • Restore and rebuild a master database. • Explain the process and features of Replication.

  3. SQL Server Backup • SQL Server supports several types of backup: • A complete backup makes a copy of the entire database • A differential backup makes a copy of the database changes since the last complete backup • Differential backups are faster and can be taken more frequently • Complete backups are simpler to use for recovery • The transaction log also needs to be periodically backed up

  4. Database Recovery • Both data and log files are created by SQL Server • SQL Server provides a wizard for setting up database maintenance plan, e.g., scheduling database and log backups • To recover a database with SQL Server: • The database is restored from a prior database backup • Log after images are applied to the restored database • At the end of the log, changes from any transaction that failed to commit are then rolled back

  5. SQL Server Recovery Models • Three recovery models • Simple recovery: neither logging is done nor log records applied: • To recover a database is to restore the database to the last backup • This method can be used for a database that is never changed • Full recovery: all database changes are logged • Bulk-logged: all changes are logged except those that cause large log entries

  6. Activity Julia, the DBA at Ralphsoft Inc., is assigned the responsibility of making backups of critical databases every Friday. How can she perform this task?

  7. Backups • A backup of a database is another copy of the database stored in another physical location, which may be a disk or a tape. • In SQL Server 2000, you can make the following backups: • Full backup • Differential backup • Transaction Log backup • File Group backup

  8. Class Activity • List the tasks that need to done before performing a backup on a critical database.

  9. Performing Backups • In SQL Server 2000, you can perform backups using: • Enterprise Manager • T-SQL • Backup Wizard

  10. Class Activity • List the steps to perform backup using Enterprise Manager (Pages 7.7 – 7.19).

  11. Performing Backup Using T-SQL • You can perform a backup using T-SQL in the following manner: • EXEC sp_addumpdevice 'disk', 'master_backup', 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\ masterbackup.bak' BACKUP DATABASE master TO master_backup WITH INIT

  12. Class Activity • What is the output of the following T-SQL statement? • EXEC sp_addumpdevice 'disk', 'Inventorylog', ‘C:\BACKUPS\inventory_backup.dat‘ BACKUP LOG inventory TO Inventorylog

  13. Class Activity (cont) • Write the command to create a backup for the Employee database named Employee_backup. • The backup must be stored on a disk device named empbackup at the location, C:\Backups\empbackup.bak.

  14. Class Activity (cont) • List the steps to perform a backup using the Backup wizard.

  15. Recovery • Recovery is a method provided by SQL Server 2000 to restore the database that you backed up. • You can recover your data from any of the following types of failures: • Permanent loss of servers • Media failures • User errors

  16. Recovery (cont) • The following recovery models are available in SQL Server 2000: • Simple recovery • Full recovery • Bulk-logged

  17. Restoration • SQL Server provides the following options to restore a database: • Restore the database and its transaction log. • Restore from a full database backup to a differential backup. • Restore from a file group backup.

  18. Class Activity • What is achieved by the following T-SQL statement? • RESTORE DATABASE SALES FROM SALES_BACKUPRESTORE LOG saleslog FROM saleslog_backup WITH RECOVERY

  19. Restoring and Rebuilding the Master Database • The master database stores various types of configuration information about SQL Server and all the user-defined databases. • SQL Server provides a utility called rebuildm to rebuild the master database. • You cannot rebuild the master database if you do not have its backup.

  20. Activity • List the steps to rebuild and restore the master database in case of a failure.

  21. Distributed DBMS Architecture • In a distributed DBMS environment, multiple copies of a database are maintained across geographical regions. Data is generally stored in a region or department where it is needed the most.

  22. Database Replication • Database replication is the process of making the copies of a database available to different database users spanning across different locations. Data is replicated for: • Data sharing • Reduction in network traffic • Database backup

  23. Database Replication (cont.) • Different database replication models are used for making replicas of the main database. These models are: • Snapshot • Transactional • Merge

  24. Snapshot Database Replication Model • In the snapshot database replication model, the replica of the main database consists of an exact copy of the data and database objects present in the central database at any point in time.

  25. Snapshot

  26. Transactional Database Replication Model • The transactional replication model is used in organizations where data needs to be replicated as soon as transactions take place or as data gets modified in the central database.

  27. Transactional……….Changes only

  28. Merge Database Replication Model • The merge database replication model is used by organizations in which local users can modify the local database copies without simultaneously updating the central database.

  29. Continuous Merges may be inefficient

  30. Summary • Creating a Backup and Managing a restore with Transact SQL and Enterprise Manager is a key skill • Database restoration is a key procedure in case of failure. A business cannot afford to lose their data • There are several options for backing up and recovering databases. • Replication is the maintenance of data at multiple sites. There are several methods to replicate data.

  31. Summary • Did you understand the key points from the Lesson? • Do you have any questions?

More Related