Quantcast
Channel: the occasional blog » Nexus
Viewing all articles
Browse latest Browse all 2

Refreshing Test Dev SQL Environments using NetApp Technologies

$
0
0

The use of NetApp technologies such as FlexVol, FlexClone, SnapMirror and SnapManager for SQL (SMSQL), SnapManager for Exchange (SME) and SnapManager for Virtual Infrastructures (SMVI) are well known and documented. The references section at the end of this post lists links to technical reports and information on NetApp technologies applicable to Database environments.

In this post, we’ll cover the details of a perl script that refreshes a secondary SQL Database environment with data from another (primary) SQL Server.

Problem
NetApp solutions for SQL Server data management include Flexible Volumes, FlexClones, SnapMirror, SnapDrive and SnapManager for SQL. (Note: Only the last one is specific to SMSQL). Refreshing test/dev/reporting servers with live production data can easily be done using these technologies and can be achieved in multiple ways, depending on the frequency of updates and the extent of manual work desired.

While it is easy to refresh the secondary servers using SnapDrive GUI just by using a few clicks, this post addresses the problem (or desire) where an automated, frequent and a “push-button” method is needed. The application environment for which this script applies is depicted below.

In this environment, the production environment consist of a production SQL server with its storage on a NetApp SAN system (either using iSCSI or Fibre Channel). The production SQL is being backed up using SnapManager for SQL (SMSQL) to the NetApp storage environment and is subsequently being replicated over to a secondary site using NetApp SnapMirror. The secondary site is being used for not only Disaster Recovery (DR) purposes but also to conduct testing, development and user acceptance & testing by deploying backup/test SQL servers. This maximizes the resource utilization, efficiency and produces increased ROI.

Solution Approach
Whether using the script or using the GUI, the workflow required to refresh the secondary SQL server with data from the primary site is as follows

  1. SMSQL takes SQL consistent database backup on the primary SQL Server
  2. SnapMirror Replication performs block level replication of the data to the secondary site
  3. On the secondary site, the SQL databases are detached and the existing LUNs are disconnected
  4. FlexClone technology is used to create instantaneous, read-write copies of the replication volume on the NetApp Storage System
  5. SnapDrive on the secondary server is used to connect to the LUNs in the FlexClone volumes and mount them to the appropriate mount points (drives)
  6. Finally, the SQL Databases are re-attached

The GUI way
SnapDrive provides a very feature rich interface that more or less automates a majority of the tasks that need to be undertaken on the secondary server. If the SQL database needs to be refreshed only occasionally, then simply use SnapDrive to connect to the LUNs on the SnapMirror Destination Snapshots. SnapDrive will handle the creation, mounting and onlining of the LUNs. There.

The CLI way
If a more frequent and/or scheduled refreshes are needed, then this script may be of use to you.

With the use of NetApp provided SDK Core API library bindings, CLI features of the software components and perl, the refresh process can be scripted from end to end. This script can then be executed manually to refresh the secondary SQL servers on demand or can also be scheduled using Windows Task Scheduler.

For the impatient, download the entire script.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images