This will be the first of a multi-part series covering SQL Server 2005 Database Mirroring and Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007. This post will cover an introduction to SQL Server 2005 Database Mirroring, an overview, and the basics to include considerations and integration with SharePoint Products and Technologies. Part 2 will cover implementing SQL Server 2005 Database Mirroring with SharePoint Products and Technologies using NTLM authentication and dedicated (DAS) storage and failover examples.
SQL Server 2005 Database Mirroring has increased in popularity since its introduction and among the possible applications there is a growing demand to implement SQL Server 2005 Database mirroring for SharePoint Products and Technologies. This article outlines the considerations and implications of designing SQL Server 2005 Database Mirroring into your SharePoint Products and Technologies database architecture.
Understanding Basic Database Mirroring Concepts
SQL Server 2005 Database Mirroring provides high-availability and rapid failover by continuously sending a databases's transaction logs from an originating SQL server instance (principal) to a destination SQL server instance (mirror). Since the granularity of failover is at the database level unlike the server level failover in Microsoft Cluster Server, SQL Server 2005 Database Mirroring failover can provide an increase in failover performance and is more seamless and transparent to the application. A complete overview of Database Mirroring in SQL Server 2005 is available at http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx.
Considerations and Implications
There are several important factors to consider before implementing SQL Server 2005 Database Mirroring in your SharePoint Products and Technologies infrastructure. Prior to implementing SQL Server 2005 Database Mirroring, you should understand what problems you are trying to solve whether they are performance, availability, or geographic replication related.
Failover Handling
The introduction of a witness server in your SQL Server 2005 Database Mirroring architecture provides a mechanism for automatic failover; however, since mirroring granularity is at the database level, it is important to consider how to handle both single, multiple database and/or server failure. Since the principal and mirror server SQL server instances are unique, SharePoint Products and Technologies will need to be made aware of the database server hosting its content. The following sections details the STSADM operations that can be run to create this awareness in Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007.
If an individual database fails you can set the database server using the SharePoint 3.0 Central Administration user interface or STSADM.
Content Database Failover
To change the principal server for a content database using STSADM run:
stsadm -o deletecontentdb -url "<http:// webapplicationurl>" -databasename "<contentdatabase>" -databaseserver "<failedprincipal>" stsadm -o addcontentdb -url "<http:// webapplication>" -databasename " <contentdatabase>" -databaseserver "<newprincial>"
To change the principal server for a content database using the SharePoint 3.0 Central Administration user interface:
Configuration Database and Administration Content Database Failover
The configuration and administration content database must reside on the same SQL database server, in the event that either of these databases fails, both must be failed over to the new database server. To failover the configuration and administration content database, run the following STSADM from a web front-end computer:
stsadm.exe -o renameserver -oldservername <failedprincipal> -newservername <newprincipal>
Restart Internet Information Services to commit the change.
Search Database Failover
The following STSADM operation should be run from one web front-end computer for each failed search database.
stsadm –o editssp –title <searchname> –ssplogin <username> –ssppassword <password> -searchdatabaseserver <newprincipal>
Shared Services Database Failover
The following STSADM operation should be run from one web front-end computer for each failed SSP database.
stsadm –o editssp –title <SSPName> –ssplogin <username> –ssppassword <password> -sspdatabaseserver <newprincipal>
The information provided above details the steps necessary to instantiate a manual failover of the various components of a SharePoint Products and Technologies server farm, for additional information on scripting automatic client-side redirect in the event of failover see Alerting on Database Mirroring Events and Database Mirroring in SQL Server 2005 under Resources and Recommended Reading. While it is possible to mirror the configuration and other databases associated with a SharePoint Products and Technologies server farm through the proper implementation of STSADM operations; support of SQL Server 2005 Database Mirroring for SharePoint Products and Technologies is limited to the content databases.
Resources and Recommended Reading
Database Mirroring in SQL Server 2005
SQL Server: Database Mirroring Best Practices and Performance Considerations
SQL Server 2005 Database Mirroring FAQ
Alerting on Database Mirroring Events
Using Database Mirroring with Office SharePoint Server and Windows SharePoint Services
SQL Server Performance Test Results
Hi Bill
Great article. Well I have a medium farm set up with two SQL 2005 servers on the backend mirrored. I do the failover and run the stsadm commands to get all of my sites up and running. Everything works like a charm. The only thing that's not working is search. I run this command
stsadm -o editssp -title WSS_Portal_search -ssplogin contoso\spadmin -ssppassword p@ssw0rd -searchdatabaseserver sqlmirror
and I get an error message
The following arguments are invalid: searchdatabaseserver
stsadm -o editssp
-title <SSP name>
[-newtitle <new SSP name>]
[-sspadminsite <administration site url>]
[-ssplogin <username>]
[-ssppassword <password>]
[-indexserver <index server>]
[-indexlocation <index file path>]
[-setaccounts <process accounts (domain\username)>]
[-ssl <yes|no>]
Any ideas? I was on the phone with Microsoft for eight hours the other day. They couldn't help.
Thanks.
Just got off the phone with MS and the stsadm -o edditssp with the searchdatabaseserver and sspdatabaseserver argumetns are invalid.
As Bill mentions (I did not catch this until I re-read this page) that mirroring is limited to the content databases only.
Last week at TechReady I attended Mike Watson's and James Petrosky's talk on HA and DR scenarios
Database mirroring is increasing in popularity and becoming an integral part of high availability and
Hi,
Want to know s there any way on automatic failover i can fire stsadmin command to swith the Sharepoint to point to Mirrored DB, I tried to setup an job for Automatic Failover event alert of type CMD to run STSADMIN command.
But looks like its not taking affect.
Any clue how to verify that command is executing on alert or not some log or any thing else, because in job history I am see job execution time and duration which is same when Aautomatic failover event fired, when i change the DB status from 'ALTER DATABASE <<DB>> SET PARTNER FAILOVER;
Thanks
Vipin
'
Should I cluster or mirror? A few short months ago, the answer to that question would have been easy,
I am assuming you are calling the renameserver operation?
Can somebody help "how to transfer WSS v3 database to another drive in same server instead of root drive"
I really need help on this...
muthu
Muthu;
Default database locations are established on the SQL database server - these settings will define where new databases are created. For a list of sample T-SQL statements that can be used to move data and log files visit http://support.microsoft.com/kb/224071. If using SQL Server 2005 you can change the location using the Management Studio user inteface. To simply the data/log file move, you may wish to leave the database attached to Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007.
Database Mirroring Resources: SQL Server: Database Mirroring Best Practices and Performance Considerations
Body: I just had a client ask about migrating a MOSS/WSS database and found this article and this one
Here are some resources relating to part 3 of the SharePoint Server 2007 webcast series I'm presenting,
The SQL Server 2005 Database Mirroring with SharePoint Products and Technologies whitepaper has been
I came across these great resources for setting up a mirrored failover environment for MOSS: SQL Server
Interesantes Recursos para configuración de entornos de Alta Disponibilidad para SharePoint en Base a