Tag Archives: #SQLServer

All about Microsoft SQL Server

#0145 – Visual Studio, SQL Server Express Editions, Visual Studio Lightswitch – they are licensed & free!


Often, students and colleagues come up to me and enquire how do they get started learning about some of the newest technologies. They generally do not seem to have issues with getting the study materials (most common study materials are the many blogs on the Internet and MSDN documentation). The one thing they do have issues with is procuring software to practice their skills on.

Software, like any other commodity has a price. It takes a large amount of money to envision, design, develop, test, market a piece of software. Documentation and after sales support and training are also expensive for any ISV. This stands true for the Microsoft software as well (Operating Systems, Visual Studio, SQL Server and other products). While Microsoft does have the Microsoft Student Partner program for students, the program cannot cover every student in every university on the planet. Also, the program is not available for anybody else who would like to get started on a little programming. So, if you want to get started on one of the new Visual Studio or SQL Server editions and can do without the advanced design, development & test capabilities; then the following are perhaps the pieces of software that you are looking for:

The most attractive part about these “Express” editions is that they are free. However, the salient benefit is that these editions are covered by Microsoft support. They are eligible for automatic product upgrades and you can get all the technical support that you would need.

The other benefit is that you now own a licensed product for free. Isn’t that a wonderful? I use them on my test system at home, and have never felt the need for more.

Until we meet next time,

Be courteous. Drive responsibly.

Subscribe to my posts via E-mail: Subscribe here | Read my posts via your favourite RSS reader: Click Here! | Tweet to @nakulv_sql

BeyondRelational.com – Creating a new blog – Configuring Windows Live Writer for your blog


One of the most popular of the blogging tools currently being used is the Windows Live Writer. In order to configure the Windows Live Writer to work with your blog on the Blogs Module of BeyondRelational.com, you only need to follow the following very simple steps. If you don’t have your own blog space, and would like to have one, please refer Appendix A for details on how BeyondRelational.com can help you.

image
Launch Windows Live Writer and choose to add a new blog account.

(Note: If you are using Windows Live Writer on the concerned workstation for the first time, it would directly ask you to Add a blog account. All other steps are same as those described below).

image
When asked for the type of Blog Service to use, choose “Other”
image

Next, supply the following information:
1. Your Blog Home page URL (Refer Appendix B to learn how to identify your blog’s home page URL)

2. Your login User Name

3. Your login Password

image
Next, select the following:
1. Blog type: Metaweblog API
2. Posting URL: http://apis.beyondrelational.com/Metaweblogapi.ashx

(NOTE: The blog type and posting URL remain constant for all bloggers throughout the Beyondrelational.com website)

image
The system will now attempt to detect your blog editor settings
image
Allow Live Writer to create a temporary post in order to download the blog editing theme.

Downloading the blog editing into Windows Live Writer theme allows you to preview your blog as it would appear when published on your blog.

image
Finally, a confirmation message is displayed confirming that the blog setup with Windows Live Writer is ready for use!

Click “Finish” and that’s it. Windows Live Writer is now configured to post to your blog on BeyondRelational.com.

Important note: The blog stream on the website is a cached page. If your blog is not visible on the stream straightaway, please check back after some time (30 minutes worked for me)

All you need to do now is to start writing! Happy Blogging!

Until we meet next time,

Be courteous. Drive responsibly.

Subscribe to my posts via E-mail: Subscribe here | Read my posts via your favourite RSS reader: Click Here! | Tweet to @nakulv_sql

 

Appendix A: Creating your own blog space on BeyondRelational.com

Creating a blog space on BeyondRelational.com is super easy! Become a member of the BeyondRelational.com community and follow the steps mentioned below to create a new blog:

image
Under the “Modules” section, navigate to the “Blogs” module and click on “Add New Blog”
image
Fill in the Title and brief summary for your blog.
After you accept to the BeyondRelational.com terms & conditions, you can either choose to publish your blog immediately, or save as a draft for future review.

That’s it! Your blog is now created.

IMPORTANT:

Before you can use this blog space, though, please note the following:

  1. Once you choose to “Publish” your blog, the blog is sent to the administrator for approval
  2. Once the administrator has approved the blog space request, please allow at least 24 hours for the blog to show up on your profile and become “live”

If you have questions around the BeyondRelational.com terms & conditions of usage or around BeyondRelational.com’s privacy policy, please refer the following links:

 

Appendix B: Knowing your Blog’s Home Page URL

When your blog was created, the administrator would have sent across the home page URL for your blog. In case you lost it, or would need to confirm, here are the steps that you can follow:

image
Go to the “Modules” section of the BeyondRelational.com website. Next, click on “Blogs” to navigate to the Blogs module
image
Click on the “Bloggers” stream and navigate to your blog space.
Either hover over the blog link or click on it to navigate to your blog’s home page. The highlighted link in the status bar in the image above is the URL for your blog’s home page.
Per the example used in the screenshot, the home page for my blog is: http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx

#0144 – NEWS – SQL Server 2012 is out! Products that I will watch out for in 2012 – Windows 8, Windows Server 8, DevExpress cont


A lot changed on the technology space this month. Today, I would write about a couple of these announcements that are bound to dominate the technology space in 2012. There are a lot of new announcements coming through, but below are the products that I would be watching out for.

New Server Systems!

SQL Server 2012

The much awaited SQL Server 2012 or “Denali” (aliased: “SQL 11” due to it’s build number) has been Released To Market (RTM). It would be available for General Release around April 01, 2012.

Quoting from the official Microsoft web-site: “As the foundation of the cloud-ready information platform, SQL Server 2012 will help organizations unlock breakthrough insights across the organization as well quickly build solutions and extend data across on-premises and public cloud backed by mission critical confidence.

If you are an Independent Software Vendor (ISV), you would have already begun evaluating your product for compatibility (and ultimate certification) with the SQL Server 2012 release. If you have not done so yet, it’s not too late. Here are some resources that might be of help:

A whitepaper on what’s new in SQL Server 2012 is also available at: http://download.microsoft.com/download/E/9/D/E9DBB1BB-89AE-4C70-AF02-AAFC29451A85/SQL_Server_Whats_New_Whitepaper_7_11.pdf

I believe that before you even begin evaluating SQL Server 2012, spend some time to read through the licensing changes. This time, the changes are severe enough that they need immediate attention. They may affect the overall cost of your product/solution.

The Windows Server 8 Operating System

With almost all products moving towards the cloud, it’s time that a dedicated cloud computing server platform be available. Geared towards optimizing virtualization and “delivering the most dynamic, available, and cost-effective server platform for the private cloud”, Windows Server 8 Operating system platform is now in the Beta phase, and is available for review at: http://www.microsoft.com/en-us/server-cloud/windows-server/v8-default.aspx.

After Windows Server 2008 and 2008 R2, the name Windows Server 8 becomes a little confusing, but, it’s still in Beta, and we can hope that the name would change (maybe Windows Server 2012?).

Client System Announcements

3rd party controls

The product that I work upon uses the DevExpress (http://www.devexpress.com/) control suite. They look great, and have the unique “Wow!” factor that makes an application attractive and easy to use. While I spend most of my time within the SQL Server Management Studio, I hear from colleagues that DevExpress is perhaps one of the most popular control suites for WinForms based applications. After all, there has to be a reason why they have been awarded with tons of research & development awards (http://www.devexpress.com/Home/Awards.xml).

They recently announced the product roadmap for 2012: http://www.devexpress.com/Home/Announces/Roadmap-2012.xml.

I would quote the following lines from the roadmap, which essentially contains the gist of all that would shape the technology scene in 2012:

Simply put: 2012 is going to be the year of Visual Studio 11 and Windows 8. I don’t see anything else on the horizon that is of such importance as these two technologies. Client development will evolve with WinRT, and ASP.NET (and MVC) will continue to grow in influence, especially with the tightening orbits around the whole HTML5/CSS3/JavaScript ecosystem.

The Windows 8 Operating System – Aero is Out, Metro is In

The Aero interface is perhaps the most distinguishing feature and one of the most dramatic user experience change that Microsoft introduced with Windows Vista and matured with Windows 7. With Windows 8, things are going to be even more exciting:

  • From the screenshots that I have seen, there’s NO “start” button!
  • Pull-down menus are replaced with clear labels and “charms”
  • The whole user experience is similar to the Windows phone – marking the start of an era where portable devices are now shaping the experience on a desktop/laptop
  • The user experience now involves a new sense – touch!

Above all, this new user experience has a new name (which I like!): Metro.

Check out more details on this new kid on the block at: http://windows.microsoft.com/en-US/windows-8/consumer-preview

I am all excited and can’t wait to get my hands on a copy of Windows 8 Consumer Preview edition.

Concluding…

Technologies change, but there are very few times wherein so many welcome and exciting changes are being announced from all quarters. The year 2012 is going to be fun!

Until we meet next time,

Be courteous. Drive responsibly.

Subscribe to my posts via E-mail: Subscribe here | Read my posts via your favourite RSS reader: Click Here! | Tweet to @nakulv_sql

#0143 – SQL Server – Profiler – Part 10 – Using the SQLDiag utility to capture SQL and Performance traces


In the previous part of this tutorial, I demonstrated the procedure to create & customize the SqlDiag.xml for use with the SQLDiag utility. I began by going through the manual editing process, followed by the graphical utility – SQLDiag Configuration Tool – from CodePlex.

Today, in the final part of the tutorial series on the Profiler, I will demonstrate how to use SQLDiag to consume this modified SqlDiag.xml. In order to prepare for this demo, I have a pre-created SqlDiag.xml file using the SQLDiag Configuration Tool.

Running the SQLDiag utility

For this demo, I will be running the following test workload against my SQL Server. You can notice that the workload involves adding large amounts of data into the SQL Server followed by some reads from this table.

/*******************************************************************************
  WARNING: THIS SCRIPT IS PROVIDED FOR DEMONSTRATION PURPOSES ONLY.
         : THE AUTHOR AND BEYONDRELATIONAL.COM ARE NOT RESPONSIBLE DUE TO ANY
           DAMAGE CAUSED BY MISUSE OF THIS SCRIPT
*******************************************************************************/
USE tempdb
GO

--Set options
SET NOCOUNT ON

--Safety check
IF (OBJECT_ID('#TestWorkload') IS NOT NULL)
	DROP TABLE #TestWorkload

--Declaration/Object creation
CREATE TABLE #TestWorkload (TestId INT IDENTITY(1,1),
                            TestColumn VARCHAR(20) DEFAULT 'Test Entry Dflt'
                           )    
DECLARE @it INT = 0

--Insert some test data
WHILE (@it < 100000)
BEGIN
   IF ((@it % 2) = 0)
   BEGIN
       INSERT INTO #TestWorkload (TestColumn)
       DEFAULT VALUES
   END
   ELSE
   BEGIN
	   INSERT INTO #TestWorkload (TestColumn)
	   SELECT 'Test Entry #' + CAST(@it AS VARCHAR(10))
   END
   
   SET @it += 1
END

--Some Selection
SELECT TestId, TestColumn FROM #TestWorkload WHERE TestColumn LIKE '%9%'
SELECT TestId, TestColumn FROM #TestWorkload WHERE TestColumn LIKE '%dflt%'

--Cleanup
IF (OBJECT_ID('#TestWorkload') IS NOT NULL)
	DROP TABLE #TestWorkload

SQLDiag Input parameter configuration

As mentioned in Books On Line, the SQLDiag accepts many input parameters, the most important ones being:

  1. /I – path to the configuration file (typically SqlDiag.xml)
  2. /O – Redirects the SqlDiag output to this directory
  3. /P – support path, typically the path where SqlDiag.exe resides
  4. /M – Machines to diagnose; overrides the machines specified in the SqlDiag.xml/configuration file
  5. /B and /E – provide a fixed start & stop analysis time

There are lots of other input parameters, however, for the purposes of this demo, we will keep things simple. We will be stopping the trace manually. Also, we will not be overriding the configuration files and therefore, the only input we need to provide is the configuration file and the output path.

As mentioned in my previous post, the SQLDiag requires that the user be a member of the sysadmin fixed server role at the SQL Server instance being monitored. In addition, the user must also be a local administrator on the server being diagnosed.

  1. With a user having both local administrator and sysadmin privileges, login to the server to be diagnosed
  2. Using the command prompt, navigate out to the following path:C:Program FilesMicrosoft SQL Server100ToolsBinn
    • (The path provided is valid for a default installation of SQL Server 2008. Depending upon your SQL Server version and installation configuration, these paths may differ)
  3. Run the SQLDiag utility using the following command line command (file and path names may differ in your case):
    • SQLDiag.exe /I SQLDiag100.xml /O "C:Program FilesMicrosoft SQL Server100ToolsBinnSqlDiagOutput"
  4. Await indication in green text that SQLDiag is now tracing the system. Ensure that all system information counters are loaded:
  5. Starting SqlDiag
  6. Now, let’s go to the SSMS and execute our test workload
  7. After execution of the workload, stop the collection by pressing Ctrl+C
  8. Stopping SqlDiag
  9. Notice that the Profiler trace and the Perfmon trace are now available in the output directory specified in the command line path above:
  10. SqlDiag Output files

All that remains now is to open these using the SQL Server Profiler as demonstrated in tutorial part #6 (SQL Server – Profiler – Part 6 – Correlating the Profiler Trace with Windows Performance Log Dat) of this series.

Alternative tools

SQLDiag itself, although very powerful, is a basic tool. Some of the more advanced tools that offer analytical abilities as well are:

  1. PAL (Performance Analysis & Log) tool: http://pal.codeplex.com/
  2. SQLNexus: http://sqlnexus.codeplex.com/

Conclusion

This concludes my series on the SQL Server Profiler. Profiling is an art, and I would request everyone to take the time out and practice profiling on your test systems. The Profiler is a double-edged sword. If used incorrectly, Profiler can (and will) result in severe performance issues. If used correctly, it is an excellent debugging and troubleshooting tool, and may also prove to be a lifesaver.

I hope you liked the series. Do leave your valuable feedback, and have a nice day ahead!

#0142 – SQL Server – Profiler – Part 09 – Introducing the SQLDiag utility to capture SQL and Performance traces


In one of the earlier parts of this tutorial series (Part 06), I had demonstrated how to correlate the SQL Profiler trace with the Windows Performance Logs. I had used two utilities for the demonstration – the SQL Server Profiler and the Windows Reliability & Performance Monitor. In Part 07 and Part 08 of the tutorial series, I demonstrated how to generate and run a server side trace.

Today, I will demonstrate how to generate a server side SQL Trace combined with the Windows performance logs using a single diagnostic utility – SQLDiag.The SQLdiag utility is a general purpose diagnostics collection utility that can be run as a console application or as a service. The SQLDiag utility can capture the following kinds of diagnostic information:

  1. Windows performance logs
  2. Windows Event logs
  3. SQL Server Profiler traces
  4. SQL Server blocking information
  5. SQL Server configuration information

SQLDiag is a command-line utility, and therefore choosing the correct switches is important when working with SQLDiag.

Permissions

Under it’s default mode, because SQLDiag collects SQLTrace information, it needs to be run under a user context that has sysadmin access to the SQL Server instance being monitored. Also, because it collects windows performance & event log information, the user must have Administrator access to the server being monitored.

SQLDiag can also be run under a “Generic” mode, with a /G command line argument. Under the /G switch, SQLDiag does not enforce SQL Server connectivity constraints or verify whether a user can capture the required windows logs. These checks are deferred to the SQL Server and the Windows Operating System respectively.

Please note that by default, SQLDiag connects to the SQL Server instance using Windows authentication.

Location

By default, the SQLDiag utility is located at the following paths:

  • SQL Server 2008: ..Microsoft SQL Server100ToolsBinnSQLDiag.exe
  • SQL Server 2012: ..Microsoft SQL Server110ToolsBinnSQLDiag.exe

Configuring the SQLDiag

SQLDiag collects SQL Trace and windows logs by using a configuration file as input. This configuration file is an XML file, with a default name of – SQLDiag.xml. This XML is not present by default in a clean installation of SQL Server. To generate the XML for the first time, simply run SQLDiag.exe on the command prompt under a user who has sysadmin and system administrative privileges. As soon as execution starts, press Ctrl+C to stop the execution. The SQLDiag.xml would have been generated in the SQLDiag’s launch folder.

image

Along with the SQLDiag.xml, associated XSD is also generated that would help in validating the changes to the xml file using an XML editor such as the SSMS.

The SQLDiag.xml is created under a default configuration. In most cases, this file requires to be edited so that the user can configure the SQL trace and the windows performance log capture.

Manually Editing the SQLDiag.xml file

To edit the SQLDiag.xml, I would always recommend to use an XML editor (the fastest option being to use the SSMS). Allow me to walk-you through the XML structure.

Configuring the machine and instance names

The first thing that needs to be done is to configure the file to point to the correct machine and associated SQL Server instance names. Under the “Machines” node, one can find the “Machine” and the “Instances” nodes. This indicates that SQLDiag can be used to capture:

  • Windows performance data from more than one machine at the same time
  • SQL Trace data from more than one SQL Server instance on each of these machines at the same time

By default only one “Machine” node exists, pointing to the local server. Similarly, only one “Instance” node exists, pointing to the default local instance of SQL Server, the version for which is indicated by the “ssver” attribute.

Word of caution: Because the SQLDiag has the potential to capture a large number of data points, please keep an eye out for IO, memory & CPU pressure. An incorrectly configured SQLDiag file can do more harm than good.

image

Observe that under the instance node, one can not only change the SQL Server instance that is to be monitored, but also whether or not to use Windows authentication, what the SQL Server version of the instance is and the user name in case the user is using SQL authentication.

Configuring the SQL Trace options

Now that I have specified the machine name and the instance name which needs to be monitored, it is time to configure the SQL Trace options. This will be similar to the configuration I did for the server-side tracing (Part 07) – the only difference is that for the standard server side tracing we used T-SQL whereas here we will be using XML. I had to specify the event class, event itself and the columns that needed to be captured. In the T-SQL approach, remembering the enumerated values for each event class and column names was a headache. Here, things are a little better – I already have a list of all event classes & events that are available and I only need to choose whether or not to capture this information. All columns available to an event are captured, because they can be filtered later on by the user.

Under the “Instances” node, expand the “Collectors” node. This would show us the following:

  1. SqlDiagCollector = indicates whether the SqlDiagCollector should collect information based on the below mentioned configuration or not
  2. BlockingCollector = indicates whether SqlDiag should collect blocking related information or not
  3. ProfilerCollector = indicates whether SqlDiag should collect Profiler trace information or not

image

   1:  <Collectors>
   2:      <SqldiagCollector enabled="true" startup="false" shutdown="true" />
   3:      <BlockingCollector enabled="false" pollinginterval="5" maxfilesize="350" filecount="1"/>
   4:      <ProfilerCollector enabled="false" template="_GeneralPerformance90.xml" pollinginterval="5" maxfilesize="350" filecount="1">
   5:          <Events>
   6:              <!--Event Classes here-->
   7:              <EventType name="Deprecation" enabled="false">
   8:                  <Event id="125" name="Deprecation Announcement"  enabled="false" description="Occurs when you use a feature that will be removed from a future version of SQL Server." />
   9:                  <Event id="126" name="Deprecation Final Support"  enabled="false" description="Occurs when you use a feature that will be removed from the next major release of SQL Server." />
  10:              </EventType>
  11:              <!--Event Classes here-->
  12:          </Events>
  13:      </ProfilerCollector>
  14:  </Collectors>

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

To enable/disable a particular trace (e.g. ProfilerCollector) and/or a particular event class/event, simply change the “enabled="false"” to “enabled="true"”. Do ensure that if you want to trace a Profiler event, the ProfilerCollector, the associated Event Class and the associated Event should all have “enabled=”true”” set appropriately.

Configuring the Event Log collector

SQLDiag has the ability to monitor the Windows event log and capture appropriate data from it accordingly. To configure Event Log monitoring and collection, expand the “Machine Collectors” node.

image

   1:            <EventlogCollector enabled="false" startup="false" shutdown="true" >
   2:              <Eventlogs>
   3:                <EventlogType name="Application" enabled="true"/>
   4:                <EventlogType name="Security" enabled="true"/>
   5:                <EventlogType name="System" enabled="true"/>
   6:              </Eventlogs>
   7:            </EventlogCollector>

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

As mentioned above, changing the “enabled=”true”” to “enabled=”false”” will stop the collection of these event logs.

Configuring the PerfMon Collector

Expanding the “PerfmonCollector” node gives us the “PerfmonCounters” node, which contains a listing of every available performance counter. Working with the “enabled” attribute allows us to control whether or not a particular counter is to be monitored or not.

Do note that this is a list of all counters available under “PerfMon”, had I launched it externally (as I did in Part 06 of the tutorial).

image

Here’s a snippet:

   1:  <PerfmonCollector enabled="false" pollinginterval="5" maxfilesize="256">
   2:      <PerfmonCounters>
   3:          <!--PerfmonObject nodes here-->
   4:          <PerfmonObject name="MSSQL$%s:Buffer Partition(*)" enabled="true">
   5:              <PerfmonCounter name="*" enabled="true" />
   6:              <PerfmonCounter name="Free pages" enabled="true" />
   7:              <PerfmonCounter name="Free list requests/sec" enabled="true" />
   8:              <PerfmonCounter name="Free list empty/sec" enabled="true" />
   9:          </PerfmonObject>
  10:          <!--PerfmonObject nodes here-->
  11:      </PerfmonCounters>
  12:  </PerfmonCollector>

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Once the file has been edited, we are ready to begin execution of the SqlDiag utility, however, we will see how to run SqlDiag in the next part of the tutorial.

Editing the SQLDiag.xml file through a GUI

Manually editing the SQLDiag.xml is a very tedious and error-prone task. The SQL Diag Configuration Tool (SDCT) from Codeplex is an intuitive, easy to use tool that will read existing sqldiag.xml configuration files, allow you to select your desired options and save those options to a new file.

The only limitation of this tool is that because SQL 2012 has not been released at the time of writing this blog, the tool does not support the SQLDiag file for SQL2012. (Because CodePlex is an open source community, those interested in open source development can take it up as an action item to work upon).

Welcome Screen

Simply choose the version which the SqlDiag.xml needs to work with.

image 

Authentication page

Choose the machine name and SQL Server instance name to work with.

image
Machine Wide Diagnostics

Choose whether or not Event Log information is to be captured

image
Configure instance specific settings

image
Profiler Options

Configure the SQL trace. Notice that the system provides 3 templates and allows to configure:

1. Maximum file size

2. Polling Interval

3. Maximum number of files required

image
Perfmon Options

Configure the Perfmon counters that are required to be captured. Again, we have 1 pre-defined template to help us get started.

image
Enable Producers image
Enable Analyzers image

After configuring all options using this simple GUI based tool, simply click on “Save” to save a fully-configured copy of the SqlDiag.xml file.

In the next part of the tutorial:

The next part of the tutorial is the final part in the “Profiler” series. We will see how to execute the SQLDiag utility and how to consume it’s output with the SQL Profiler. In addition, I will also be providing some more tools that improve upon the functionality and flexibility provided by SQLDiag.

References:

Until we meet next time,

Be courteous. Drive responsibly.

Subscribe to my posts via E-mail: Subscribe here | Read my posts via your favourite RSS reader: Click Here! | Tweet to @nakulv_sql