Share via


Run a farm that uses read-only databases (Office SharePoint Server)

Applies To: Office SharePoint Server 2007

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2016-11-14

This article describes how to run a Microsoft Office SharePoint Server 2007 farm in which content databases have been set to be read-only (a read-only farm). A read-only farm can be part of a disaster recovery environment that runs against mirrored or log-shipped content databases. Alternatively, it can be part of a highly available maintenance or patching environment that provides user access while another version of the farm is being updated.

Note

In a read-only farm, only content databases are read-only. All other databases, including the configuration database, Central Administration content database, and search database, are read-write.

To run a farm that uses read-only databases, you must first ensure that the content databases are read-only, and then disable timer jobs that write to content databases. You might also want to alert your users to the changes they will encounter in a farm that is using read-only content databases.

To run a farm that uses read-only content databases

If you use SQL Server log shipping in an environment, the content databases on the secondary server can be set to be read-only. For more information about how to use log shipping, see Configure high availability (Office SharePoint Server). If you use mirroring, the mirror database is inaccessible to clients. However, it is possible to use the database indirectly by creating a database snapshot on the mirror database. The database snapshot provides clients with read-only access to the data in the database as it existed when the snapshot was created. For more information about database mirroring, see Database Snapshots.

For other scenarios, you can use the following procedure to set read-write content databases to be read-only by using SQL Server Management Studio. You can also use the Transact-SQL ALTER DATABASE statement to set content databases to be read-only. For more information, see ALTER DATABASE (Transact-SQL) (https://go.microsoft.com/fwlink/?LinkId=148619).

Important

To perform this procedure, you must be a member of the db_owner fixed database role in each database.
Do not perform this procedure on log shipped or mirrored databases.

Set a content database to be read-only

  1. Open SQL Server Management Studio.

  2. Right-click the content database that you want to change to read-only, and then click Properties.

  3. Select the Options page, and, in the Other options list, scroll to the State section.

  4. On the Database Read-Only entry, click the arrow next to False, select True, and then click OK.

  5. Repeat for all other content databases.

    Note

    When a database is set to read-only by using SQL Server Management Studio or Transact-SQL, all connections except the one that is setting the read-only flag are stopped. After the database switches to read-write, other connections are enabled.

Certain timer jobs do not work correctly in a farm that is running read-only content databases. After you configure the farm to be read-only, review the Unified Logging Service (ULS) logs. If a timer job consistently fails to complete, you might want to disable that job so that you do not have increasingly large logs in your farm. The timer jobs listed in the following procedure do not work correctly. You might encounter other jobs that do not work correctly.

Important

To perform this procedure, you must be a member of the Farm Administrators SharePoint group.

Disable timer jobs

  1. In SharePoint Central Administration, click the Operations tab.

  2. In the Global Configuration section, click Timer job definitions.

  3. For each of the following listed timer jobs, click the job in the list, click Disable, and then click OK.

    • Bulk workflow task processing

    • Change Log

    • Database Statistics

    • Dead Site Delete

    • Disk Quota Warning

    • Expiration policy

    • Hold Processing and Reporting

    • Immediate Alerts

    • Information management policy

    • Profile Synchronization

    • Quick Profile Synchronization

    • Records Center Processing

    • Recycle Bin

    • Scheduled Approval

    • Scheduled Page Review

    • Scheduled Unpublish

    • Search and Process

    • Shared Services Provider Synchronizing Job

    • Site Collection: Delete

    • Usage Analysis

    • Variations Propagate Page Job Definition

    • Variations Propagate Site Job Definition

    • Windows SharePoint Services Watson Policy Update

    • Workflow

    • Workflow Auto Cleanup

    • Workflow Failover

User experience on read-only sites

On farms that are running Office SharePoint Server 2007 with SP2, the site collection that is associated with a read-only content database is also set to be read-only. The user interface is modified so that users cannot perform tasks that require writing to the database. The elements of the user interface that are unavailable are listed in the following table.

Object Interface elements removed when read-only

Site Actions menu

Create page

Edit page

Document libraries

New menu

Upload menu

Settings menu

Lists

New menu

Settings menu

Site information and site settings

New user

Site group membership

Alert

Save as custom template

Create group

Some options that are not available in a read-only database still appear in the interface. Users will receive error messages if they attempt to perform these actions. These actions are listed in the following table.

Component or area Type of operation or action Behavior or error message

Site information and site settings

You try to change the title or the description of the site on the Change Site Title and Description: "SiteName" page.

The title is not changed. You see the SharePoint Access Denied page.

Subwebs

You try to create a subweb.

You see the SharePoint Access Denied page.

On farms that are not running Office SharePoint Server 2007 with SP2 users will receive error messages when they perform certain operations that write information to the read-only database. For detailed information about the error messages, see KB894631: Using Microsoft Windows SharePoint Services with a content database that is configured as read-only in Microsoft SQL Server (https://go.microsoft.com/fwlink/?LinkID=117362).

See Also

Other Resources

Using database mirroring (Office SharePoint Server) (white paper)