Troubleshooting & Testing / SQLdiag Tool
Subtitles of the Movie
Microsoft has created a diagnostic tool for SQL server that allows you to gather information regarding various server services. It was initially intended for use by Microsoft support engineers. When we talk about working with a diagnostic tool, we are talking about collecting information about the server and have it written to a text file. The diagnostic tool is introduced in Server 7.0. The concept is to use it to monitor database servers for problems. Originally, it was actually created to provide the necessary information for Microsoft customer support calls. However, it's a wonderful tool that gathers useful information for troubleshooting a problem. It actually collects the information and stores it in a text file. A text file is located in the log directory for a SQL server. Now this file will contain the server error logs, registry data, file versions, configuration data, et cetera The concept behind the tool itself is to use it as a Command Line utility. It is when you run this Command Line utility that you will actually gather the information about your server and it will be collected from several sources. The idea is to combine it into one file that can be readily gone through and analyzed for troubleshooting purposes. Let's switch over to a Command Line prompt. At the Command Line, I will simply type in SQLdiag and then hit my Enter key. Now, I have already run this tool, which is what it is telling me in the message and it simply wants to know if I wanna overwrite it, which is yes. I'll select Yes, hit Enter and you'll notice now it's telling me that the collection will be starting. At the time the collection has started, I can simply let it run. Now, keep in mind, this could be a time consuming process. It's even possible to have this setup in the background where it is constantly monitoring it. For our purposes, I'm going to stop it by pressing Ctrl C. Now, we'll want to know what the collector has given us, what are the results of this particular run through on the program itself? Here I'm going to once again switch over and this time look at the text file. The text file now is a detailed explanation of everything on the server. It will tell me everything from directories, to memory, to space available, to paging, all the details I might need for troubleshooting. The concept is simple. When we want to go into the collector, we want to combine files. Here, we're gonna look at text of all the air logs, registry information, including version information on DLLs and then output, output from stored procedures such as configuring; who's there, locks, help, server information, extended procedures and even system processes. Concept here is to come up with as much information as possible about the server. Once all these information is collected, it is then reported. Now, in the report itself, we'll get all sorts of information. Let's just go through some of the basics. The last five error logs will be recorded so that we can see what has transpired, again, the registry information including everything about your DLLs, results of the configuration report. Now, here is what we'll find out what's running in the background to see if perhaps there is any kind of looping or any kind of problems within the stored procedures and the extended stored procedures. Again, remember, your extended stored procedures is when we open up coding. We like to be a little bit more cautious about that particular area. I'll also find the information now about IRQs and ports. Included in this will be network and hardware configuration. We'll go on to be able to look at the last 100 queries and any exceptions that are actually reported as results of those queries themselves. The idea is we will have as much information as possible to be able to analyze and control the problems that are going on in our server. Now, of course, detailed information can sometimes be too much. We'll need to analyze it, we'll need to understand what it's saying and we'll go in to the analyzing the reading of this data in an upcoming video.
Tutorial Information
| Course: | Database Optimization |
| Author: | Lauri Sowa-Matson |
| SKU: | 34078 |
| ISBN: | 1-935320-94-7 |
| Release Date: | 2010-01-06 |
| Duration: | 8 hrs / 111 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 