Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

SQL Server 2008 : Configuring the Instance (part 1) - Viewing Configuration Settings & Specifying Maximum and Minimum Server Memory

6/26/2011 4:06:25 PM
Another important aspect of post-installation involves configuring the instance(s) of your SQL Server. Configuring SQL Server focuses on modifying settings or options to help SQL Server perform optimally. Throughout this section, our objective is to discuss some of our favorite configurable options. The intention is not to configure your environment; however, we would like to provide you with enough information about the settings so you can make intelligent decisions to meet your application's needs.

Before starting the configuration discussion, we would like to point out that there are generally two methods of modifying configuration options in SQL Server: You can use the SQL Server Management Studio GUI interface, or you can invoke the stored procedure sp_configure in a query window. When both methods of amending a configuration option exist, we will show you both the GUI version and code version for the change.

1. Viewing Advanced Options

By default, SQL Server does not let you view all of the available configuration options. You are initially limited to the most basic choices. Thus the first command to run in your query window is the following:

sp_configure 'show advanced options', 1;GO reconfigure

This statement allows us to view the advanced options when executing the sp_configure query. That way, we can ensure all the options discussed in subsequent subsections are viewable.

2. Viewing Configuration Settings

There are three basic methods of viewing the configuration options and their minimum, maximum, and currently configured value:

  • Executing the stored procedure sp_configure

  • Querying the sys.configurations system view

  • Right-clicking on the instance name and selecting Properties from the pop-up menu

Figure 1 displays the results of executing the sp_configure stored procedure.

Figure 1. A snapshot of the results of sp_configure

Figure 2 shows the results of querying the sys.configurations system view.

Figure 2. The results of the sys.configurations system view

Figure 3 shows the Server Properties window.

Figure 3. A sample of the Server Properties window

Visually, you can easily identify the similarities and differences among the screenshots. We encourage you to review the results of the sys.configuration system view. The system view provides you with similar information as the other views, with the advantage of a description of the configuration option. After reviewing the descriptions, you should have a better understanding of the usages of the option and determine if you need to do more research before enabling or disabling the option.

ALLOWING UPDATES TO SYSTEM TABLES

The Allow Updates configuration option exists in SQL Server 2000 solely to allow administrators to update system tables. Even though that configuration option still exists in SQL Server 2008, the ability to directly update system tables is no longer supported. Executing sys.sp_configure 'allow updates', 1 will run and complete successfully, although it provides no additional functionality to the user. When you attempt to reconfigure the server, the reconfiguration will fail (if WITH OVERRIDE is not specified), informing you that updates to the system catalog are not supported. Plan to remove the Allow Updates configuration option from all scripts and processes because it may be removed from a future version of SQL Server.


3. Specifying Maximum and Minimum Server Memory

Determining the maximum and minimum amounts of memory each instance of SQL Server requires can be easy or complex, depending on the server and what applications are running on it. If you have a single instance of SQL Server on a server without any other applications (excluding applications like virus scan and other essential apps), then you want to dedicate as much memory as possible to SQL Server while still leaving enough memory for the operating system to run effectively. Depending on the amount of memory that server has, we generally like to leave at least 1 or 2 GB for Windows. Figure out the best setting for maximum memory where both SQL Server and the operating system are happy.

You can specify memory allocation from the Memory section of the Server Properties dialog for your instance (see Figure 4). You can see that the minimum server memory has been left at 0 MB, whereas the maximum has been set at 8192 MB (which is 8 GB).

Figure 4. The Memory section of the Server Properties dialog

You also have the option to invoke a stored procedure to specify memory allocation. The following invocation of sys.sp_configure requests the same 0 to 8192 MB allocation as was shown in Figure 4:

XEC sys.sp_configure N'max server memory (MB)', N'8192'
GO

Configuring your maximum amount of memory on servers that have multiple instances of SQL Server or other applications will increase the complexity and importance of your task. Do not forget that SQL Server is a memory hog; it allocates as much memory to the buffer as needed to process or handle the workload. If you have multiple instances of SQL Server reserving memory without restrictions or limitations, then one instance will likely be starved or not have as much memory as it needs. To help eliminate that as a potential problem, you should set minimum and maximum memory allocations.

When determining the maximum amount of memory for each instance, we usually revert to the requirements documentation for information about the applications that will be running on each instance. During the pre-installation phase, you gather information about the number of users, the anticipated transaction per second, the size of the databases, and so on. With that information, settle on the amount of maximum memory that you want to allocate to each instance. When the applications are highly similar in terms of transactions per second, database sizes, and the like, you should divide the memory equally among the instances after leaving a couple of gigabytes for the operating system. Once you have set up the maximum memory configuration, you do not have to worry about one instance starving another.

The minimum amount of memory is usually easy to configure and does not require as much consideration. The primary purpose of setting the minimum memory configuration on a server that has multiple instances is to ensure that an instance has enough memory to perform as expected. SQL Server will only use the amount of memory needed to process requests from the applications. When all the memory of one instance is not being utilized, that instance may release memory back to the operating system, and another instance could reserve the memory. If the other instance is using the memory and no available memory remains for the instance that released the memory, then that first instance of SQL Server will perform poorly. Setting the minimum memory option will ensure that an instance does not release too much of its memory.

NOTE

SQL Server does not acquire all of the memory in the maximum or minimum memory configuration settings immediately when the instance starts. The minimum memory setting ensures that an instance, having acquired more than the minimum, does not reduce its memory below the minimum that you specify. However, the minimum memory setting does not force the instance to acquire that much memory at startup.

Other -----------------
- Microsoft PowerPoint 2010 : Expanding PowerPoint Functionality - Loading and Unloading Add-ins
- Microsoft PowerPoint 2010 : Expanding PowerPoint Functionality - Viewing and Managing Add-ins
- Microsoft Dynamics CRM 2011 : Sending and Tracking Email Messages in Microsoft Dynamics CRM for Outlook
- Microsoft Dynamics CRM 2011 : Using Microsoft Dynamics CRM for Outlook - Using the Add Contacts Wizard
- Microsoft Dynamics CRM 2011 : Using Microsoft Dynamics CRM for Outlook - Creating and Tracking Contacts
- Windows Server 2008 R2 : Managing Disks and Disk Storage - Understand the Basics (part 2) - Work with Partitions & Use DiskPart
- Windows Server 2008 R2 : Managing Disks and Disk Storage - Understand the Basics (part 1) - Work with Your Storage
- SharePoint 2010 : Securing a SharePoint Farm
- SharePoint 2010 : Introducing SharePoint Security
- SQL Server 2008 : SQL Server Configuration Manager (part 2) - SQL Server Network Configuration
- SQL Server 2008 : SQL Server Configuration Manager (part 2) - SQL Server Network Configuration
- SQL Server 2008 : SQL Server Configuration Manager (part 1) - SQL Server Services
- BizTalk 2009 : WCF LOB Adapter SDK - WCF LOB Adapter Vivisected
- BizTalk 2009 : WCF LOB Adapter SDK - WCF LOB Adapters vs. WCF Services
- BizTalk 2009 : Understanding the WCF LOB Adapter
- SQL Server 2008 High Availability : Database Clustering
- SQL Server 2008 High Availability : Database Mirroring (part 2) - SharePoint and Database Mirroring
- SQL Server 2008 High Availability : Database Mirroring (part 1) - How to Configure Database Mirroring
- Sharepoint 2010 : SharePoint Disaster Recovery Testing and Maintenance
- Microsoft PowerPoint 2010 : Working Together on Office Documents - Publishing Slides to a SharePoint Library
 
 
Most view of day
- Microsoft Exchange Server 2013 : Mailbox management - Seeking perfection halts progress (part 3) - Changing EAC columns
- Microsoft Exchange Server 2010 : Getting Started with Email Archiving - Enabling Archiving (part 2) - Using Exchange 2010 Discovery, Offline Access
- SQL Server 2012 : Latches and Spinlocks - Symptoms (part 1) - Recognizing Symptoms
- Sharepoint 2013 : New Installation and Configuration - Choosing the Installation Type
- Microsoft Visio 2010 : Working with Individual Shapes - Copying and Duplicating Shapes
- Microsoft Dynamics CRM 4.0 : Silverlight - Tools and Resources
- Maintaining Security : Monitoring Your Security Settings, Configuring the Windows Firewall
- Microsoft Dynamics GP 2010 : Improving performance by adjusting AutoComplete settings, Cleaning up Accounts Receivable with Paid Transaction Removal
- SQL Server 2012 : Running SQL Server in A Virtual Environment - VIRTUALIZATION CONCEPTS
- Installing and Configuring the Basics of Exchange Server 2013 for a Brand-New Environment (part 5)
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro