SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘microsoft windows server’

FIX: General network error when you try to back up or restore a SQL Server database on a computer that is running Windows Server 2003

Symptoms
When you try to back up a Microsoft SQL Sever database on a computer that is running Microsoft Windows Server 2003, you may receive an error message that is similar to the following:

Processed <Number of Pages> pages for database ‘<databaseName>’, file ‘<databaseName>’ on file 1.
100 percent backed up.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (WrapperRead()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Processed 1 pages for database ‘<databaseName>’, file ‘<fileName>’ on file 1. However, the backup device file is created successfully and the backup data is valid.
A similar problem may also occur when try to restore a SQL Server database on a computer that is running Microsoft Windows Server 2003, and you may receive an error message that is similar to the following:

Processed <Number of Pages> pages for database ‘<databaseName>’, file ‘<fileName>’ on file 1.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (WrapperRead()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Processed 1 pages for database ‘<databaseName>’, file ‘<fileName>’ on file 1.
ODBC: Msg 0, Level 16, State 1
Communication link failure Generally, the backup device file is still created. However, the file may not be valid depending on when the failure occurred. Also, when this problem occurs, an error such as the following is typically logged in the SQL Server error log:

2004-05-26 09:44:16.77 backup BACKUP failed to complete the command backup database testdb to disk=’c:\temp\testdb.bak’ with init, stats=10Note This problem may occur when the SQL Server connection uses the Named Pipes Net-Library.
When the Sqlmaint.exe utility runs the RESTORE VERIFYONLY command, you may notice an error message that is similar to the following in the SQL Server error log:

BackupDiskFile::OpenMedia: Backup device ‘C:\MSSQL\db_200401261900.BAK’ failed to open. Operating system error = 32(The process cannot access the file because it is being used by another process.).Also, you may notice an error message that is similar to the following in the SQL Server maintenance plan output file:

Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3201: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open backup device ‘C:\MSSQL\db_200401261900.BAK’. Device error or device off-line. See the SQL Server error log for more details. [Microsoft][ODBC SQL Server Driver][SQL Server]VERIFY DATABASE is terminating abnormally. End of maintenance plan ‘ABC Maintenance Plan’ on 1/26/2004 7:00:08 PM SQLMAINT.EXE Process Exit Code: 1 (Failed)”
Resolution
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a “Hotfix download available” section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or tocreate a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support(http://support.microsoft.com/contactus/?ws=support)Note The “Hotfix download available” form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

DateTimeVersionSizeFile name———————————————-09-17-20032000.85.1022.42 28,672 bytes dbnmpntw.dll Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.
Note For a list of all the hotfixes available for MDAC 2.8, click the following article number to view the article in the Microsoft Knowledge Base:
839801?(http://support.microsoft.com/kb/839801/) FIX: Hotfixes are available for MDAC 2.8

SQL Server support for mounted volumes

Symptoms
Support for Microsoft SQL Server 2000 data storage on mounted drives varies, depending on whether an instance of SQL Server 2000 is a stand-alone instance or a clustered instance. A stand-alone instance does not use failover clustering. A clustered instance does use failover clustering. More information about each type of instance follows.Stand-alone instance On a stand-alone instance of SQL Server 2000, data storage on mounted drives is supported on Microsoft Windows 2000 and on Microsoft Windows Server 2003. However, the SQL Server 2000 Setup program requires the base drive of a mounted drive to have an associated drive letter. If the base drive of a mounted drive does not have an associated drive letter, the Setup program will assign the next available drive letter to the drive. However, if all the drive letters are already assigned, the Setup program will fail.
For more information about SQL Server requiring a drive letter when you use mounted drives, click the following article number to view the article in the Microsoft Knowledge Base:
834661?(http://support.microsoft.com/kb/834661/) SQL Server 2000 Setup requires a drive letter when you use mounted drivesClustered instance On a clustered instance of SQL Server 2000, data storage on mounted drives or on NTFS junction points is not supported.This applies to Windows 2000 and to Windows Server 2003. The installation of SQL Server 2000 is not supported on a clustered configuration that has mounted drives even if the mounted drives are not intended to be used with SQL Server. That is, if a configuration already has some mounted drives for file shares, you cannot install SQL Server on that configuration, even if you are not using the mounted drives for SQL Server.
SQL Server 2005 and later versions failover clustered instances fully support mounted drives if the mounted drive is hosted by a cluster drive with a drive letter assigned.
Note Because of the number of available drive letters, the number of the virtual instances on a cluster is limited to 25. SQL Server 2005 and later versions has the same limitation.
The SQL Server 2005 and later versions resource depends on the SQL network name resource and the physical disk resources that hold its data. When mount points are being used together with the physical disks, each mount point must appear as a cluster resource. Additionally, each mount point must also be added as a SQL Server dependency. If only the root physical disks dependency is added and the mount points are not added, database corruption will occur on failover. Database corruption may also occur when SQL Server is restarted without failing over.
Resolution
A mounted drive is a volume or a drive that is mapped to a folder on a volume that uses the NTFS file system. Mounted drives function as any other volume or drive. A mounted drive is assigned a drive path instead of a drive letter.
Mounted drives are sometimes referred to as “mounted volumes,” as “mount points,” as “mountpoints,” or as “volume mount points.” You can create mounted drives by using the Microsoft Windows 2000 Disk Management snap-in or by using the Mountvol.exe file.
Although mounted drives are a feature of Windows 2000, mounted drives are not supported on Windows 2000 cluster servers because of the failover behavior on Windows 2000 clustered servers for mounted drives and because of the assignment of different GUIDs for each disk on each node. The behavior of mounted volumes on a failover cluster was fixed for Windows Server 2003. Windows Server 2003 supports mounted drives in a cluster. However, because of limitations in SQL Server 2000, the use of mounted volumes on a clustered instance of SQL Server 2000 is not supported on any operating system.
A SQL Server 2000 installation is not supported on a clustered configuration with mounted drives because SQL Server 2000 was released before the mounted drive feature was released. The code that is used to enumerate the shared and the common local fixed disks in SQL Server 2000 in a clustered configuration is not compatible with mounted drives. This means that SQL Server 2000 cannot be installed on a cluster which contains mounted drives even if the SQL Server 2000 instance does not use any of those mounted drives.
Because of similar limitations, an upgrade of a clustered instance of SQL Server is not supported. An installation of SQL Server service packs on a clustered instance of SQL Server is also not supported.
Note The information in this article supercedes the information that is in the Microsoft Press book “SQL Server 2000 High Availability” that was published before this discovery. The information that is superceded is in “Chapter 4 – Disk Configuration for High Availability” in the “Part II - Microsoft SQL Server Technology” section.

SQL Server is not supported on Windows Server 2003 or Windows Server 2008 Terminal Server application server

Symptoms
Microsoft SQL Server does not support the installation or use of SQL Server Failover Clustering on Microsoft Windows Server 2003-based server clusters or on Windows Server 2008-based server clusters if the server clusters have Terminal Server installed. This configuration was known as Application Mode in Microsoft Windows 2000. However, SQL Server 2000 instance installation is supported as a stand-alone instance for Windows Server 2003 or Windows Server 2008 Terminal Services Mode (Application Mode).
For Windows Server 2003 or Windows Server 2008 Terminal Server Remote Desktop for Administration Mode, SQL Server 2000 installation is fully supported as both a clustered instance and a stand-alone instance.
Note Cluster instances for the versions of SQL Server that are listed in the “Applies To” section are currently not supported on Windows Server 2003 or Windows Server 2008 Terminal Server Server Cluster installations.
Resolution
Terminal Server provides remote computers with access to Windows-based programs running on the following systems:Windows Server 2003 Standard Server Windows Server 2003 Enterprise Server Windows Server 2003 Datacenter ServerWindows Server 2008 Standard Server Windows Server 2008 Enterprise Server Windows Server 2008 Datacenter ServerWith Terminal Server, you can provide a single point of installation that gives multiple users access to any computer that is running one of the operating systems listed earlier. Users can run programs, save files, and use network resources, all from a remote location as if these resources were installed on their own computers. This functionality is now available on server clusters in Windows Server 2003.
Remote Desktop for Administration is another part of the Terminal Services technology that is offered in Windows Server 2003 or in Windows Server 2008. You can enable remote administration of servers with Remote Desktop for Administration on any computer that is running the Windows Server 2003 or Windows Server 2008 family of products, even if Terminal Server is not installed.
Note In Microsoft Windows 2000 Server, the Terminal Server component is named Terminal Services in Application Server mode. In Microsoft Windows 2000 Server, the Remote Desktop for Administration component is named Terminal Services in Remote Administration mode.
To determine whether the Terminal Server service is running on the computer, follow these steps:Open Control Panel.Double-click Add/Remove Programs.On the left side of the screen, double click Add/Remove Windows Components.Under Components, scroll down the list until you find Terminal Server. If Terminal Server is not selected, the service that is running is the “Remote Desktop” service and you can continue with your SQL Server installation. If Terminal Server is selected, you must clear the check box to remove the Terminal Server service in the application before you continue with the SQL Server installation.For more information about the supportability of SQL Server failover clusters on Windows Server 2003 clusters, click the following article number to view the article in the Microsoft Knowledge Base:
313037?(http://support.microsoft.com/kb/313037/) Upgrading SQL Server clusters to Windows Server 2003
Example log behavior if Terminal Server is installedIf Windows Server 2003 Terminal Server is installed and you try to install SQL Server, no log files exist in the %windir% folder. However, the log files are stored in the %userprofile%\Windows folder. When you check the log files and you compare the log to the system variables, you see results that are similar to the following in the Sqlstp.log file:

19:41:44 Begin Action: SetupInstall19:41:44 Reading Software\Microsoft\Windows\CurrentVersion\CommonFilesDir …19:41:44 CommonFilesDir=C:\Program Files\Common Files19:41:44 Windows Directory=C:\Documents and Settings\&lt;user_name&gt;\WINDOWS\ 19:41:44 Program Files=C:\Program Files\19:41:44 TEMPDIR=C:\DOCUME~1\<user_nam~1>\LOCALS~1\Temp\1\From system variables – USERPROFILE=C:\Documents and Settings\<user_name> windir=C:\WINDOWSNote This example does not apply to servers that are running Windows 2003 Service Pack 1 (SP1) or a later version. We recommend that youcheck manuallyfor a Windows directory in the %USERPROFILE% directory.

Scalable shared databases are supported by SQL Server 2005

Symptoms
Scalable shared databases are supported by Microsoft SQL Server 2005 Enterprise Edition. This article is a preview of the “Scalable shared database” topic that will be published in a future update of SQL Server Books Online.
Resolution
Scalable shared databasesScalable shared databases let you attach a read-only reporting database to multiple server instances over a storage area network (SAN). A reporting database is a read-only database that is built from one or more production databases that are used exclusively for reporting purposes. To be made into a scalable shared database, a reporting database must reside on one or more dedicated read-only volumes. The primary purpose of these read-only volumes is to host the reporting database or a coordinated set of reporting databases. These volumes are known as reporting volumes.
BenefitsScalable shared databases offer the following benefits: Provide workload scale-out of reporting databases by using commodity servers. A scalable shared database is a cost-effective way of making read-only data marts or data warehouses available to multiple server instances for reporting purposes, such as running queries or using SQL Server 2005 Reporting Services. Provide workload isolation. Each server uses its own memory, CPU, and tempdb database. Guarantee the same view of reporting data from all servers if all the server instances are configured identically. For example, all servers would use a single collation.
Note Optionally, you can update the reporting database on a second reporting volume. For more information, see the “Maximize the availability of a scalable shared database” section.
RestrictionsThe following restrictions exist for a scalable shared database: The database must be on a read-only volume. The data files can be accessed over an SAN. Scalable shared databases are supported only on Microsoft Windows Server 2003 Service Pack 1 (SP1) or a later version of Windows Server 2003.
Update cycle of a reporting databaseWhen you use a scalable shared database for a reporting database, it involves a three phase update cycle: Build phase: The update cycle of a reporting database starts with the build phase. Before a reporting database can be built, the administrator mounts the reporting volume on the production system and makes it read/write. When a volume is in a read/write state, the volume can only be mounted on one system. If the volume is mounted on more than one system, filesystem corruption might occur. The administrator then builds the database by using one of the data-copy methods provided by SQL Server 2005 for copying data or databases. After the database is built, the administrator sets the volume to read-only, and then dismounts it. Attach phase: The attach phase comes after the build phase. The attach phase makes the database available as a scalable shared database. The attach phase must be performed on each of reporting servers individually. To configure the reporting database as a scalable shared database, the administrator mounts the read-only reporting volumes onto a reporting server over the SAN. After the administrator makes sure that each volume is set to read-only, the administrator attaches the reporting database on an instance of SQL Server. The reporting database on an instance of SQL Server is also known as a reporting server instance. Because each reporting volume is read-only, attaching the database sets it to read-only. At this point, the reporting database becomes a scalable shared database that can be accessed by clients by using the reporting server.
Note If you use a second reporting volume when you update the reporting database, you must choose between a rolling upgrade and a synchronized upgrade. For more information, see the “Maximize the availability of a scalable shared database” section. Detach phase: The third phase is the detach phase. Typically, the reporting database eventually becomes stale. The database must be refreshed to keep the reporting data current. The detach phase is the process of removing a stale reporting database from service as a scalable shared database. Before you can make an updated reporting database available on a particular reporting server, the detach phase must be completed on that server. When a reporting database must be refreshed, it must be detached from all the server instances. To start the detach phase, the database administrator first stops the query work load that is coming in to the database from all the server instances. On each server instance, the database administrator obtains exclusive access to the database, and then detaches it. The database administrator then dismounts the volume from each host system. When the detach phase is complete, the reporting volume is disconnected from the SAN. Note To maximize the availability of reporting data, we recommend that you alternate update cycles between two reporting volumes as a best practice. When the first reporting volume is still mounted to the reporting servers, you can mount the second volume to the production server, and then build an up-to-date version of the reporting database. For more information, see the “Maximize the availability of a scalable shared database” section.
Note Each phase consists of a series of steps that must be performed by a user who has Database Administrator rights. In this article, that user will be referred to as the database administrator.
Important To configure a scalable shared database, the SAN environment must already be working correctly.
Examples of scalable shared databasesIn subsequent update cycles, the database can be updated or rebuilt. The preferred method depends on your business requirements. You can use scalable shared databases in the following two ways: Data mart database: The simplest use of a scalable shared database is a data mart database. A data mart database is extracted periodically from the contents of a data warehouse and is used for reporting. To update the data mart database, drop the database and then replace it with a new version. Reporting from an updatable database: When the database that is being reported from does not have to be transformed from the source database, the database can be periodically updated. To periodically update the database, create a full backup of the production database, and then restore the database backup on the reporting volume or volumes.
Make sure that the environment is correct for a scalable shared databaseA scalable shared database must be on a read-only volume that can be accessed over a SAN. The reporting servers must be running the following: Windows Server 2003 SP1 or a later version of Windows Server 2003SQL Server 2005 Enterprise Edition or a later version of SQL Server 2005 For supportability, we recommend that you limit your scalable shared database configurations to eight server instances. However, SQL Server 2005 does not limit the number of concurrent instances that can access a scalable shared database. Typically, each server instance runs on a separate reporting server. However, running multiple reporting server instances on a reporting server is supported.
Configure your environmentTo make sure that your environment supports scalable shared databases, we recommend that you follow these guidelines: Make sure that the reporting servers for a particular reporting database are running on identical operating systems. Whenever you upgrade a reporting server, upgrade any other reporting servers that serve the same scalable shared database or databases. For example, if you apply a software update or service pack for Windows or SQL Server 2005 to any one of the reporting servers, apply the same software update or service pack to all the reporting servers.
Note Frequently, you can perform rolling upgrades of the reporting servers as long as you complete the rolling upgrade in a timely manner. Scalable shared databases are tested under a concurrent access workload by up to eight server instances of SQL Server 2005 Enterprise Edition. SQL Server 2005 does not enforce an instance limit. However, we recommend that you limit your scalable shared database configurations to eight server instances for each shared database. If the data files of the production database span multiple volumes, you must use the same number of reporting volumes. In contrast, because the reporting database is set to read-only, its log files can co-exist with data files on a reporting volume. To simplify the process of building or updating a reporting database, we recommend that the path of the reporting database be the same as the production database. This includes using both the same drive letter for the reporting volume and the same directory path for the database. For example, if the production database is on E:\SQLdata, use E as the drive letter of the reporting volume, if it is possible. Additionally, use \SQLdata as the directory of the reporting database, if it is possible. However, a script that has explicit paths can handle any differences. If the reporting volume uses a different drive letter than the production volume, you may have to make the following modifications: If you build the reporting database by restoring a database backup, the RESTORE DATABASE statement must have a WITH MOVE clause that specifies the full path of the restored data files. If your reporting database is a copy of the production database, the FOR ATTACH clause of the CREATE DATABASE statement must list every file. The FOR ATTACH clause must also specify its full path when you attach the reporting database. This is always a best practice.
Note As a best practice, use the same drive letter on every server when you mount a reporting volume onto your reporting servers. This practice helps you manage the volume across the different servers. The reporting database must be on a read-only volume that can be accessed over the SAN from all the reporting servers: After you mount the reporting volume onto a reporting server, make sure that the reporting volume is correctly mounted and that the data files can be accessed. To do this, enter DIR <drive-letter>:\<database-directory> at a command prompt, where <drive-letter> is the letter assigned to the reporting volume, and <database-directory> specifies the location of the database’s data files on the volume. Run this test from each reporting server to make sure that you receive the same results for them all. To make sure that the reporting database is set read-only, try to create a file on the volume. The easiest method is to try to copy or save a plain text file on the volume. The attempt should fail because the volume is read-only.
Note If you are performing these steps manually, we recommend that you repeat these tests in every update cycle when you remount the reporting volume on each reporting server. If you script the steps to move reporting volumes back and forth between the production server and the reporting servers, testing is no longer required after you are sure that your scripts are working correctly.
Phase 1:The build phaseBuild or refresh a scalable shared databaseA reporting database must be built and refreshed manually. This process is the first phase of the update cycle for a reporting database and is known as the build phase. The build phase may involve updating a stale database or building a new version.
Typically, the current version of a reporting database eventually becomes stale. The reporting database must be periodically refreshed to keep the reporting data up to date.Completethe build phaseYou can refresh a stale reporting database by updating the outdated data in the existing database or by rebuilding the database.
Note Before you can refresh an existing reporting database, the database must be detached from each reporting server instance. Additionally, the reporting volume must be dismounted from each reporting server. For more information, see the “Detach a scalable shared database” section.
To refresh a stale reporting database, follow these steps on the production server: Use your hardware vendor’s utilities to unmask the logical unit numbers (LUNs) that correspond to the reporting volumes. This action makes the volumes accessible to the production server. Mount the reporting volume, and then mark it as read/write. To use the Diskpart command-line utility to mount the volume, enter the following commands at a command prompt:DiskPart
DISKPART> select volume=<drive-number>
DISKPART> assign letter=<drive-letter>
DISKPART> attribute clear readonly
DISKPART> exit
In this step, <drive-number> is the volume number that is assigned by Windows, and <drive-letter> is the letter that is assigned to the reporting volume. If you are refreshing an existing reporting database, follow these steps: Attach the database to a server instance. Typically, this would be the production server instance.

CREATE DATABASE <database_name> ON <filespec_list>FOR ATTACH Set the database to read/write access by using the following Transact-SQL statement.

ALTER DATABASE <database_name> SET READ_WRITEFor more information, see SQL Server 2005 Books Online. Build the database.
To refresh a reporting database, you can update the outdated data, rebuild the database, or do whatever else you think is required to refresh the data. The administrator builds the database by using any one of the data-copy methods that are provided by SQL Server 2005 for copying data or databases. For more information, see the “Methods for building or updating a database” section.
Note In reporting databases, we recommend that page verify be set to checksum, the default. To change this setting, use ALTER DATABASE. Set the database to read-only by using the following Transact-SQL statement.

ALTER DATABASE <database_name> SET READ_ONLY Detach the database by using the following Transact-SQL statement.

sp_detach_db @dbname=’<database_name>’In this step, <database_name> is the name of the database. Mark the volume as read-only, and then dismount the volume from the production server. To use the Diskpart command-line utility to dismount the volume, enter the following commands at a command prompt.

DiskPartDISKPART> select volume=<drive-number>DISKPART> attribute set readonlyDISKPART> removeIn this step, <drive-number> is the volume number that is assigned by Windows, and <drive-letter> is the letter that is assigned to the reporting volume.Use your hardware vendor’s utilities to mask the LUNs that correspond to the reporting volumes. This action makes the volumes inaccessible to the production server. Now, the reporting database can be made available as a scalable shared database. For more information, see the “Attach a scalable shared database” section.
Methods for building or refreshing a databaseNote When you build a reporting database, we recommend that you always use the same path for the production database and the reporting databases. Additionally, we recommend that you use the same drive letter for the production and reporting volume when the volume is mounted on the reporting servers, if it is possible.
SQL Server 2005 currently supports the following methods for porting data into a database or for porting a whole database: SQL Server Integration Services: You can create or copy a database by running Integration Services packages and by using the Execute SQL task or the Transfer Database task: The Execute SQL task runs SQL statements or stored procedures from a package. When you use the Execute SQL task, you can create a database by running a CREATE DATABASE statement. You can then populate the database by copying in one or more tables or views. The Transfer Database task can copy a database in the same server instance or between instances.
Note You can also create a database by using the SQL Server Import and Export Wizard, but you must copy at least one table or view. Backup and restore: You can restore a backup of a production database on the reporting volume. To do this, restore and recover a full database backup onto the reporting volume: If you are using the same drive letter, mount the reporting volume onto a different host, and then connect to a server instance there to restore the database. If the reporting volume uses a different drive letter than the production volume, the RESTORE DATABASE statement must have a WITH MOVE clause that specifies the drive letter of the reporting volume in the path of the restored database. Copy the production database onto the reporting volume: Before you can manually copy a database or use the Detach and Attach method of the Copy Database Wizard, you must take the database offline. After you copy the database, bring the database back online. However, the Copy Database Wizard offers an alternative method. The SMO Transfer method copies the database although the database remains online. Although the SMO Transfer method is slower than the Detach and Attach method, the SMO Transfer method preserves active connections to the database. For more information about these data-copy methods, see SQL Server 2005 Books Online.
When the reporting database is ready, you must complete the build phase. For more information, see the “Phase 1: The build phase” section.
Phase 2: The attach phase Attach a shared scalable databaseAfter you build or update a reporting database and you dismount the reporting volume from the production server, an administrator must make the database available as a scalable shared database. This process is known as the attach phase.Complete the attach phaseIn this phase, an administrator must perform the following steps: Use your hardware vendor’s utilities to unmask the LUNs that correspond to the reporting volumes. This action makes the volumes accessible to clients from each reporting server. On each reporting server, mount the volume that corresponds to the LUN.
Note To simplify the process of building or updating a reporting database, we recommend that you always mount its reporting volume by using the same drive letter as the production volume. For example, if the production database is on drive E on the production server, the reporting volume should also be mounted as drive E on each reporting server, if it is possible.
To use the Diskpart command-line utility to mount the volume, enter the following commands at a command prompt.

DiskPartDISKPART> select volume=<drive-number>DISKPART> assign letter=<drive-letter>DISKPART> exitIn this step, <drive-number> is the volume number that is assigned by Windows, and <drive-letter> is the letter that you want to use for the reporting volume on the reporting server.
Note The reporting volume must be read-only. We recommend that it be marked as read-only before the volume is dismounted from the production server. If the volume was not marked as read-only, set the volume to read-only after you mount the volume on the first reporting server. For more information, see the “Phase 1: The build phase” section.
As a best practice, you should make sure that the volume is accessible as a read-only volume over the SAN after you mount a reporting volume to each reporting server. For more information, see the “Make sure that the environment is correct for a scalable shared database” section. Attach the database to the reporting server instance or instances on each reporting server. For more information, see SQL Server 2005 Books Online.The reporting database is now available as a scalable shared database, and queries can continue.
Phase 3: The detach phase Detach a scalable shared databaseTypically, the current version of a reporting database eventually becomes stale and must be refreshed to keep the reporting data up to date. The process of removing a stale reporting database from service as a scalable shared database is known as the detach phase. This phase is the third and final phase of the update cycle for a reporting database. Before you can make an updated reporting database available on a particular reporting server, the detach phase must be completed on that server.Complete the detach phaseIn this phase, an administrator must perform the following steps on each reporting server: Disable new queries on the database, and then let current queries complete gracefully, if it is possible. Detach the database from each reporting server instance by using the sp_detach_db @dbname=’<database_name>’ command.
In this step, <database_name> is the name of the database. For more information about the sp_detach_db command, see SQL Server 2005 Books Online. On each reporting server, dismount the reporting volume. To dismount the volume by using the Diskpart command-line utility, enter the following commands at a command prompt.

DiskPartDISKPART> select volume <drive-number>DISKPART> removeIn this step, <drive-letter> is the letter that assigned to the reporting volume.Use your hardware vendor’s utilities to mask the LUNs that correspond to the reporting volumes. This action makes the volumes inaccessible to clients from each reporting server.
Alternative strategies for detaching a stale reporting databaseWhen you replace the stale version of a database, you must consider the business requirements for your reporting environment. You should assess which of the following business requirements take precedence in your environment: Preserving currently running transactions until they finish.Completing the update within a limited timeframe.Based on which requirement takes precedence, you can decide how to manage the detach phase on each reporting server. You can manage the detach phase in the following ways: Let the transactions finish before you detach the reporting server: To preserve all in-progress transactions, you must start the detach phase by stopping incoming I/O activity to the reporting volume. Then, on each reporting server instance, wait to detach the database until all the current transactions are finished. When the database has been detached from all the server instances, you can dismount the reporting volume. Update the database during a limited timeframe: In this case, you should obtain exclusive access to the database on each server instance with a termination time that allows for your timeframe. If any queries do not finish within that termination time, they will be stopped. Those queries will have to wait until after the update to be restarted. After the queries are stopped, you can detach the database from each server instance, and then dismount the reporting volume from each reporting server. At this point, you are ready for the next build phase. Alternatively, if you have already refreshed the database on another reporting volume like we recommend, you can now perform the attach phase for the alternative volume. For more information, see the “Maximize the availability of a scalable shared database” section.
Maximize the availability of a scalable shared databaseTo maximize the availability of reporting data, we recommend that you alternate update cycles between two reporting volumes. When the first reporting volume is still mounted to the reporting servers, you can mount the second volume to the production server and build an up-to-date version of the reporting database.
If you update the reporting database on a second reporting volume, consider the following options: If you want all your reporting databases to return identical results to clients, you must detach the old copy from all the server instances before you attach the new copy to any one of them. If you can tolerate clients receiving different results on different server instances when you update the reporting database, you can perform a rolling upgrade of the reporting database. You would finish the update cycle on one reporting server at a time.
Synchronized, time-sensitive updates of all reporting serversThis section describes several strategies for updating the content of a scalable shared database, depending on your business requirements: You must keep all reporting servers in sync. You must accomplish the update within a limited timeframe. This timeframe is more critical than preserving currently running transactions. When you synchronize the database on all the reporting servers, the reporting database is unavailable between the detach phase for the stale version of the database and the attach phase of the fresh version.
To synchronize the update cycle on all the reporting server instances and finish the update cycle within a limited timeframe, follow these steps: To keep the content in sync, you must finish the detach phase on all the reporting servers before any one of the reporting servers can be updated. If any long-running queries are active on any server, you must stop them. After you dismount the first reporting volume from all the server instances, you can start to update the reporting servers. On each reporting server, mount another volume that contains a more current version of the reporting database. Attach that version to the local reporting server instance. As soon as the database is attached on a particular instance, stopped transactions can be restarted on that instance.
Rolling upgrades of reporting serversA rolling upgrade lets you to refresh the reporting database on one reporting server when a stale reporting database remains temporarily available on another reporting server. For a while, both the stale version and the refreshed version of the database are available at the same time. Depending on your business requirements, a rolling upgrade can occur in a limited timeframe or the rolling upgrade can be relatively open-ended to let current transactions finish. Let transactions finish before the rolling upgradeIn this strategy, a rolling upgrade lets the database administrator to wait for long-running transactions to finish on one reporting server when the database on another reporting server is refreshed. This strategy addresses the following business requirements: The reporting servers do not have to be kept in sync. This permits a rolling upgrade between the stale reporting database and the updated reporting database. You have an unlimited timeframe to accomplish the update, or your deadline is less critical than preserving currently running transactions. To perform this form of rolling upgrade, follow these steps on one server instance at a time: To preserve all in-progress transactions, you must start the detach phase by stopping incoming I/O activity to the reporting volume. If a long-running query delays the upgrade on a server instance, wait for the query to finish before you take the server instance offline. After all the transactions are finished on this server instance, detach the reporting database. After you detach a particular reporting database from all the server instances, attach a more current version of the reporting database to that server instance. To make the server instance available again for reporting queries, attach an updated copy of the database. Finish the rolling upgrade in a limited timeIn this strategy, a rolling upgrade lets the database administrator to maintain uninterrupted reporting service by briefly letting the stale version of the database to remain available to new queries on some reporting servers. The service remains uninterrupted when you update the database on another reporting server. This strategy addresses the following business requirements: The reporting servers do not have to be kept in sync. This permits a rolling upgrade between the stale reporting database and the updated reporting database. You must accomplish the update in a limited timeframe. This deadline is more critical than preserving currently running transactions. To perform this form of rolling upgrade, follow these steps on one reporting server at a time: Stop incoming I/O activity to the reporting volume, and, optionally, wait for short transactions to finish on a server instance before you detach its reporting database. Finish the detach phase on that server. For more information, see the “Detach a scalable shared database” section. Make the updated version of the reporting database available again for reporting queries. For more information, see the “Attach a shared scalable database” section. This kind of rolling upgrade guarantees that the overall reporting capability is never interrupted. This strategy lets you to tolerate fairly long-running transactions on some of the server instances for a while. However, given the limited timeframe for updating all the reporting databases, if a long-running query significantly delays the upgrade on a server instance, you will have to stop that query. The query can wait to be rerun on the same server instance after its reporting database has been refreshed, or the query can be restarted sooner on an updated server.