IT tutorials
 
Applications Server
 

Microsoft Lync Server 2013 : SQL Server Dependencies - Maintaining the Lync SQL Databases

2/3/2015 7:21:29 PM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire

Maintaining the Lync SQL Databases

An important aspect of the health of any Lync deployment is maintaining the Lync SQL databases. To keep Lync Server operating smoothly and with optimal performance, regular maintenance should be performed on each SQL Server database. Such maintenance tasks include rebuilding indexes, checking database integrity, updating index statistics, and performing internal consistency checks and backups. Database maintenance tasks can be performed either by executing Transact-SQL commands or by running the Database Maintenance Wizard.

This section provides information and recommendations for maintaining the databases that store Lync Server data and configurations. Also, details are provided on how to automate and schedule the major maintenance tasks by creating database maintenance plans through SQL Server Database Maintenance Wizard.

Checking and Repairing Database Integrity

DBCC CHECKDB is a Transact-SQL command that is frequently used for checking the logical and physical integrity of databases. Essentially, DBCC CHECKDB is a superset command that actually runs three checks (CHECKALLOC, CHECKTABLE, and CHECKCATALOG) by issuing a single command.

The following are some recommendations for using DBCC CHECKDB to check and repair SQL database integrity:

• Always ensure that recent backups are on hand before running the command.

• Generally it is better to run the DBCC CHECKDB superset command than to execute the individual operations, because this will serve to identify the majority of the errors and is generally safe to run in a production environment.

• After DBCC CHECKDB has been run, the command can be run again with the REPAIR argument to repair reported errors. However, consideration should also be given to restoring the database from backup instead, because the REPAIR options should be considered a last resort.

DBCC CHECKDB can require a considerable amount of time to run against large databases, and it performs schema locks that prevent metadata changes. Therefore, it is highly recommended to run the command during nonproduction hours.

• For large databases, the command can be run with the PHYSICAL_ONLY option, which will limit checking to the integrity of the physical structure of the page and record headers, along with the allocation consistency of the database. For these larger databases, it is therefore recommended to run the command with the PHYSICAL_ONLY option on a more frequent basis, and perform a full run of DBCC CHECKDB only on a periodic basis.

Monitoring and Reducing Fragmentation

Although indexes can speed up the execution of queries, there is also some overhead associated with them. Indexes consume extra disk space and require some time to be updated whenever any data is updated, deleted, or inserted in a table. When indexes are first built, little or no fragmentation is present. Over time, as data is inserted, updated, and deleted, fragmentation levels on the underlying indexes can begin to increase.

When a data page is completely full and further data must be added to it, a page split occurs. To make room for the new data, SQL Server creates another data page somewhere else in the database (not necessarily in a contiguous location) and moves some of the data from the full page to the newly created one.

The effect of this is that the blocks of data are logically linear but physically fragmented. Therefore, when searching for data, the database engine is forced to jump from one page to somewhere else in the database looking for the next page it needs, instead of just sequentially moving to the next physical page. The end result is performance degradation and inefficient space utilization.

The fragmentation level of an index is the percentage of blocks that are logically linear and physically nonlinear. In SQL Server versions starting with SQL Server 2005, the sys.dm_db_index_physical_stats transact-SQL command can be used to monitor this, with the avg_fragmentation_in_percent column showing the fragmentation level. The value for avg_fragmentation_in_percent should be as close to zero as possible for maximum performance. However, up to 10% might be acceptable without noticeable degradation.

Shrinking Data Files

In SQL Server 2005 and above, free space can be reclaimed from the end of data files to remove unused pages and recover disk space. However, shrinking data files is not recommended unless the database has lost at least half of its data. This typically occurs after an activity has been performed that creates whitespace in the database, such as moving a large amount of data from one database to another, or deleting a large amount of data. Shrinking Lync Server databases is generally not recommended, since there are typically not enough deletions to cause a significant amount of free space.

 
Others
 
- Microsoft Lync Server 2013 : SQL Server Dependencies - SQL Backup Procedures - Backing Up SQL Using SQL Server Management Studio
- Microsoft Lync Server 2013 : SQL Server Dependencies - SQL Backup Procedures - Backing Up SQL Using Windows Server Native Backup
- Microsoft Lync Server 2013 : SQL Server Dependencies - Lync Database Requirements, Installing SQL Server for Lync
- Active Directory 2008 : Publishing Active Directory Objects (part 2) - Publishing Shared Folders, Querying Active Directory
- Active Directory 2008 : Publishing Active Directory Objects (part 1) - Publishing Printers
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 6) - Disposing of SharePoint Variables
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 5) - Working with Objects Below the Web Level
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 4) - Working with Webs
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 3) - Working with Site Collections
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 2) - Web Applications
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS