Restoring Microsoft SQL Server 7 Master Databases

Similar documents
How to restore a Microsoft SQL Server Master Database with Backup Exec for Windows Servers (Automate Master Database Restore)

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

Install SQL Server 2014 Express Edition

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

Upgrade Guide BES12. Version 12.1

VMware vcenter Configuration Manager Backup and Disaster Recovery Guide vcenter Configuration Manager 5.7

High Availability for VMware GSX Server

Features - Microsoft Data Protection Manager

USING FILERELICATIONPRO TO REPLICATE SQL SERVER

SQL Server Setup Guide for BusinessObjects Planning

High Availability for Microsoft SQL Server 7.0 Using Double-Take

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

How to Configure Double-Take on Microsoft Exchange Server

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

Video Administration Backup and Restore Procedures

Installation Guide for Workstations

High Availability for Microsoft SQL Server Using Double-Take 4.x

ESET REMOTE ADMINISTRATOR. Migration guide

High Availability for Exchange Server 5.5 Using Double-Take

Moving the TRITON Reporting Databases

vcenter Configuration Manager Backup and Disaster Recovery Guide VCM 5.3

VMware vcenter Configuration Manager Backup and Disaster Recovery Guide vcenter Configuration Manager 5.4.1

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Server & Workstation Installation of Client Profiles for Windows

SQL 2014 Configuration Guide

Cloud Attached Storage

How to Restore a Windows System to Bare Metal

ilaw Installation Procedure

QUANTIFY INSTALLATION GUIDE

Operating System Installation Guide

Recovering the master Database

MGC WebCommander Web Server Manager

Backup Assistant. User Guide. NEC NEC Unified Solutions, Inc. March 2008 NDA-30282, Revision 6

High Availability for Internet Information Server Using Double-Take 4.x

Support Document: Microsoft SQL Server - LiveVault 7.6X

Database Maintenance Guide

Microsoft SQL Server Staging

CA ARCserve Backup for Windows

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

Moving the Web Security Log Database

Metalogix SharePoint Backup. Advanced Installation Guide. Publication Date: August 24, 2015

WHITE PAPER: ENTERPRISE SOLUTIONS. Symantec Backup Exec Continuous Protection Server Continuous Protection for Microsoft SQL Server Databases

SQL Server Protection

BrightStor ARCserve Backup for Windows

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

ilaw Server Migration Guide

Installation Instruction STATISTICA Enterprise Server

VirtualCenter Database Maintenance VirtualCenter 2.0.x and Microsoft SQL Server

Application Note 116: Gauntlet System High Availability Using Replication

SOS Suite Installation Guide

F9 Integration Manager

Moving Components of an Amicus Premium Installation

NovaBACKUP. User Manual. NovaStor / November 2011

DOCUMENTATION MICROSOFT SQL BACKUP & RESTORE OPERATIONS

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

WhatsUp Gold v16.0 Database Migration and Management Guide Learn how to migrate a WhatsUp Gold database from Microsoft SQL Server 2005 Express

Chancery SMS Database Split

3 Setting up Databases on a Microsoft SQL 7.0 Server

This article Includes:

Best Practices for Backup of Microsoft SQL 2000 Databases with Unitrends Backup Professional

Migrating MSDE to Microsoft SQL 2008 R2 Express

Issue Tracking Anywhere Installation Guide

Backup and Recovery. What Backup, Recovery, and Disaster Recovery Mean to Your SQL Anywhere Databases

MGC WebCommander Web Server Manager

How To Install Database Oasis On A Computer Or Computer (For Free)

Backup and Restore with 3 rd Party Applications

Administration Guide - Documentum idataagent (DB2)

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

Best Practices for Disaster Recovery with Symantec Endpoint Protection

SQL Server 2005 Advanced settings

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

SQL Backup and Restore using CDP

Administration GUIDE. SharePoint Server idataagent. Published On: 11/19/2013 V10 Service Pack 4A Page 1 of 201

Installation Instruction STATISTICA Enterprise Small Business

Database Migration and Management Guide v15.0

CA ARCserve Backup for Windows

Introduction and Overview

FAS Asset Accounting FAS CIP Accounting FAS Asset Inventory SQL Server Installation & Administration Guide Version

User Guide - Exchange Public Folder idataagent

Microsoft SQL Server Installation Guide

Secure Perfect RAID Recovery Instructions

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

WorldShip PRE-INSTALLATION INSTRUCTIONS: Step. Window (if available) Upgrade on a Single or Workgroup Workstation

Notes Transfer instructions INTRODUCTION More information

Preparing a SQL Server for EmpowerID installation

HPOM 8.1 High Availability Utilizing Microsoft SQL Server Log Shipping

Administration GUIDE. Exchange Database idataagent. Published On: 11/19/2013 V10 Service Pack 4A Page 1 of 233

Back Up and Restore. Section 11. Introduction. Backup Procedures

Microsoft SQL Server Installation Guide

Symantec Backup Exec System Recovery Exchange Retrieve Option User's Guide

Enterprise Manager. Version 6.2. Installation Guide

Obtaining a Memory Dump on Windows Servers

NetVanta Unified Communications Server Backup and Restore Procedures

Transcription:

Restoring Microsoft SQL Server 7 Master Databases A damaged master database is evident by the failure of the SQL Server to start, by segmentation faults or input/output errors or by a report from DBCC. An example of an error might be damage caused by media failure in the area in which master database is stored. The procedure used to recover a damaged master database is different from the procedure used to recover user databases. If the master database becomes unusable, it must be restored from a previous dump. All changes made to the master database after the last dump are lost when the dump is reloaded and therefore must be reapplied. It is strongly recommended that the master database be backed up each time it is changed. This is best accomplished by prohibiting the creation of user-defined objects in the master database and by being aware of the statements and system procedures, and the equivalent actions in SQL Enterprise Manager, that modify it. The most common statements and system procedures that modify master are: DISK INIT CREATE DATABASE ALTER DATABASE DISK MIRROR DISK UNMIRROR DISK REMIRROR sp_dropremotelogin sp_addumpdevice sp_dropdevice sp_addlogin sp_droplogin sp_addserver sp_dropserver Restoring Microsoft SQL Server 7 Master Databases 1 / 6

sp_addremotelogin If a user database is created, expanded, or shrunk after the most recent dump (backup) of the master database and if it becomes necessary to reload the master database, then that user database and all data in it will be lost and must be restored from backup. Because of this, always dump (back up) the master database after creating, expanding, or shrinking user databases. You must rebuild using the same character set and sort order as the master database dump that will be reloaded. Complete the following steps to recover a damaged master database: Step 1. Rebuild Master Database 1. In Windows Explorer, go to Start > Programs > Microsoft SQL Server, and then click SQL Setup, or, from the distribution media, navigate to the directory containing the software compatible with your hardware platform s processor architecture, and run SETUP.EXE. Follow the on-screen instructions until the Options window displays. 3. Select Rebuild Master Database, and then click Continue. A confirmation window displays. 4. Click Resume ; the Rebuild Options window displays. 5. To specify the character set, click Sets and make any necessary changes in the Select Character Set window; skip this step if you are using the default character set (ISO 8859-1). You must use the same character set and sort order previously used for this master database. 6. To specify the sort order, click Orders and make any necessary changes in the Select Sort Order window; skip this step if you are using the default sort order (dictionary order, case-insensitive). 7. In the Rebuild Options window, click Continue. The SQL Server Installation Path window displays. 8. If not correctly displayed in the SQL Server Installation Path window, enter the location of the existing SQL Server installation, and then click Continue. 9. The Rebuild Master Database window displays. If it is not correctly displayed in the Rebuild Master Database window, enter the location, name, and device of the existing MASTER device, and then click Continue. 10. The setup program rebuilds the master database. When rebuilding is complete and the completion window displays, click Exit. Restoring Microsoft SQL Server 7 Master Databases 2 / 6

The files MASTER.DA@ and MASTER.AL@ are stored in the \MSSQL\INSTALL directory. When rebuilding the master database (or when installing SQL Server), one of these two files is used by the setup program. When the default sort order and character set are selected, MASTER.DA@ is expanded and copied onto the server, replacing MASTER.DAT. When an alternate character set and/or sort order is selected, MASTER.AL@ is expanded, copied onto the server, and several SQL scripts are run. Step Restart Microsoft SQL Server in Single-User Mode Before you can restore the master database, you must start Microsoft SQL Server in single-user mode. 1. Go to the SQL Server Manage, right-click the SQL server instance, and click Properties ; the SQL Server Properties window displays. In the General tab, open the Startup Parameters window, and in the Parameter field, type: m 3. Click Add, and then click OK. Click OK to close the SQL Server Properties window. 4. Right-click the SQL server instance, and click Stop, and then right-click the SQL server instance, and click Start to restart the instance. You may find it convenient to start the SQL Server in single-user mode using the command line program, SQLSERVER.EXE, with option "/m". This procedure only works, however, if the SQL Server is configured to start using the current interactive user s account. Step 3. Restore Master Database from Most Recent Backup 1. Create a restore job and select the most recent backup version of the master database. Run the restore job. This may take some time, typically 10 to 15 minutes, depending on the size of the master database. Restore only the master database while in single user mode. Do not restore any other databases. Step 4. Apply Changes to Master Database 1. Go to the SQL Server Enterprise Manger and right-click the SQL server instance. Select Properties to open the SQL Server Properties window. Restoring Microsoft SQL Server 7 Master Databases 3 / 6

Under the General tab in the SQL Server Properties window, open the Startup Parameters window and remove " m" from the list of existing parameters. 3. Right-click the SQL server instance, and click Stop, and then right-click the SQL server instance and click Start to restart the instance. If there have been no changes to the master database since the last dump, then proceed to Step 5. Drop Invalid Databases and Database Devices. 4. If login IDs or devices have been added to or dropped from the master database since the last backup, those changes must be reapplied. Restart the server and reapply the changes manually or from saved batch files. 5. If databases have been created, expanded or shrunk since the last dump of master, those databases must be dropped and then restored. 6. If you have made many changes and have no recent dump, it is possible that by reloading master in some cases you can regain data in user databases that has been lost. This technique requires the use of DISK REINIT and DISK REFIT and can involve manual modifications to the master database tables. Use DISK REINIT to recreate rows in sysdevices for all database devices that have been added after the most recent dump. DISK REINIT updates sysdevices just as DISK INIT does, but it does not format the physical disk file, so existing data is preserved. Use DISK REFIT to recreate rows in sysusages and sysdatabases for all CREATE and ALTER DATABASE statements that were performed after the most recent dump. DISK REFIT scans the physical file associated with each space that is allocated to databases. It also adds the corresponding sysdatabases entries. Some of the information is not reconstructed perfectly. For example, the original virtual device number is not assigned, because it is not known. Instead, virtual device numbers are assigned sequentially. The database owner is not extracted while scanning the physical files; ownership is set to the system administrator. It is also not possible to determine how many sysusages entries originally existed. DISK REFIT inserts a separate entry for each different segment type. When this is done, correct the entries made by DISK REFIT to sysdatabases and sysusages (if desired) and also add to syslogins any login IDs that were not retained. Then shut down and restart SQL Server. Capturing the latest changes made to a database by using DISK REFIT and DISK REINIT to recreate the master database is possible, but it is preferable to keep the master database current by dumping it after creating or altering databases. Using DISK REFIT and DISK REINIT is a complicated process that can result in data loss because many of the changes made to a database often must be reconstructed manually in the master database. If you feel this technique is necessary, contact your primary support provider before beginning the recovery process. Restoring Microsoft SQL Server 7 Master Databases 4 / 6

Step 5. Drop Invalid Databases and Database Devices Use the SQL Enterprise manager to drop any invalid database devices and databases from the newly restored master database. If you are recovering from a disaster where you have lost a database device file, the master database you have just restored still contains a reference to it. Yosemite Server Backup will not be able to restore any databases contained on the database device until the file is restored or the database device is dropped. If the database device is dropped, Yosemite Server Backup will automatically recreate the device when a database contained on the device is restored. Step 6. Restore msdb Database When restoring the msdb database, keep the following considerations in mind: The msdb database supports SQL Executive and provides a storage area for scheduling information. The schedules that you implement using SQL Enterprise Manager are maintained in the msdb database. This includes such things as the tasks that you schedule from the Task Scheduling window, the automatic backups you schedule from the Database Backup/Restore window and all replication tasks, which are automatically created by the system if the server is configured as a replication distributor. During installation of a server, the setup program automatically creates two devices (of 2MB and 1MB) on the same disk drive as the master database and then places the msdb database on the 2MB device (MSDBDATA) and its transaction log on the 1MB device (MSDBLOG). Scheduling information is then stored in this database. During a rebuild of the master database, the setup program drops and recreates the msdb database, which results in a loss of all scheduling information. Restoring Microsoft SQL Server 7 Master Databases 5 / 6

Restoring Microsoft SQL Server 7 Master Databases 6 / 6