IN THIS CHAPTER
A SharePoint farm is complex, with many moving parts contributing to the functionality of the entire platform. Subsequently, the farm components need to be well maintained and monitored on a regular basis to ensure the smooth functioning of the environment. Of particular emphasis are the SQL databases that SharePoint runs on, which are often neglected but which specifically require regular maintenance and monitoring.
Fortunately for the SharePoint administrator, Microsoft includes built-in monitoring and management tools, in addition to enterprise-ready management capabilities in platforms such as Microsoft Operations Manager (MOM) 2005 and System Center Operations Manager 2007.
This chapter focuses on the specifics for monitoring and maintaining SharePoint, with particular emphasis placed on building a SQL Server maintenance plan for SharePoint, and on enterprise monitoring capabilities with MOM 2005. A discussion of other built-in monitoring and management tools is also provided.
SharePoint’s operating system, Windows Server 2003, has a built-in feature set that allows it to be easily managed remotely. This capability eases administration time, expenses, and energy by allowing administrators to manage systems from remote locations rather than having to be physically at the system.
Many tools are available to remotely manage a system. They include, but aren’t limited to, the following:
Remote Desktop for Administration, formerly known as Terminal Services Remote Administration mode, allows administrators to log on to a SharePoint server running Windows Server 2003 remotely as if they were logging on locally. This facilitates the remote administration of the entire server and reduces the amount of local administration required.
An administrator logging in to a server through Remote Administration mode can view a graphical interface just as if he was logged in at the local server. Therefore, administrators can use all the available tools and access all aspects of the server from a Terminal Services client session.
The Remote Desktop snap-in can be used to connect to multiple Terminal Services servers or computers with the Remote Desktop for Administration enabled.
Remote Desktop for Administration is disabled by default, but it can be enabled by doing the following on the server:
1. Double-click the System applet located in the Control Panel.
2. Select the Remote tab, and check Allow Users to Connect Remotely to this Computer, as shown in Figure 16.1.
Figure 16.1. Configuring remote desktop administration.
3. Click OK when prompted.
4. Administrators are now able to connect remotely to the server. You can optionally add other users by clicking the Select Remote Users button to display the Remote Desktop Users window.
5. Click Add to display the Select Users window.
6. Add the appropriate users to log on to the server.
It is highly recommended that only administrators are allowed to access the server.
7. Click OK three times to exit.
A significant add-on to Windows 2003 for network administrators is the “Remote Control Add-on for Active Directory Users and Computers.” This tool enables an administrator to right-click on a computer account in the Active Directory Users and Computers MMC and choose to remotely administer the system. The tool effectively launches a Terminal Services/Remote Desktop connection to the system.
The “Remote Control Add-on for Active Directory Users and Computers” is freely downloadable to all network administrators who are licensed for Windows Server 2003. The add-on is available at http://www.microsoft.com/windowsserver2003/downloads/featurepacks/.
Microsoft Operations Manager (MOM) 2005 is an enterprise-class monitoring and management solution for Windows environments. It is designed to simplify SharePoint server management by consolidating events, performance data, alerts, and more into a centralized repository. Reports on this information can then be tailored depending on the environment and the level of detail needed and extrapolated. This information can assist administrators and decision makers in proactively addressing SharePoint server operation and any problems that exist or might occur.
The latest version of MOM is relabeled System Center Operations Manager 2007. System Center Operations Manager improves the overall reporting and monitoring capabilities, but does not fundamentally change any of the capabilities in regards to SharePoint monitoring that are discussed in this chapter.
Microsoft Operations Manager 2005 can be further extended through the addition of the SharePoint Server Management Pack for MOM, which contains built-in event and performance analysis tools specifically written to ensure smooth functionality of a SharePoint 2007/2003 environment. Deployment of a MOM solution in a SharePoint environment would not be complete without installation of this tool.
Many other intrinsic benefits are gained by using MOM, including but not limited to
MOM 2005 is the latest version of Microsoft’s enterprise monitoring product. Previously owned by NetIQ and then sold to Microsoft, the product has evolved from the MOM 2000 version to the robust 2005 version. It has been recently rebranded as System Center Operations Manager 2007, the latest iteration of the software.
MOM provides for several major pieces of functionality as follows:
MOM architecture can be complex, but often it is as simple as a SQL database running on a server, with another server providing the management server functions of MOM. This type of server is also known as a MOM Management server.
As previously mentioned, Management Packs contain intelligence about specific applications and services and include troubleshooting information specific to those services. Shortly after the release of SharePoint Server 2007, Microsoft released two updated SharePoint Management Packs that cover both the Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server (MOSS) 2007, respectively. These Management Packs are highly recommended for MOM environments which include SharePoint.
To install$I~MOM (Microsoft Operations Manager);Management Packs;downloading> the MOSS 2007 Management Pack on a MOM Management server, first download it from the Microsoft Downloads page at the following URL:
The Windows SharePoint Services 3.0 Management Pack can be downloaded at the following URL:
http://www.microsoft.com/downloads/details.aspx?FamilyId=DB1CADF7-1A12-40F5-8EB5-820C343E48CA&displaylang=en
Or, so as to not have to type in a complicated link, simply search for the Management Packs from the Microsoft Downloads page at
http://www.microsoft.com/downloads
To install each of the Management Packs on the MOM Management Server, do the following:
Repeat the same process for the second Management Pack.
After it is extracted, the following steps can be taken to upload the Management Pack AKM files directly into the MOM Administrator Console:
1. From the MOM Server, open the MOM Administrator Console (Start, All Programs, Microsoft Operations Manager 2005, Administrator Console).
2. Navigate to the Management Packs node.
3. Click the Import/Export Management Packs link, as shown in Figure 16.2.
Figure 16.2. Beginning the SharePoint MOM Management Pack Import process.
4. At the Welcome dialog box, click Next to continue.
5. From the Import or Export Management Packs dialog box, select To Import Management Packs and/or Reports and click Next to continue.
6. From the subsequent dialog box, type in the folder (or click Browse to locate it) where the files from the previous steps were extracted, select To Import Management Packs Only, and click Next to continue.
7. From the Select Management Packs dialog box, select both SharePoint Management Packs from the list and check the To Replace Existing Management Pack radio button. Uncheck the button named Back up the existing Management Pack as there isn’t one installed. Click Next to continue.
8. Click Finish.
9. After the import has completed, click Close.
MOM Agents can be automatically pushed to servers, or they can be manually installed. Before performing a manual agent installation, however, the MOM global settings need to be modified to allow for manual agent installations. To do so, perform the following steps:
1. From the MOM Administrator Console, navigate to Administration, Global Settings.
2. Double-click on Management Servers.
3. Select the Agent Install tab.
4. Uncheck the box labeled Reject New Manual Agent Installations, as shown in Figure 16.3.
Figure 16.3. Configuring MOM Agent settings for SharePoint.
5. Click OK.
After all prerequisites have been satisfied, the actual MOM Agent installation on the SharePoint Server can begin. To start the process, do the following:
1. From the MOM 2005 CD (or a network location), double-click on the i386MOMAgent.msi file.
2. At the Welcome screen, click Next to continue.
3. At the Destination Folder dialog box, click Next to continue.
4. Fill in the Management Group Name and Management Server text boxes; the names are listed in the MOM environment. Leave the port unchanged at 1270 and the Agent Control Level at None, as shown in Figure 16.4. Click Next to continue.
Figure 16.4. Manually installing the MOM Agent.
5. Select Local System as the MOM Agent Action Account and click Next to continue.
6. Under Active Directory Configuration, select Yes if the SharePoint Server is a domain member, or select No if it is not a domain member. Click Next to continue.
7. Click Install.
8. Click Finish.
After installation, it might be necessary to wait a few minutes before processing the agent installation. After waiting, do the following to process the pending installation request:
1. From the MOM Administrator Console on the MOM 2005 server, expand Administration, Computers, Pending Actions.
2. Look for the Manual Agent Install Request from the SharePoint Server, right-click it, and choose Approve Manual Agent Installation Now, as shown in Figure 16.5.
Figure 16.5. Approving the MOM Agent install.
3. Click Yes to confirm.
After the Management Pack is installed for SharePoint and the agent has been installed and is communicating, MOM consolidates and reacts to every event and performance counter sent to it from the SharePoint Server. This information is reflected in the MOM Operations Console.
Performance data for SharePoint, such as what is shown in Figure 16.6, can also be displayed in MOM. This allows reports and performance metrics to be obtained from the farm.
Figure 16.6. Viewing server performance in MOM.
For more information on MOM 2005, see the Microsoft website at the following URL:
For SQL Server databases to perform at optimal levels, it is recommended that a SharePoint administrator conduct routine maintenance on each database. Some of these routine database tasks should involve rebuilding indexes, checking database integrity, updating index statistics, and performing internal consistency checks and backups. These routine database maintenance tasks are often overlooked because they are redundant, tedious, and time consuming. Moreover, today’s administrators are overwhelmed with many other tasks throughout the day. In recognition of these issues, Microsoft has provided a way to automate these daily database administrator (DBA) chores with a maintenance plan.
A maintenance plan performs a comprehensive set of SQL Server jobs that run at scheduled intervals. The maintenance plan conducts scheduled SQL Server maintenance tasks to ensure that databases are performing optimally, regularly backed up, and checked for anomalies. The Maintenance Plan Wizard (included with SQL Server) can be used to automatically create and schedule these daily tasks. In addition, the wizard can also configure database and transaction log backups.
A comprehensive maintenance plan includes these primary administrative tasks:
Unlike SQL Server 2000, Log Shipping can no longer be implemented via the Maintenance Plan Wizard with the 2005 version of SQL Server. Log Shipping can be configured using SQL Server Management Studio or by manually running stored procedures.
Maintaining SQL databases is a core activity for SharePoint servers. A well-maintained system requires the use of a maintenance plan that can be followed on a defined basis. Follow these steps to start the creation of a customized maintenance plan on the SharePoint SQL Server databases using the Maintenance Plan Wizard:
1. On the SharePoint database server, choose Start, All Programs, Microsoft SQL Server 2005, SQL Server Management Studio.
2. In Object Explorer, first expand the desired server, and then expand Management.
3. Right-click Maintenance Plans and choose Maintenance Plan Wizard.
4. In the Welcome to the Database Maintenance Plan Wizard screen, read the message, and then click Next.
5. In the Select a Target Server screen, enter a name and description for the maintenance plan.
6. Type the server name or browse for the server containing the SharePoint databases and then choose either Windows or SQL Server Authentication as shown in Figure 16.7. Click Next to continue.
Figure 16.7. Creating a database maintenance plan.
7. In the Select Maintenance Tasks screen, place a check on the desired maintenance tasks as shown in Figure 16.8. The following items are selected for this example: Check Database Integrity, Reorganize Index, Rebuild Index, Update Statistics, and Clean Up History.
Figure 16.8. Selecting database maintenance tasks.
When creating maintenance plans, it is a best practice not to select the option to shrink the database. The primary reason for this is that automatically shrinking databases on a periodic basis produces I/O activity which can negatively impact server production performance. Secondly, if empty space on the database is reduced, SQL Server has to re-create the empty space or auto-grow the database when it needs it. Therefore, the database constantly wastes resources by removing and adding space to the database file. Automatically shrinking the database also leads to excessive fragmentation and loss in performance. If there is a need to shrink the database size, it should be done manually when the server is not being heavily used.
8. In the Select Maintenance Task Order page, change or review the order that the tasks will be executed, and then click Next.
9. On the Define Database Check Integrity Task page, select These Databases from the dropdown menu and place a check mark on the desired SQL Server system, Reporting Server, and SharePoint-related databases as shown in Figure 16.9. Click OK. Alternatively, the All database option can be selected to generate a Database Integrity maintenance plan that runs on all SQL Server databases except for Tempdb. Accept the defaults by validating that Include indexes check is enabled in order to check the integrity of all index pages as well as table database pages. Click Next to proceed.
Figure 16.9. Specifying the databases for database integrity checks.
10. On the Define Reorganize Index Task page, select These Databases from the dropdown menu and place a check mark on the desired SQL Server system, Reporting Server, and SharePoint-related databases. Alternatively, the All Databases option can be selected to generate a Reorganize Index maintenance plan that runs on all SQL Server databases except for Tempdb. Ensure that Compact Large Objects is enabled and then click Next to proceed.
The Compact Large Objects option is equivalent to the ALTER INDEX LOB_COMPACTION = ON. This compacts data in large object (LOB) data types, such as images or text.
11. On the Define Rebuild Index Task page, select These Databases from the dropdown menu and place a check mark on the desired SQL Server system, Reporting Server, and SharePoint-related databases. Alternatively, the All Databases option can be selected to generate a Rebuild Index Task maintenance plan that runs on all SQL Server databases except for Tempdb. Accept the default settings, enable any advanced options if needed, and click Next, as shown in Figure 16.10.
Figure 16.10. Specifying the Rebuild Index Advanced Options.
12. On the Define Update Statistics Task page, select These Databases from the dropdown menu and place a check mark on the desired SQL Server system, Reporting Server, and SharePoint-related databases. Alternately, the All Databases option can be selected to generate an Update Statistics Task maintenance plan that runs on all SQL Server databases except for Tempdb. Accept the default settings, and click Next.
The Update options at the bottom of the screen identify the type of statistics that are to be updated. If the All Existing Statistics option is selected, statistics for both indexes and columns are updated. Statistics on columns exist if the AUTO CREATE STATISTICS option has been set to ON or the statistics were manually created. The other two update options on the screen enable you to focus statistic updates to columns only or indexes only.
13. In the Define Cleanup History Task page, select the historical data to delete options such as Backup and Restore History, SQL Server Agent Job History, and Maintenance Plan History. Configure the age after which historical data will be deleted based on the organization’s retention requirements, as shown in Figure 16.11, and then click Next.
Figure 16.11. Define Cleanup History tasks and retention.
14. One of the greatest features of the maintenance plans is the capability to schedule them. In the Select Plan Properties page, click Change to define a schedule for the maintenance plan. In the New Job Schedule window, enter a name for the schedule, frequency, and the time at which the job should commence, as shown in Figure 16.12. Click OK and then Next to continue.
Figure 16.12. Scheduling the database maintenance plan.
15. The Reports to Generate screen provides the option to create a status report based on the outcome of the maintenance plan and save it to disk or email it to an operator. In addition, a report retention period can be set. On this screen, check the Write Report to a Text File in Directory box. Then specify the location of the file that will contain the report. Click Next.
16. At the Complete the Wizard page, summarizes the options selected in the Maintenance Plan Wizard. Review the options selected, and click Finish to close the summary page.
17. The maintenance plan is then created. Click Close to end the Maintenance Plan Wizard.
All maintenance plans can be viewed under the Maintenance Plan folder in SQL Server Management Studio and stored in SQL Server as jobs. They require the SQL Server Agent to be running to launch the job at the scheduled interval. If the SQL Server Agent is off, the jobs do not commence. In addition, all jobs can be edited or changed for ongoing support or maintenance.
One major difference between SQL Server 2005 and SQL Server 2000 is that the scheduled job for the maintenance plan in SQL Server 2005 executes an SSIS package. The scheduled job in SQL Server 2000 utilized the SQLMAINT utility instead.
Follow these steps to view the maintenance plan jobs in SQL Server Enterprise Manager:
Figure 16.13. Viewing maintenance plan scheduled jobs.
If the SQL Server Agent is not running, a dialog box appears stating that the SQL Server Agent on the target server is not running. The SQL Server Agent must be started for SQL Server jobs to commence. Follow these steps to start the SQL Server Agent:
Figure 16.14. Restarting the SQL Server Agent.
Maintaining SharePoint systems isn’t an easy task for administrators. They must find time in their fire-fighting efforts to focus and plan for maintenance on the server systems. When maintenance tasks are commonplace in an environment, they can alleviate many of the common fire-fighting tasks.
The processes and procedures for maintaining Windows Server 2003 systems can be separated based on the appropriate time to maintain a particular aspect of SharePoint. Some maintenance procedures require daily attention, whereas others may require only yearly checkups. The maintenance processes and procedures that an organization follows depend strictly on the organization; however, the categories described in the following sections and their corresponding procedures are best practices for organizations of all sizes and varying IT infrastructures.
These tasks are recommended in addition to those examined earlier in this chapter.
Certain maintenance procedures require more attention than others. The procedures that require the most attention are categorized as daily procedures. It is recommended that an administrator take on these procedures each day to ensure system reliability, availability, performance, and security. These procedures are examined in the following three sections.
Although checking the overall server health and functionality might seem redundant or elementary, this procedure is critical to keeping the system environment and users working productively.
Some questions that should be addressed during the checking and verification process are the following:
To provide a secure and fault-tolerant organization, it is imperative that a successful backup be performed every night. In the event of a server failure, the administrator may be required to perform a restore from tape. Without a backup each night, the IT organization is forced to rely on rebuilding the SharePoint server without the data. Therefore, the administrator should always back up servers so the IT organization can restore them with minimum downtime in the event of a disaster. Because of the importance of the tape backups, the first priority of the administrator each day needs to be verifying and maintaining the backup sets.
If disaster ever strikes, the administrators want to be confident that a system or entire farm can be recovered as quickly as possible. Successful backup mechanisms are imperative to the recovery operation; recoveries are only as good as the most recent backups.
Although Windows Server 2003’s or SharePoint’s backup programs do not offer alerting mechanisms for bringing attention to unsuccessful backups, many third-party programs do. In addition, many of these third-party backup programs can send emails or pages if backups are successful or unsuccessful. Although these third-party utilities offer additional functionality, they do not currently offer document-level restore capability. Future iterations of backup software will be able to perform these functions, however.
The Event Viewer, shown in Figure 16.15, is used to check the system, security, application, and other logs on a local or remote system. These logs are an invaluable source of information regarding the system. The following event logs are present for SharePoint servers running on Windows Server 2003:
Figure 16.15. Using the Event Viewing utility.
All Event Viewer events are categorized either as informational, warning, or error. Logs show events of the types shown in Figure 16.16.
Figure 16.16. Displaying event types.
Checking these logs often helps to understand them. Some events constantly appear but aren’t significant. Events will begin to look familiar, so it will be noticeable when something is new or amiss in event logs. It is for this reason that an intelligent log filter such as MOM 2005 is a welcome addition to a SharePoint environment.
Some best practices for monitoring event logs include
To simplify monitoring hundreds or thousands of generated events each day, the administrator should use the filtering mechanism provided in the Event Viewer. Although warnings and errors should take priority, the informational events should be reviewed to track what was happening before the problem occurred. After the administrator reviews the informational events, she can filter out the informational events and view only the warnings and errors.
To filter events, do the following:
Some warnings and errors are normal because of bandwidth constraints or other environmental issues. The more logs are monitored, the more familiar an administrator should be with the messages and therefore will be able to spot a problem before it affects the user community.
You may need to increase the size of the log files in the Event Viewer to accommodate an increase in logging activity.
Maintenance procedures that require slightly less attention than daily checking are categorized in a weekly routine and are examined in the following sections.
Disk space is a precious commodity. Although the disk capacity of a Windows Server 2003 system can seem virtually endless, the amount of free space on all drives should be checked daily. Serious problems can occur if there isn’t enough disk space.
One of the most common disk space problems occurs on database drives where all SQL SharePoint data is held. Other volumes such as the system drive and partitions with logging data can also quickly fill up.
As mentioned earlier, lack of free disk space can cause a multitude of problems including, but not limited to, the following:
To prevent these problems from occurring, administrators should keep the amount of free space to at least 25%.
If needing to free disk space, files and folders should be moved or deleted with caution. System files are automatically protected by Windows Server 2003, but data files are not.
Hardware components supported by Windows Server 2003 are reliable, but this doesn’t mean that they’ll always run continuously without failure. Hardware availability is measured in terms of mean time between failures (MTBF) and mean time to repair (MTTR). This includes downtime for both planned and unplanned events. These measurements provided by the manufacturer are good guidelines to follow; however, mechanical parts are bound to fail at one time or another. As a result, hardware should be monitored weekly to ensure efficient operation.
Hardware can be monitored in many different ways. For example, server systems may have internal checks and logging functionality to warn against possible failure, Windows Server 2003’s System Monitor may bring light to a hardware failure, and a physical hardware check can help to determine whether the system is about to experience a problem with the hardware.
If a failure occurs or is about to occur on a SharePoint server, having an inventory of spare hardware can significantly improve the chances and timing of recoverability. Checking system hardware on a weekly basis provides the opportunity to correct the issue before it becomes a problem.
The three event logs on all servers can be archived manually, or a script can be written to automate the task. You should archive the event logs to a central location for ease of management and retrieval.
The specific amount of time to keep archived log files varies on a per-organization basis. For example, banks or other high-security organizations may be required to keep event logs up to a few years. As a best practice, organizations should keep event logs for at least three months.
Organizations who deploy Microsoft Operations Manager with SharePoint can take advantage of MOM’s capability to automatically archive event log information, providing for a significant improvement to monitoring and reporting of SharePoint.
When an understanding of the maintenance required for SharePoint is obtained, it is vital to formalize the procedures into documented steps. A maintenance plan itself can contain information on what tasks to perform at different intervals. It is recommended to perform the tasks examined in the following sections on a monthly basis.
CHKDSK scans for file system integrity and can check for lost clusters, cross-linked files, and more. If Windows Server 2003 senses a problem, it runs CHKDSK automatically at startup.
Administrators can maintain FAT, FAT32, and NTFS file system integrity by running CHKDSK once a month. To run CHKDSK, do the following:
An uninterruptible power supply (UPS) can be used to protect the system or group of systems from power failures (such as spikes and surges) and keep the system running long enough after a power outage so that an administrator can gracefully shut down the system. It is recommended that a SharePoint administrator follow the UPS guidelines provided by the manufacturer at least once a month. Also, monthly scheduled battery tests should be performed.
Once a month, an administrator should validate backups by restoring the backups to a server located in a lab environment. This is in addition to verifying that backups were successful from log files or the backup program’s management interface. A restore gives the administrator the opportunity to verify the backups and to practice the restore procedures that would be used when recovering the server during a real disaster. In addition, this procedure tests the state of the backup media to ensure that they are in working order and builds administrator confidence for recovering from a true disaster.
An integral part of managing and maintaining any IT environment is to document the network infrastructure and procedures. The following are just a few of the documents you should consider having on hand:
As systems and services are built and procedures are ascertained, document these facts to reduce learning curves, administration, and maintenance.
It is not only important to adequately document the IT environment, but it’s also often even more important to keep those documents up-to-date. Otherwise, documents can quickly become outdated as the environment, processes, and procedures change as the business changes.
As the name implies, quarterly maintenance is performed four times a year. Areas to maintain and manage on a quarterly basis are typically fairly self-sufficient and self-sustaining. Infrequent maintenance is required to keep the system healthy. This doesn’t mean, however, that the tasks are simple or that they aren’t as critical as those tasks that require more frequent maintenance.
Storage capacity on all volumes should be checked to ensure that all volumes have ample free space. Keep approximately 25% free space on all volumes.
Running low or completely out of disk space creates unnecessary risk for any system. Services can fail, applications can stop responding, and systems can even crash if there isn’t plenty of disk space.
Keeping SQL Database disk space consumption to a minimum can be accomplished through a combination of limiting document library versioning and/or implementing site quotas.
Administrator passwords should, at a minimum, be changed every quarter (90 days). Changing these passwords strengthens security measures so that systems can’t easily be compromised. In addition to changing passwords, other password requirements such as password age, history, length, and strength should be reviewed.
Table 16.1 summarizes some of the maintenance tasks and recommendations examined in this chapter.
Table 16.1. SharePoint Server 2007 Maintenance Tasks
Although SharePoint administrators can easily get caught up in daily administration and fire fighting, it’s important to structure system management and maintenance to help prevent unnecessary amounts of effort. Following a management and maintenance regimen reduces administration, maintenance, and business expenses while at the same time increasing reliability, stability, and security.