SQL Server

...now browsing by category

 

White Paper Wednesday: More SharePoint and Microsoft Resources

Wednesday, June 6th, 2012

By Chris Knotts, PMP – ASPE Creative Director

Over the recent months, a couple of our White Paper Wednesdays have focused on SharePoint and other enterprise Microsoft tools. Both were pretty popular, and since both topics are specialties of ours, we’re glad to announce that today’s White Paper Wednesday will once again focus on Microsoft resources. We include two new SharePoint pieces: Customization Best Practices and how to use Workflows (we show you setup procedure step-by-step).

We also have two additional Microsoft white papers on SQL Server 2012 and Windows Server “Sysinternals” tools. For system admins, the Sysinternals white paper is particularly interesting, with great tips on freeware for administrating your Windows environment.

We hope you find this information useful, and as always: thanks for joining us for White Paper Wednesday.

These four white papers are brought to you in conjunction with Global Knowledge.

Download all four white papers now

Click to continue »

SQL Server Performance: The Resource Governor

Tuesday, September 20th, 2011

The Resource Governor is new to SQL Server 2008 and provides an internal mechanism for the control and management of resource consumption by connections and processes. In the past, we used the external Windows System Resource Manager (WSRM) to get any reasonable amount of control over resource management. Now, with the Resource Governor, most resource management tasks can be handled within SQL Server 2008 itself.

The Resource Governor is comprised of resource pools, workload groups, and classifications. Resource pools collect the physical resources of the server and allow them to be used for assignment to workload groups. Microsoft suggests that a resource pool can be thought of as a virtual SQL Server inside the real SQL Server instance. The workload groups are collections of connections based on classification. To make it clear, when a user connects to the SQL Server 2008 instance that is using the Resource Governor, the connection is classified and based on that classification it is placed in a single workload group. The workload group belongs to one and only one resource pool. The resource pool has limits on the consumption of physical resources that it can perform. The end result is fine control over the level of impact that a given user connection can have on the server. Click to continue »

SQL Server Performance: Indexes Do Not Always Solve the Problem

Tuesday, September 13th, 2011

It is a common myth that indexes improve performance. A more accurate statement is that properly planned indexes improve performance. Randomly created indexes actually decrease performance because they do not serve a purpose. When you create indexes that are not used to service queries, the following negative results occur:

  • The database size is increased without the addition of useful data.
  • Maintenance windows are increased because unused indexes must be maintained.
  • Drive failures may occur sooner because disk activity is increased for the creation and maintenance of the indexes.
  • Write operations may be drastically slower.

Click to continue »

SQL Server Performance: Blocks and Deadlocks

Monday, August 29th, 2011

In SQL Server, a block occurs when a process has a lock on a resource (a table or row in a database) that will not allow other processes to use that resource and another process’ attempts to use it. This behavior is a normal part of database operations and will impact the number of users that you can support concurrently. When blocking is minimized and server resources are sufficient enough to have a larger number of users connected and functioning, this is called high concurrency. When a high level of blocking occurs or server resources are insufficient so that you can support very few users, this is called low concurrency. Click to continue »

Web Seminar Recap: Taking a Look at Service Pack 1 for Sever 2008 R2 and Windows 7

Thursday, April 21st, 2011

Microsoft has finally rolled out Service Pack 1 for Sever 2008 R2 and Windows 7.  Along with providing continuing improvements to the Windows Operating System (OS), SP1 will help maintain and keep your PC up-to-date, send constant updates to the Windows 7 platform, swiftly carry out collective updates all at once, meet your users’ requirements for better business mobility, provide a complete set of virtualization innovations, and offer an easier Service Pack deployment model for better IT efficiency.  On Tuesday, April 12th, ASPE Instructor Anthony Ungruhe presented the free web seminar “Taking a Look at Service Pack 1 for Server 2008 R2 and Windows 7.”  In this web seminar, Anthony examined the powerful new features supplied by SP1, including Dynamic Memory and RemoteFX, and the improvements it’s made since the last SP.  Listen to the recording of this web seminar in its entirety by clicking View Event Recordings (at the top right).  Learn how Service Pack 1 affects your server and clients.

SQL Server Performance: Dealing with High Processor Utilization

Thursday, March 10th, 2011

Microsoft’s SQL Server is an excellent database management system and it offers many features for simplified management. However, the out-of-the-box performance is not always acceptable and you may have to tune the system for specific scenarios. If you are experiencing high processor utilization on a SQL Server installation (which can be determined through the Task Manager, Resource Monitor or Performance Monitor), you can tune the system in three ways:

  1. Install more processing power
  2. Tweak the server settings
  3. Optimize the databases

I won’t spend a lot of time on the first option in this post. Installing more processing power is a hardware issue (unless you are virtualizing your SQL Server) and should be considered a last resort. We want to tweak and tune our way to better performance when we can so that we avoid excessive hardware costs.

Tweaking server settings is mostly performed through SQL Server Management Studio (SSMS) and various Windows Server administration tools. When tuning a SQL Server for improved performance, you cannot forget the Windows Server on which it runs. Let’s start there.

Tuning the server begins with service management. You want to disable any unnecessary services. This includes SQL Server services. For example, if you are not running any named instances, make sure the SQL Server Browser service is not running. It is only used to resolve instance names to TCP ports and is unnecessary when only a default instance is used. Check your services (by running services.msc from the Start > Run dialog (on Windows Server 2003 R2 and earlier) or run it from the Start > Search field) and ensure that no unnecessary services are running.

Interestingly, to ensure you get acceptable processor performance, make sure you have sufficient RAM in the system. When you have insufficient RAM, virtual memory must be used. Reading and writing data from and to hard drives is an I/O intensive task, but it can also become processor intensive. Before you assume your processor is too slow for the job, make sure it has enough memory.

I like to use a simple analogy to illustrate this. Think of the processor (or CPU, if you prefer) as the worker. Think of the RAM as the worker’s skill set. Imagine the worker has won gold medals at the Olympics for several race categories. He is now working for a manufacturing company as an assembler. If the worker lacks the appropriate skill set, he will struggle to get the job done in a timely manner, regardless of how “fast” he is. In the same way, the fastest processors in the world can hit a performance roadblock if they are not provided with sufficient supporting resources, including RAM.

The next step for improving processor performance is to tweak the actual SQL Server instance settings. You can begin by viewing your current configuration settings. This can be done by right-clicking on the server you want to manage in SSMS and selecting Properties. From here, you will navigate through the different pages to see all the settings. Alternatively, you can open a New Query windows in SSMS and then execute the sp_configure command with no parameters. This will dump your configuration settings as a query result set. You will see the setting name, minimum and maximum values, the config_value and the run_value. The minimum value is the smallest value to which the setting may be set. The maximum value is the largest value to which it may be set. The config_value is the value stored for the named setting and the run_value is the current value in effect (this may be different than the stored configuration).

To change any configuration setting, modify it in the GUI of SSMS or using the sp_configure command with the following syntax:

sp_configure setting_name, setting_value

After executing the sp_configure command, you will have to execute the RECONFIGURE WITH OVERRIDE command. For example, to turn off nested triggers, execute the following code:

sp_configure ‘nested triggers’, 0
go
reconfigure with override
go

Some of the settings that you should consider modifying for processor performance impact are:

Because I do not want to repeat useful information in this post, I’ve linked to MSDN blog posts that describe each of the above referenced settings. However, I should clarify why one particular setting is included in the list and that is the default trace enabled setting. This is a trace log file that is enabled by default. If you are really seeking to tune the SQL Server for the best performance results you can get, all logging (aside from security logs) should be disabled. You can always turn this log back on before making large scale configuration changes or to troubleshoot a recurring problem.

Now, the last component is database optimization. In this post, I will not go into details on database optimization because I will address it in a separate post. For now, just know that proper indexing results in improved performance; however, improper indexing results in poor performance. To blindly create random indexes is to beg for a performance disaster. Ok, that’s a hint. In my next post, I’ll explain why this is true. Until then, be sure to read through the posted articles I’ve referenced here and learn who you can tune these settings to improve your SQL Server performance.

By: Tom Carpenter has been working in IT for almost 20 years and has been training since 1997. He has written several books on various certification technologies such as network infrastructure technologies as well as server administration, SQL server, and will soon be releasing a book on SharePoint. Tom has taught over 30,000 students and currently teaches Windows 7 administration courses, Server administration courses, and Microsoft SQL Server administration courses.

SQL Server Performance Tuning Myths

Tuesday, February 22nd, 2011

As a SQL Server administrator, performance tuning is a large part of your responsibility. Regardless of the version you’re using (SQL Server 2005, 2008 or 2008 R2), you can do many things to improve the performance of the server over the out-of-box installation. Additionally, you can do many things to improve the performance of specific databases. Over the next few weeks, I’ll be posting about performance tuning for the server, specific databases and even specific queries. In this post, I’d like to begin by dispelling some myths of performance tuning that float around in the industry.

Three myths seem to persist in the area of performance tuning:

  • If processor utilization is high, I need a faster processor.
  • The greatest impact on performance is determined by the application code.
  • An optimized server is the only key to database server performance.

I’ll explore each of these myths and explain why they are wrong and what the alternate truth actually is.

High Processor Utilization

When you analyze processor utilization and it averages more than 60-70 percent utilized, it can be an indicated of poor performance. However, administrators often assume that an over-utilized processor is best repaired by installing a faster processor. This may not be the case. For example, if you have insufficient RAM in the server, much processor time will be utilized managing virtual memory. Data must be read from RAM and placed on the hard disk and from the hard disk and placed into RAM. All of this swapping is performed by the processor.

The point is that the myth of a single point of pain in performance analysis is rarely true. Instead, one thing is seldom the culprit. When performing analysis, you should always analyze the following hardware components at a minimum:

  • Memory
  • CPU
  • Storage
  • Networking

In some very rare cases, monitoring video performance may be important on a server, but most video demands are on clients these days. If you analyze the four listed items, you’re more likely to locate the real performance issue than if you analyze only one thing. Remember, you’re dealing with a system and not a single component.

Application Code

The second myth indicates that a well-written application will always perform well. This statement is simply untrue. Instead, a well-written application that accesses a well-designed database across a well-planned network will perform well. My point is that we must carry the systems thinking of the first myth into this second myth and even the third.

Yes, you do want well-written applications; however, a poorly written application running against a well-designed database will often perform better than a well-written application running against a poorly designed database. The point is that you should be careful to design the database so that it supports the intended applications that will access the data within.

Optimized Servers

The final myth suggests that an optimized server is the only thing that matters when it comes to database server performance. We’ve already seen that this is untrue. You must have a well-designed database running on that properly optimized server. However, there is still more that you must do. Even with the fasted servers on the planet and the best designed database, performance will be poor if the users’ network connections to the server are not well designed.

If you haven’t caught my hints so far, the three myths all have the same solution. You must treat your database server implementations as a system. The system includes the database, the user application and everything in between. This means that you must ensure acceptable performance at the server, at the client and on the network in between. If you approach performance form a systems mindset, you are far more likely to locate the real performance problem in any analysis scenario.

In future posts, I’ll help you explore different areas of this system. You’ll learn how to look for performance problems, how to resolve them and how to prevent them. Until then, put on those systems thinking hats and start analyzing your SQL Server solutions.

By: Tom Carpenter has been working in IT for almost 20 years and has been training since 1997. He has written several books on various certification technologies such as network infrastructure technologies as well as server administration, SQL server, and will soon be releasing a book on SharePoint. Tom has taught over 30,000 students and currently teaches Windows 7 administration courses, Server administration courses, and Microsoft SQL Server administration courses.

Hardware Inventory Reports for Windows 7 Deployment

Wednesday, September 15th, 2010

ASPE-IT instructor Tom Carpenter starts a series of posts on Windows 7 deployment:

Many small and medium businesses lack a good hardware inventory management tool. Even larger companies often fail to inventory their hardware in detail. By hardware inventory, I mean a detailed database of computers and the components in those computers. For example, do you know which machines in your environment are ready to support Windows 7? Do you know which machines can be upgraded through memory or hard drive upgrades in order to run Windows 7 efficiently? Do you know which machines must be replaced because they cannot run Windows 7? Click to continue »