41
Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System Application Integration Engineering, Sun Microsystems, Inc. June 2009 This article was published by BigAdmin at: http://www.sun.com/bigadmin/features/articles/7000_ms_sql_server.jsp To keep track of the latest content published by BigAdmin, subscribe to the BigAdmin newsletter: http://www.sun.com/bigadmin/newsletter/ .

Deployment Guide for Microsoft SQL Server 2005 Database on

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Deployment Guide for Microsoft SQL Server 2005 Database on

Deployment Guide for Microsoft SQL Server 2005 Database on Sun™ Storage 7000 Unified Storage System

Application Integration Engineering,

Sun Microsystems, Inc.

June 2009

This article was published by BigAdmin at: http://www.sun.com/bigadmin/features/articles/7000_ms_sql_server.jspTo keep track of the latest content published by BigAdmin, subscribe to the BigAdmin newsletter: http://www.sun.com/bigadmin/newsletter/.

Page 2: Deployment Guide for Microsoft SQL Server 2005 Database on
Page 3: Deployment Guide for Microsoft SQL Server 2005 Database on

BigAdmin Portal for Sun System Administrators Sun Microsystems, Inc.

Copyright © 2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms. This distribution may include materials developed by third parties.

Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and in other countries, exclusively licensed through X/Open Company, Ltd. X/Open is a registered trademark of X/Open Company, Ltd.

AMD, Opteron, the AMD logo, the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices.

Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.

Sun, Sun Microsystems, the Sun logo, Sun BluePrints, Sun Fire, and SunSolve are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the United States and other countries.

This product is covered and controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Page 4: Deployment Guide for Microsoft SQL Server 2005 Database on

BigAdmin Portal for Sun System Administrators Sun Microsystems, Inc.

Table of Contents

Summary...............................................................................................................................................................1

Introduction..........................................................................................................................................................1

Audience...............................................................................................................................................................1

Methodology.........................................................................................................................................................2

Hardware and Software Components............................................................................................................2

Sun Storage 7000 Unified Storage System Administration: General Procedures.................................................2

Using a CIFS Share for a Microsoft SQL Server Database............................................................................................5

Creating a CIFS Share on the Sun Storage 7000 Unified Storage System............................................................5

Creating a Database on a CIFS Share............................................................................................................10

Using an iSCSI Volume for a Microsoft SQL Server Database.....................................................................................12

Creating an iSCSI LUN on the Sun Storage 7000 Unified Storage System.........................................................12

Configuring the Microsoft Windows 2003 Server...........................................................................................17

Considerations While Using Windows File Systems on iSCSI Targets...............................................................28

Creating a Database on an iSCSI Target........................................................................................................29

Glossary...............................................................................................................................................................34

Revision History...................................................................................................................................................35

For More Information...........................................................................................................................................36

Licensing Information...........................................................................................................................................37

Page 5: Deployment Guide for Microsoft SQL Server 2005 Database on

Summary Sun Microsystems, Inc.

Summary

This document describes the steps to create and prepare volumes on a Sun™ Storage 7000 Unified Storage System to be published

to a Microsoft Windows server using CIFS or iSCSI with Microsoft SQL Server 2005 databases.

Note: The Sun Storage 7000 Unified Storage System product family includes the 7110, 7210, 7310, and 7410 models; the procedures

here apply to all models.

Introduction

Microsoft SQL Server 2005 is RDBMS software that has found wide adoption in the industry, covering a broad range of applications

from OLTP type applications, such as ERP systems, to OLAP type data warehouses. It can be tightly integrated with Microsoft Active

Directory services. Microsoft SQL Server databases use a flexible file-based storage model to store table records, indexes, and logs.

Sun Storage 7000 Unified Storage System can provide storage resources that are published using the CIFS or the iSCSI protocol. Such

a shared volume, acting as a CIFS share or as an iSCSI target, respectively, can be used to hold SQL Server database files.

This paper describes using the Sun open storage system and a Microsoft Windows 2003 Server with Microsoft SQL Server 2005 to

enable the SQL Server to run a database on a file system that is based on a CIFS share or on an iSCSI target volume.

While an iSCSI target volume is interpreted as a "normal" hard disk by the Microsoft Windows OS that Microsoft SQL Server usually

addresses using a drive letter, a shared folder on a remote system must be addressed using its UNC path when Microsoft SQL Server

uses this storage resource for storing datafiles and logs of its databases. When using a CIFS share on a remote system, specified by a

UNC path, a Create Database statement will fail unless Microsoft SQL Server trace flag 1807 is set. Additional precautions and

recommendations for the use of network-attached storage for Microsoft SQL Server databases are given in the Microsoft Knowledge

Base article 304261 (http://support.microsoft.com/kb/304261).

Audience

This paper is intended for readers who have experience with the administration of:

● Microsoft Windows Server 2003

● Microsoft SQL Server 2005

1 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 6: Deployment Guide for Microsoft SQL Server 2005 Database on

Methodology Sun Microsystems, Inc.

Methodology

This section describes the hardware and software components that have been used for the procedures described in this paper.

Hardware and Software Components

Microsoft Windows 2003 Server

Server Hardware

Sun Fire™ X4200 server with:

● 2x AMD Opteron™ 252, 2.59 GHz processor

● 4.8 Gbyte RAM

Software

● Microsoft Windows Server 2003 Enterprise x64 Edition, Service Pack 1

● Microsoft SQL Server 2005 (64-bit)

● Microsoft iSCSI Software Initiator 2.07

All binaries of the OS and of Microsoft SQL Server 2005, as well as the "internal" databases of Microsoft SQL Server (master, msdb,

tempdb) reside on partitions built from internal disks of the Sun Fire X4200 server; only a user database resides on network-

attached storage.

Sun Storage 7000 Unified Storage System

Hardware Platform

Sun Storage 7110 Unified Storage System with:

● 2.4 Terabyte system

● 8 Gbyte RAM

Software

● Sun Storage 7000 Unified Storage System version 2009.Q2

Storage

● One ZFS storage pool with a capacity of 1.87 Tbyte was created from 12 mirrored disks.

Sun Storage 7000 Unified Storage System Administration: General ProceduresThis section describes features that are generally used when the Sun Storage 7000 Unified Storage System is configured and

managed using the web-based GUI. The GUI is accessible using https://<IP address of Sun Storage 7000>:215.

2 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 7: Deployment Guide for Microsoft SQL Server 2005 Database on

Methodology Sun Microsystems, Inc.

Creating Storage Resources: ProjectsFile systems on a Sun Storage 7000 Unified Storage System are created as part of a project. A project is the top-most level in a

hierarchy of storage objects that depend on each other: Project — File System — Snapshot — Clone. On the project level, settings

on three configuration pages are defined, which can be inherited by its child objects. For the volumes to be published using CIFS

and using iSCSI, separate projects have been created.

1. General Settings of a Project: On this page, quota, space reservation, a default mountpoint for project file systems, default

permissions for "user," "group," and "other," and default parameters for the creation of logical unit numbers (LUNs) are specified.

All settings except for the user permissions are the same for both projects. Figure 1 shows the settings for the CIFS project:

In contrast to the CIFS project settings, the default settings for user permissions in the Filesystem Creation Defaults section have

been kept for the iSCSI project:

● User = nobody

● Group = root

● Permissions: User = RWX; Group = - - - ; Other = - - -

2. Protocols: The protocol settings for both projects are the same. The default settings have been kept.

3 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 1. CIFS Share Project: General Settings

Page 8: Deployment Guide for Microsoft SQL Server 2005 Database on

Methodology Sun Microsystems, Inc.

3. Access: The default settings have been kept for both projects.

4 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 2. CIFS Share Project: Protocols — Default Settings

Page 9: Deployment Guide for Microsoft SQL Server 2005 Database on

Methodology Sun Microsystems, Inc.

Manipulating and Modifying File SystemsFor editing the configuration of file systems and snapshots and for deleting these objects in the administration GUI, icons are

provided in the GUI that become visible when the mouse pointer is placed in the line of the object, as Figure 4 shows.

Using a CIFS Share for a Microsoft SQL Server Database

This section describes the steps that need to be performed on the Sun Storage 7000 Unified Storage System when a storage

resource of a Sun Storage 7000 Unified Storage System is attached to a Windows server using the CIFS protocol to host Microsoft

SQL Server database files.

Creating a CIFS Share on the Sun Storage 7000 Unified Storage SystemThe CIFS protocol requires that users who map a CIFS share or who access data on such a share are authenticated either against

local account information or by passing the credentials to a central user management instance, such as LDAP or Active Directory. To

enable the Sun Storage 7000 Unified Storage System to authenticate a Windows user that is creating and modifying files on a CIFS

share, two requirements need to be met:

● The service account for the MSSQLSERVER service is defined in Active Directory.

● The Sun Storage 7000 Unified Storage System needs access to the user information in Active Directory for the verification

of the credentials of the Microsoft SQL Server service account. Therefore, the Sun Storage 7000 Unified Storage System

must be a member in the Active Directory domain. This is described in the section "Access Permissions."

5 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 3. CIFS Share Project: Access — Default Settings

Figure 4. Actions Associated With an Object

Page 10: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

Creating a File SystemA new file system is created using the Add New function in the Filesystems view of the Shares page.

A form is opened that allows you to supply the following parameters of the new file system.

6 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 5. CIFS Share Project: Creating a New File System

Figure 6. CIFS Share Project: Parameters For File System Creation

Page 11: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

The share mode and the name of the shared volume is configured in the property page of the volume that is obtained by clicking

the symbol in the line of the file system entry.

The name under which the CIFS share will be published is specified in the CIFS section of the Protocols page. Assigning a Resource

Name makes the volume accessible using CIFS.

7 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 7. CIFS Share Project: Result of File System Creation

Page 12: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

Access PermissionsThe service account of the Microsoft SQL Server installation, a user created in Active Directory, will have full control for the share.

Therefore, the Sun Storage 7000 Unified Storage System must be in Active Directory to enable the authentication of the credentials

of the SQL Server user account. This is accomplished in Configuration — Services — Active Directory.

8 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 8. CIFS Share Project: Protocols Page of File System

Page 13: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

Clicking Join Domain opens the following entry form:

When the Sun Storage 7000 Unified Storage System has been added to Active Directory, the permissions for the Active Directory user

account can be assigned on the file-system level by editing entries for users and groups on the Access page of the file system.

Explicit permissions have been defined for the Microsoft SQL Server service account by making an entry for a Named User.

9 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 9. Sun Storage 7000 Unified Storage System Configuration: Active Directory

Figure 10. Sun Storage 7000 Unified Storage System Configuration: Joining Active Directory Domain

Page 14: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

The Edit function, called by clicking the symbol, opens a new window with permissions and authorizations:

Creating a Database on a CIFS ShareIf a database will be created on the CIFS share, its UNC path must be supplied with the Resource Name specified in the Protocols

page of the file system (see Figure 8) as name of the share, and the trace flag 1807 must be set. A folder MSSQL_Data was created

beforehand on the CIFS share with the user of the Microsoft SQL Server service being the owner of this directory. The database was

created with the following statement.

10 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 11. CIFS Share Project: Access Page of File System

Figure 12. CIFS Share Project: Access Page of File System — Assignment of Permissions

Page 15: Deployment Guide for Microsoft SQL Server 2005 Database on

Using a CIFS Share for a Microsoft SQL Server Database Sun Microsystems, Inc.

DBCC TRACEON (1807)GO

CREATE DATABASE AmberRoad_TestON PRIMARY

(NAME = 'Primarydatafile', FILENAME = '\\isv-4200\mssql\MSSQL_Data\Datafile.mdf',SIZE = 1024 MB)

LOG ON (NAME = 'Primarylog',FILENAME = '\\isv-4200\mssql\MSSQL_Data\Logfile.ldf',SIZE = 1024 MB)

GO

DBCC TRACEOFF (1807)GO

The following rules apply:

● If the host name of the Sun Storage 7000 Unified Storage System will be used in the UNC path—as has been done in the

example—it must be verified that this host name can be resolved by the Windows server. Otherwise, the Sun Storage

7000 Unified Storage System's DNS name or IP address can be used.

● Windows path expressions are case-insensitive.

11 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 16: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

Using an iSCSI Volume for a Microsoft SQL Server Database

This section describes the steps that need to be performed on both the Sun Storage 7000 Unified Storage System and on a Microsoft

Windows 2003 Server when a storage resource of a Sun Storage 7000 Unified Storage System is attached to a Windows server using

the iSCSI protocol to host Microsoft SQL Server database files.

Creating an iSCSI LUN on the Sun Storage 7000 Unified Storage SystemUnder the assumption that a project already exists that will host the file system of the iSCSI target, this task is completed in two

steps that are performed as root user on the Sun Storage 7000 Unified Storage System:

1. Registering the name of the Windows iSCSI initiator node name

2. Creating a LUN

1. Registering the iSCSI Initiator Node NameThis step provides that a LUN created in this project can only be seen and mounted by registered iSCSI initiators. The name of the

iSCSI initiator of the Microsoft Windows server can be retrieved from the title page of the iSCSI Software Initiator properties view on

the Microsoft Windows host (see Figure 24). This iSCSI initiator node name is registered with the iSCSI service of the Sun Storage

7000 Unified Storage System. For this, the page Configuration — Services is opened:

The Data Services entry iSCSI includes a hyperlink that leads to a set of pages with the detailed global configuration of the iSCSI

protocol of the Sun Storage 7000 Unified Storage System:

For the setup described in this paper:

● No name server was used.

● No extra authentication method (CHAP, Radius) was configured.

12 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 13. Excerpt of the List of Services on the Sun Storage 7000 Unified Storage System

Page 17: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

A new iSCSI initiator node name is registered on the Initiators page:

Clicking the "+" sign next to iSCSI Initiators opens a dialog window where the parameters for an initiator can be supplied:

After clicking Add, the new initiator appears in the list.

13 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 14. iSCSI Protocol of the Sun Storage 7000 Unified Storage System: Global Properties

Figure 16. New iSCSI Initiator Entry

Figure 15. List of Registered iSCSI Initiators

Page 18: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

With the default project setting being not to use such an access control list, and hence allowing any initiator to mount the LUN, the

previously created project needs to be configured to use the list of iSCSI initiators for access control. This is done by opening the

Protocols page of the project and by clicking the Edit option next to Initiator Access Control List, which opens the following dialog

screen, where the suitable IQN entries can be picked:

Figure 18. Project MS_SQLSERVER_iscsi

14 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 17. Updated List of Registered iSCSI Initiators

Figure 19. Project MS_SQLSERVER_iscsi: Defining iSCSI ACL

Page 19: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

After this update, the protocols page for the project contains the node name of the Microsoft Windows iSCSI software initiator. This

list of allowed iSCSI initiators can be maintained and modified at the project level only; all LUNs created for this project will inherit

these settings. An adjustment of the ACL on the LUN level is not possible.

2. Creating a LUNA new iSCSI LUN is created in the Shares page of the project by selecting LUNS:

Clicking Add New opens a dialog box where the name and size of the iSCSI target are supplied:

The new LUN is then displayed in the Shares page of the project MS_SQLSERVER_iscsi.

The properties of the LUN can be reviewed and modified by clicking the symbol.

15 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 20. Project MS_SQLSERVER_iscsi: Shares

Figure 21. Parameters for iSCSI LUN

Page 20: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

The Protocols page displays the list of allowed initiators.

16 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 22. Project MS_SQLSERVER_iscsi: New LUN

Figure 23. iSCSI LUN Properties

Figure 24. iSCSI LUN Properties

Page 21: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

Configuring the Microsoft Windows 2003 ServerThe Microsoft iSCSI initiator software is not part of the Microsoft Windows 2003 Server CD. It is available on the Microsoft web site

(http://www.microsoft.com/downloads). When preparing an iSCSI target volume for use with Microsoft SQL Server, three

activities must be performed in a sequence:

1. Configuration of the Microsoft iSCSI Software Initiator

2. Creation of a volume using the Initialize and Convert Disk Wizard

3. Creation of a file system using the New Volume Wizard

Alternatively, instead of using the GUI-based configuration wizards in steps 2 and 3, the command-line tools Diskpart.exe and

format.exe can be used.

1. Configuring the Microsoft iSCSI Software Initiator The Microsoft iSCSI Software Initiator is configured using a collection of property sheets:

The Discovery tab allows you to specify the method of iSCSI target detection. The IP address of the Sun Storage 7000 Unified Storage

System is supplied by clicking Add; the default port setting for iSCSI, 3260, is kept. No CHAP secret has been defined on the Sun

Storage 7000 Unified Storage System, and no adjustment is necessary.

17 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 25. Microsoft iSCSI Software Initiator: Configuration

Page 22: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

The registration of the Sun Storage 7000 Unified Storage System resulted in the following entry as target portal:

18 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 26. Microsoft iSCSI Software Initiator: Adding an iSCSI Target Portal

Figure 27. Microsoft iSCSI Software Initiator: Sun Storage 7000 Unified Storage System Registered

Page 23: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

The tab Targets lists the available iSCSI volumes on registered hosts.

The status Inactive indicates that an iSCSI volume cannot currently be mounted. A selected target becomes available as a disk in

Administrative Tools - Computer Management - Disk Management by clicking Log On, and the status of this iSCSI target changes to

Connected. A dialog box offers to establish a permanent connection and to use multiple network paths to provide fault tolerance,

which would require at least two NICs on the Sun Storage 7000 Unified Storage System, attached to different subnets. For an iSCSI

volume that is designated to host datafiles of a Microsoft SQL Server database, it appears appropriate to make the volume a

persistent target by selecting the option so the connection will be restored automatically.

19 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 28. Microsoft iSCSI Software Initiator: iSCSI Target of Project MS_SQLSERVER_iscsi Identified

Page 24: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

If CHAP security had been enabled for this volume on the Sun Storage 7000 Unified Storage System, the Advanced button opens a

new property sheet where the CHAP authentication secret can be supplied. If an iSCSI volume needs to be dismounted, that is,

removed from the list of disks in Disk Management, the Details button in the iSCSI Software Initiator property sheet leads to the

properties of the selected iSCSI target, which includes a Sessions tab. The option Log off removes the iSCSI target volume from the

local host. Such an operation is required when the size of the target will be modified or if a rollback from a snapshot will be

performed on the Sun Storage 7000 Unified Storage System.

20 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 29. Microsoft iSCSI Software Initiator: Attaching the iSCSI Target Volume

Page 25: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

21 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 30. Microsoft iSCSI Software Initiator: Detaching an iSCSI Target Volume

Page 26: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

2. Making the iSCSI Target AvailableAfter the configuration of the iSCSI target is completed, the new volume must be prepared for use by the operating system. This is

done using the Disk Management applet in Computer Management. When opening this applet, a wizard is automatically launched

if a new disk has been added previously.

After clicking Next, the wizard suggests to initialize and convert the new disk #4, which is the iSCSI target that has been added

using the iSCSI Software Initiator program in our test case. First, the wizard asks for a confirmation that the new disk will be

initialized:

Then the wizard suggests to convert the selected volume to a dynamic disk.

22 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 31. Initialize and Convert Disk Wizard: Welcome Screen

Figure 32. Initialize and Convert Disk Wizard: Disk Initialization

Page 27: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

If the iSCSI target volume will be cloned from its snapshot and be mounted on the same Windows system as the original volume,

the disk must remain a basic disk and must not be converted to a dynamic disk. Before the wizard performs these changes, the

selected settings need to be confirmed:

After clicking Finish, the new disk is initialized and converted to a dynamic disk. Now the disk is ready to be formatted in the Disk

Management applet.

23 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 33. Initialize and Convert Disk Wizard: Disk Conversion

Figure 34. Initialize and Convert Disk Wizard: Summary

Page 28: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

3. Creating a File System on the iSCSI TargetRight-clicking disk #4 opens a context menu, from which the New Volume option is chosen:

This launches the New Volume Wizard:

This New Volume Wizard asks for the following volume parameters in a sequence of dialog windows:

● Volume type

● Volume size

● File system type

● Mount option

Click Next. Since only one disk is being configured, one single volume type is available here.

The size of the volume must be specified in the next step.

24 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 36. New Volume Wizard: Welcome Screen

Figure 35. Disk Management: Volume Creation

Page 29: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

In the next step, how the new file system will be mounted is specified. In this case, a drive letter will be assigned.

The parameters for the file system that will be created on the new volume are defined in the next window. For Microsoft SQL Server,

the recommended size for an allocation unit is 64 Kbyte.

25 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 37. New Volume Wizard: Volume Type

Figure 38. New Volume Wizard: Volume Size

Page 30: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

A summary of the specified settings is given before the formatting of the new disk starts.

26 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 39. New Volume Wizard: Mount Option

Figure 40. New Volume Wizard: Formatting Parameters

Page 31: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

After clicking Finish, the format process begins.

27 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 41. New Volume Wizard: Summary

Figure 42. Disk Management Applet View

Page 32: Deployment Guide for Microsoft SQL Server 2005 Database on

Using an iSCSI Volume for a Microsoft SQL Server Database Sun Microsystems, Inc.

Considerations While Using Windows File Systems on iSCSI TargetsBe aware of the following:

● A modification of the volume size, for example, increasing the size, on the Sun Storage 7000 Unified Storage System,

takes the volume offline on the Windows host.

● The Sun Storage 7000 Unified Storage System does not raise a warning before such a modification. Obviously, the Sun

Storage 7000 Unified Storage System is not aware if one of its iSCSI targets is attached to another host and whether it is in

use or not.

● The iSCSI target, when taken offline by performing a modification on the Sun Storage 7000 Unified Storage System, is not

automatically re-attached when the operation on the Sun Storage 7000 Unified Storage System is finished. Instead, such a

volume must be attached manually using the Microsoft iSCSI Software Initiator configuration tool. Defining an iSCSI target

as "Persistent Target" means that it is automatically attached after a reboot of the Windows host.

● On the Sun Storage 7000 Unified Storage System, a volume shared as an iSCSI target can be deleted even when there is an

active connection to a Windows host that uses this target volume as basis for a file system.

28 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 33: Deployment Guide for Microsoft SQL Server 2005 Database on

Sun Microsystems, Inc.

Creating a Database on an iSCSI Target

Creating a Database on the iSCSI VolumeA subfolder MSSQL_Data was created on drive J: that was mapped onto the iSCSI target volume. The iSCSI volume is being

treated like a locally attached hard disk, so that a drive letter can be used in the path of the datafiles for the database to be created.

The following SQL statement was used to create a database on the iSCSI-based file system:

CREATE DATABASE AR_iSCSI_TestON PRIMARY

(NAME = 'Primarydatafile', FILENAME = 'J:\MSSQL_Data\Primarydatafile.mdf',SIZE = 1024 MB)

LOG ON (NAME = 'Primarylog',FILENAME = 'J:\MSSQL_Data\Primarylog.ldf',SIZE = 1024 MB)

Modifying the Size of the iSCSI LUNAny modification of the size of the iSCSI volume in the administration web site of the Sun Storage 7000 Unified Storage System

causes the volume to be dismounted from the Windows server without warning. This can severely impact running processes and

cause data corruption in a datafile of a Microsoft SQL Server database. When an iSCSI LUN, which is the basis of a file system

hosting Microsoft SQL Server database files, will be enlarged, it is therefore recommended that the database be taken offline.

1. Take the database offline by right-clicking the database in the Microsoft SQL Server Management Studio and selecting the option

Tasks - Take Offline.

29 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 43. Microsoft SQL Server Management Studio: Taking a Database Offline

Page 34: Deployment Guide for Microsoft SQL Server 2005 Database on

Sun Microsystems, Inc.

The result of the operation is displayed in a pop-up window.

2. Remove the drive from the Windows server. This is accomplished by logging off from the iSCSI volume in the iSCSI initiator

configuration tool. Switch to the tab Targets, select the target that will be dismounted for the enlargement operation, and click

Details. A screen is displayed, as depicted in Figure 30. Select the check box of the hexadecimal identifier and click Log off. When

returning to the Targets tab, the status of the iSCSI LUN should now be Inactive.

3. Increase the volume size of the iSCSI target on the Sun Storage 7000 Unified Storage System. This can be done from the

administration GUI of the NAS device, as depicted in Figure 23, by increasing the value for Volume Size and clicking Apply.

4. Re-attach the iSCSI volume to the Windows Server. Use the Targets tab of the iSCSI initiator configuration tool, highlight the iSCSI

target that has been enlarged, and click Log on. A pop-up window appears (see Figure 29). Click OK to commit the requested action.

Click OK to close the iSCSI target configuration tool.

5. In the Disk Management applet, the iSCSI volume is flagged as "offline" and can be brought online again by the command

Reactivate Disk in the context menu of this disk, which can be obtained by right-clicking.

30 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 44. Microsoft SQL Server Management Studio: Result of the Command

Page 35: Deployment Guide for Microsoft SQL Server 2005 Database on

Sun Microsystems, Inc.

The disk view looks different now:

6. The volume can be extended by the additional unallocated capacity by opening the context menu of Disk #4 and choosing the

option Extend Volume.

31 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 45. Disk Management: Reactivation of an iSCSI Volume

Figure 46. Disk Management: New Volume Layout

Figure 47. Disk Management: Extending a Volume

Page 36: Deployment Guide for Microsoft SQL Server 2005 Database on

Sun Microsystems, Inc.

This launches the Extend Volume Wizard.

The wizard allows specifying dynamic disks that are available with free, unallocated disk capacity. In this case, only the capacity

added to the iSCSI target is available.

The supplied parameter must be confirmed.

This is the result of the operation in Disk Management.

32 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 49. Extend Volume Wizard: Disks For Volume Extension

Figure 48. Extend Volume Wizard: Welcome Screen

Page 37: Deployment Guide for Microsoft SQL Server 2005 Database on

Sun Microsystems, Inc.

The user sees a "homogeneous" file system:

It is not recommended to reduce the size of an iSCSI LUN in the Sun Storage 7000 Unified Storage System administration web site

that has already been mounted on a Windows host. Any attempt to reactivate the disk in the Microsoft Windows Disk Management

applet will throw an I/O error and fail.

33 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Figure 51. Disk Management: Volume Layout After Extension

Figure 52. Microsoft Windows Explorer: Properties Page of the J: Drive

Figure 50. Extend Volume Wizard: Summary

Page 38: Deployment Guide for Microsoft SQL Server 2005 Database on

Glossary Sun Microsystems, Inc.

Glossary

The following table contains common abbreviations and acronyms that are used in this study.

Abbreviation Explanation

ACL Access Control List

CHAP Challenge-Handshake Authentication Protocol

CIFS Common Internet File System

ERP Enterprise Resource Planning

IQN iSCSI Qualified Name

iSCSI Internet Small Computer System Interface

LDAP Lightweight Directory Access Protocol

LUN Logical Unit Number

NAS Network Attached Storage

NIC Network Interface Card

OLAP Online Analytical Processing

OLTP Online Transaction Processing

OS Operating System

RDBMS Relational Database Management System

UNC Uniform Naming Convention

34 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 39: Deployment Guide for Microsoft SQL Server 2005 Database on

Revision History Sun Microsystems, Inc.

Revision History

Revision Notes Date

0.1 Draft for Revision 19.06.2008

0.2 iSCSI ACL Added 03.07.2008

0.3 CIFS section added 29.07.2008

0.3 Submitted to BigAdmin 04.03.2009

0.3a First pass edits 24.04.2009

0.4-1 Author updates 01.06.2009

35 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 40: Deployment Guide for Microsoft SQL Server 2005 Database on

For More Information Sun Microsystems, Inc.

For More Information

Here are some additional resources:

● Sun Storage 7000 Unified Storage System web site: http://www.sun.com/storage/disk_systems/unified_storage

● Sun BluePrints™ papers at http://wikis.sun.com/display/BluePrints/Main (registration required)

● Sun download site: http://www.sun.com/download/

● Sun training courses at http://www.sun.com/training/, for example, Sun Storage 7000 Unified Storage System Administration (NWS-6425)

● Forums :

● Sun forums: http://forums.sun.com/index.jspa

● BigAdmin Discussions collection: http://www.sun.com/bigadmin/discussions/

● Sun product documentation at http://docs.sun.com, such as Sun Storage 7000 Unified Storage System documentation

● Sun Documentation Center: http://www.sun.com/documentation/

● BigAdmin wiki at http://wikis.sun.com/display/BigAdmin/Home:

● Using Sun Storage 7000 Unified Storage System (Quick Start and Deployment Guides):

http://wikis.sun.com/display/BigAdmin/Using+Sun+Storage+7000+Unified+Storage+Systems

● Storage page: http://wikis.sun.com/display/BigAdmin/Storage+Tech+Tips

● Databases page: http://wikis.sun.com/display/BigAdmin/Databases

● Resources on BigAdmin, such as:

● Database resource collection (includes community submissions): http://www.sun.com/bigadmin/collections/database.jsp

● Storage resource collection (includes community submissions): http://www.sun.com/bigadmin/collections/storage.jsp

● Feature Articles, with information on Sun Storage 7000 Unified Storage System: http://www.sun.com/bigadmin/features/

● Support:

● Sun resources:

● Register your Sun gear: https://inventory.sun.com/inventory/

● Services: http://www.sun.com/service

● SunSolveSM: http://sunsolve.sun.com

● Community system administration experts: http://www.sun.com/bigadmin/content/communityexperts

36 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System

Page 41: Deployment Guide for Microsoft SQL Server 2005 Database on

For More Information Sun Microsystems, Inc.

● Events of interest to users of Sun products:

● Worldwide Developer Events and Sun Tech Days: http://developers.sun.com/events/

● Current Events: http://www.sun.com/events/index.jsp

Licensing Information

Unless otherwise specified, the use of this software is authorized pursuant to the terms of the license found at http://www.sun.com/bigadmin/common/berkeley_license.html.

37 Deployment Guide for Microsoft SQL Server 2005 Database on Sun Storage 7000 Unified Storage System