Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft SQL Server Administration for SAP Database Backup and Restore.

Similar presentations


Presentation on theme: "Microsoft SQL Server Administration for SAP Database Backup and Restore."— Presentation transcript:

1 Microsoft SQL Server Administration for SAP Database Backup and Restore

2 2 Overview

3 3 Importance of Backup  User Errors  Physical Errors  External Factors  Logical Errors

4 4 Recovery Models  Full  No work loss  Supports recovery to any point-in-time  Simple  Simplest backup/restore strategy  Less log space required  Greatest work loss possible  Bulk_Logged  High performance bulk operations  Minimal log space for bulk operations  Some work loss exposure

5 5 Backup  Full  Differential  Log  File  File Group  NT Backup

6 6 Full Backup Copy all used data pages to the backup media Data AndreVasserHil Frenzen X0X1X2X3X4X5X6X7 KojakMagnumDerrickMarple X8X9X10X11X12X13X14X15 LandisWolfWangKerberKaniaThomasMerdes X16X17X18X19X20X21X22X23 MozartBachStraussWagnerBeeth. X24X25X26X27X28X29X30X31 11 Copy all used log pages to the backup media Set the timestamp of the backup to the time when the backup has finished Transaction Log beginupdatebegininsertcommitchkpinsertrollback LSN0LSN1LSN2LSN3LSN4LSN5LSN6LSN7 delete LSN8LSN9LSN10LSN11LSN12LSN13LSN14LSN15 LSN16LSN17LSN18LSN19LSN20LSN21LSN22LSN23 LSN24LSN25LSN26LSN27LSN28LSN29LSN30LSN31 22 33

7 7 Log Backup Copy all used log pages to the backup media begin1updatebegin2insertcommit2chkpinsertbegin3 LSN0LSN1LSN2LSN3LSN4LSN5LSN6LSN7 deletedumpcommit1chkpinsertinsertdeletedelete LSN8LSN9LSN10LSN11LSN12LSN13LSN14LSN15 insert LSN16LSN17LSN18LSN19LSN20LSN21LSN22LSN23 LSN24LSN25LSN26LSN27LSN28LSN29LSN30LSN31 11 Transaction Log Truncate the inactive portion of the transaction log begin1updatebegin2insertcommit2chkpinsertbegin3 LSN0LSN1LSN2LSN3LSN4LSN5LSN6LSN7 deletedumpcommit1chkpinsertinsertdeletedelete LSN8LSN9LSN10LSN11LSN12LSN13LSN14LSN15 insert LSN16LSN17LSN18LSN19LSN20LSN21LSN22LSN23 LSN24LSN25LSN26LSN27LSN28LSN29LSN30LSN31 22 Transaction Log

8 8 Differential Backup AndreVasserSchumi Frenzen X0X1X2X3X4X5X6X7 KojakRexDerrickMarple X8X9X10X11X12X13X14X15 DilgWolfWangKerberKaniaThomas X16X17X18X19X20X21X22X23 MozartBachStrauss X24X25X26X27X28X29X30X31 Data Copy all modified records since the last full database backup to the backup media 11 Copy all used log pages to the backup media Set the timestamp of the backup to the time when the backup has finished Transaction Log beginupdatebegininsertcommitchkpinsertrollback LSN0LSN1LSN2LSN3LSN4LSN5LSN6LSN7 delete LSN8LSN9LSN10LSN11LSN12LSN13LSN14LSN15 LSN16LSN17LSN18LSN19LSN20LSN21LSN22LSN23 LSN24LSN25LSN26LSN27LSN28LSN29LSN30LSN31 22 33

9 9 File Backup... DATA1 DATA2 DATA3 DATAn Copy one or more database files to the backup media 11

10 10 Filegroup Backup PRIMARY... DATA1 DATA2 DATA3 DATAn Copy one filegroup to the backup media 11

11 11 NT Backup DirectoryFiles X:\ DATA1Primary data file X:\ DATA2Secondary data file X:\ DATA3Secondary data file Y:\ LOG1Transaction log file Z:\Tempdbdata and log files of the tempdb C:\Mssql7\BackupDefault Backup directory BinnMS SQL Server executables BooksOnline documentation DataSystem and sample database files HtmlEnterprise Manager Html Files InstallInstallation scripts and logs JobTemporary job output files LogErrorlogs and Joblogs RepldataWorking directory for replication tasks UpgradeFiles used for upgrade (6.5 to 7.0) D:\usr\sap\ R/3 executables transTransport directory E:\WINNTNT System directory Copy all R/3 and SQL Server files to the backup media11 Create a document containing the file structure22 File System Structure

12 12 How to Perform a Backup Query Analyzer ?.. Mon Tue WedThuFriSat TueWedThuFriSatSun MonTueWedThuFriSatSun Mon Sun Tue MonTueWedThuFriSatSun regular Tue SQL Enterprise Manager unplanned CCMS DBA Calendar (DB13)

13 13 Backup Requirements and Costs Duration of a backup Time window for a recovery High availability Training Administrative workload Acquisition costs

14 14 Backup strategies  Single DB and Transaction Log Backups  Parallel Tape Support  Two-Step Disk Backup  Supplementary Differential Backups  Hot-Standby Server

15 15 Restore Procedure Availability ONLINE Target Actual OFFLINE Replace hardware and set up system Problem analysis Apply transaction logs Automatic recovery Time Restore database

16 16 Data Volume Crash Back up recent transaction log Replace RAID system Restore R/3 database Restore transaction logs Check restore operation Procedure and escalation plan PRIMARY DATA3 DATA2 DATA1

17 17 Log Volume Crash Replace RAID system Restore R/3 database Restore transaction logs Check restore operation Procedure and escalation plan LOG1

18 18 Executable Volume Crash Reload lost files from latest NT Backup Reboot Primary NT Restore msdb (and master) Database Check Restore Operation Procedure and Escalation Plan Replace disks and install auxiliary NT msdb master Directory C:\Tempdb C:\Mssql7\ C:\usr\sap\ C:\WINNT

19 19 Summary RAID 1 crash : Log files lost suspect Replace crashed disk(s), synchronize RAID SQL Restore of database and transaction logs Automatic recovery OKSome data lost!OK NT Restore of EXEs; not log file(s)! RAID 5 crash: Data files lost suspect System crash: Data + EXEs lost SQL Server down Exe disk crash: EXEs lost SQL Server down One disk crash Shut down SQL Server SQL Restore of msdb (and master) Back up log with no_truncate

20 20 System Crash Reload executables from latest NT Backup Reboot primary NT Restore msdb (and master) database Check restore operation Procedure and escalation plan Replace hardware and install auxiliary NT msdb master Directory C:\Tempdb C:\Mssql7\ C:\usr\sap\ C:\WINNT Restore R/3 database Restore transaction logs

21 21 Backup and restore  Log marks  RESTORE options  RECOVERY, NORECOVERY, STANDBY  Backup password  Snapshot Backup  Database Copy Wizard  New Backup modes

22 22 Hot standby  Scheduled movement of T-logs  Pulled to secondary machine(s)  Copies all Logged Operations  DML + schema, permissions, roles,...  Setup & managed via Maintenance ‘Plan’  Interactive remote monitoring  Used for creating ‘warm backup’ DBs  Roll reversal (swap source destination)

23 23 DB12

24 24 Backup History

25 25 SQL Agent Settings

26 26 Backup Device

27 27 Jobs

28 28 Restore information

29 29 DB13 Calendar

30 30 DB13 Scheduling Backup

31 31 DB13 Scheduling Backup

32 32 DB13 Scheduling Backup

33 33 DB13 Scheduling Backup

34 34 DB13 Calendar

35 35 Failed Job

36 36 Failed Job

37 37 Jobs in SQL Server

38 38 Backup from SQL Enterprise Manager

39 39 Backup from SQL Enterprise Manager

40 40 Backup from SQL Enterprise Manager

41 41 Backup from SQL Enterprise Manager

42 42 Backup from SQL Enterprise Manager

43 43 Restore from SQL Enterprise Manager

44 44 Restore from SQL Enterprise Manager

45 45 Failed Job in SQL Server

46 46 Details of the failed job

47 47 Details of the failed job

48 48 Job Information

49 49 Job Information

50 50 Job Schedule

51 51 Notification

52 52 Backup Device

53 53 Backup – media set name

54 54 Restore from Device

55 55 Point in time restore

56 56 Lab  Create a Backup Device  Backup using CCMS  Backup using SQL Enterprise Manager  Backup from Query Analyzer  Check the media naming convention by SAP  Setup a stand by database and switch to the standby database

57 57 Lab  Restore using SQL Enterprise Manager  Restore from Query Analyzer(1 full backup followed by 2 trans log restore)  Setup log shipping and switch to the backup server  Perform point-in-time recovery

58 58 Summary  Write module summary


Download ppt "Microsoft SQL Server Administration for SAP Database Backup and Restore."

Similar presentations


Ads by Google