It390 business database administration unit 5 backup and restoring tasks
This presentation is the property of its rightful owner.
Sponsored Links
1 / 32

IT390 Business Database Administration Unit 5 : Backup and Restoring Tasks PowerPoint PPT Presentation


  • 49 Views
  • Uploaded on
  • Presentation posted in: General

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.

Download Presentation

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


It390 business database administration unit 5 backup and restoring tasks

IT390 Business Database AdministrationUnit 5 :Backup and Restoring Tasks


Objectives

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.


Sql server backup

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


Database recovery

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


Sql server recovery models

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


It390 business database administration unit 5 backup and restoring tasks

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?


It390 business database administration unit 5 backup and restoring tasks

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


It390 business database administration unit 5 backup and restoring tasks

Class Activity

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


It390 business database administration unit 5 backup and restoring tasks

Performing Backups

  • In SQL Server 2000, you can perform backups using:

    • Enterprise Manager

    • T-SQL

    • Backup Wizard


It390 business database administration unit 5 backup and restoring tasks

Class Activity

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


It390 business database administration unit 5 backup and restoring tasks

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


It390 business database administration unit 5 backup and restoring tasks

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


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Class Activity (cont)

  • List the steps to perform a backup using the Backup wizard.


It390 business database administration unit 5 backup and restoring tasks

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


It390 business database administration unit 5 backup and restoring tasks

Recovery (cont)

  • The following recovery models are available in SQL Server 2000:

    • Simple recovery

    • Full recovery

    • Bulk-logged


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Class Activity

  • What is achieved by the following T-SQL statement?

    • RESTORE DATABASE SALES FROM SALES_BACKUPRESTORE LOG saleslog FROM saleslog_backup WITH RECOVERY


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Activity

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


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

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


It390 business database administration unit 5 backup and restoring tasks

Database Replication (cont.)

  • Different database replication models are used for making replicas of the main database. These models are:

    • Snapshot

    • Transactional

    • Merge


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Snapshot


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Transactional……….Changes only


It390 business database administration unit 5 backup and restoring tasks

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.


It390 business database administration unit 5 backup and restoring tasks

Continuous Merges may be inefficient


Summary

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.


It390 business database administration unit 5 backup and restoring tasks

Summary

  • Did you understand the key points from the Lesson?

  • Do you have any questions?


  • Login