Red paper Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using

advertisement
Redpaper
Alex Osuna
Bert Jonker
Richard Waal
Henk Vonk
Peter Beijer
Disaster Recovery Procedures for
Microsoft SQL 2000 and 2005 using
N series
Introduction
This IBM® Redpaper gives a example of procedures to restore the Microsoft®
SQL 2000 and 2005 using SnapManager®.There are options discussed that
depend on the type of disaster, the type of data recovery, and the type of system
on which the disaster applies.
Our environment
The environment used in creating this paper is:
򐂰 SQL 2005
– 2x IBM Xseries 3850 in a SQL 2005 cluster
– Broadcom onboard for cluster heartbeat
– 2x Intel® PCI dual port 1 GB Ethernet adapter.
© Copyright IBM Corp. 2008. All rights reserved.
ibm.com/redbooks
1
One port of each dual port adapter set up, each with its own IP address to
the storage VLAN.
One port of each dual port adapter set up as member in a smart load
balancing team. One active and 11 stanza adapters.
– MS Windows® 2003 Enterprise R2 64 bit with SP2
– MS SQL 2005 Enterprise build 9.00.3042.00
– SnapManager for SQL V2.1R1P2 (build 2.1.0.644)
– Snapdrive 5.0
– Microsoft iSCSI initiator 2.05 with MPIO
򐂰 SQL 2005
– 2x IBM Xseries 3850 in a SQL 2000 cluster
– Broadcom onboard for cluster heartbeat
– 2x Intel PCI dual port 1 GB Ethernet adapter
One port of each dual port adapter set up, each with its own IP address to
the storage VLAN
One port of each dual port adapter set up as member in a smart load
balancing team. One active an d11 standby adapters.
– MS Windows 2003 Enterprise R2 32 bit with SP2
– MS SQL 2000 Enterprise with SP4
– SnapManager for SQL V2.1R1P2 (build 2.1.0.644)
– Snapdrive 5.0
– Microsoft iSCSI initiator 2.05 with MPIO
– Nseries 2x n5200 A20
– Ontap 7.2.3
Recovering a snapshot with SnapManager for SQL
The process to restore a SQL database requires DBA skills and knowledge of
the SnapManager product. In the SnapManager Administration guide several
restore options are described, followed by a step-by-step instruction. This paper
does not describe those steps.
2
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
Restoring a snapshot with SnapManager
In this section we discuss the steps taken in a test scenario as executed during a
disaster recovery test. Log on to the SQL server (in this case SQL2000
PDC1DB005) with SA_snapdrive and start Enterprise Manager for SQL.
1. Select properties of the database that you want to restore (Figure 1).
Figure 1 Database properties
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
3
2. Set the database in single user mode (Figure 2).
Figure 2 Single user mode
3. Close Enterprise Manager.
4
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
4. Stop the (remote) services that connect to the database. Use the process
information of SQL Enterprise Manager to find active processes (Figure 3).
Figure 3 Find active processes
5. Start SnapManager for SQL. Depending on what database you must restore
(and the sort of backups taken for that database), the procedure may differ.
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
5
6. Connect to the SQL instance on which you want to perform a restore
(Figure 4).
Figure 4 Connect to SQL Server®
6
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
Figure 5 Connecting to SQL server
7. The backups should be verified (this is part of the full backup run at 2 a.m.). If
you receive a message that the backup is not verified, you can start a
separate verification job, run it as a part of the restore job, or restore an
unverified database. See the SnapManager Administration guide for more
information.
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
7
8. Open the Restore tab and check the verification server. This should read
pdc2db005\pdc2db005 on the SQL 2000 cluster and pdc2db002\pdc2db002
on the SQL 2005 cluster.
Figure 6 Checking the verification server
Now open the database to be restored. There are two methods of doing this
using step 9 or step 10 depending on the kind of backup taken.
8
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
9. At this point you can click the database, as shown in Figure 7, and proceed to
step 11.
Figure 7 Selecting the databases
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
9
10.Or you can double-click the disks that are holding the databases, as shown in
Figure 8. In our case we selected all the databases on that disks and scrolled
through the window to select the required databases.
Figure 8 Selecting the disks that hold the database
10
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
11.Select the backup that you want to restore by double-clicking the full backup
that you want to be restored (Figure 9 and Figure 10).
Figure 9 Selecting backup to be restored
Figure 10 After selection
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
11
12.In right part of the window shown in Figure 11 you can see which logs you
want to be restored with the full backup. Keep in mind that if you restore all the
logs you will go to the last status known (Figure 11). It may be that you want to
restore to the point in time of the last backup and not want the last change of
the day restored. In that case deselect all the logs (Figure 13 on page 13).
Figure 11 Logs to be restored
12
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
Figure 12 Restoring without logs
13.When the restore completes do not forget to remove the single user access to
the database.
The team that wrote this IBM Redpaper
This paper was produced by a team of specialists from around the world working
at the International Technical Support Organization, Austin Center.
Alex Osuna is a Project Leader at the International Technical Support
Organization, Tucson Center. He writes extensively and teaches IBM classes
worldwide on all areas of storage. Before joining the ITSO three years ago, Alex
worked in the field as a Tivoli® Principal Systems Engineer. Alex has over 30
years of experience in the IT industry and holds certifications from IBM, RedHat,
and Microsoft.
Bert Jonker is a Senior IT Specialist in the Netherlands. He has more than 10
years of experience as a Technical Teamlead on large accounts and complex
projects. His areas of expertise include a range of Microsoft Windows products in
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
13
combination with several storage solutions. He has written extensively on
migration scenarios in large environments.
Richard Waal is an IT Specialist in the Netherlands. He has six years of
experience as an Engineer working on both national and international large
infrastructure projects for different customers. His areas of expertise focus on
Microsoft technology and scripting.
Henk Vonk is an IT Specialist within IBM Global Technology Services in the
Netherlands. He has worked at IBM for 10 years and has several years of
experience as a zSeries® Specialist. Since 2007 his area of experience has also
been Nseries storage.
Peter Beijer is a IT Specialist in the Netherlands. He has more than five years of
experience on large accounts as Technical Engineer. His area of expertise is
Microsoft products.
14
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM application
programming interfaces.
© Copyright International Business Machines Corporation 2008. All rights reserved.
Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by
GSA ADP Schedule Contract with IBM Corp.
15
This document REDP-4427-00 was created or updated on June 16, 2008.
®
Send us your comments in one of the following ways:
򐂰 Use the online Contact us review Redbooks form found at:
ibm.com/redbooks
򐂰 Send your comments in an email to:
redbook@us.ibm.com
򐂰 Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099, 2455 South Road
Poughkeepsie, NY 12601-5400 U.S.A.
Redpaper ™
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corporation in the United States, other countries, or both. These and other
IBM trademarked terms are marked on their first occurrence in this information with the
appropriate symbol (® or ™), indicating US registered or common law trademarks owned by IBM
at the time this information was published. Such trademarks may also be registered or common
law trademarks in other countries. A current list of IBM trademarks is available on the Web at
http://www.ibm.com/legal/copytrade.shtml
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
IBM®
Redbooks (logo)
®
Tivoli®
zSeries®
The following terms are trademarks of other companies:
SnapManager, and the NetApp logo are trademarks or registered trademarks of NetApp, Inc. in the U.S. and
other countries.
Microsoft, SQL Server, Windows, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
"Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation."
Intel, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel
Corporation or its subsidiaries in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
16
Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series
Download