Welcome to the Application Development Virtual Chapter

Mission

The Application Development Special Interest Group (App Dev Sig) disseminates content and information related to the trials and tribulations application developers face with Microsoft SQL Server.

Contact Us

Please contact us at appdev_DL@sqlpass.org to find out more about the PASS App Dev Virtual Chapter.

 Upcoming Meetings

February 2010 Presentations

SQL Server Indexing
February 9th at 12:00 PM Eastern (GMT -5)
Presenter: Allen White

Add to Calendar

While indexing traditionally has been the concern of the DBA, it's important for developers to understand both the usefulness and the impact of indexes in your relational database.  With the right indexes your application will perform like a Formula One racer, without them performance will better resemble a Model T.  This presentation will explain how indexes work, what options are available to you in SQL Server 2008, and how to tune your application and your database for the best performance.

Allen White

Allen is a consultant and mentor for Upsearch Technology Services in Northeast Ohio. He's spent over 35 years in IT and has been using SQL Server since 1992 and is certified MCITP in SQL Server and MCT.  Allen has been awarded Microsoft’s MVP Award for the last three years. He's active in the Ohio North SQL Server User's Group and contributes in the MSDN Forums, answering questions about SMO and PowerShell, and maintains a blog at http://sqlblog.com/blogs/allen_white/default.aspx.

How do I view the presentation?

Attendee URL:  Live Meeting link

PowerShell for Data Professionals
February 23rd 12:30 PM
Adelaide  (GMT+10:30)
Co-hosted by the Adelaide SQL Server User Group

Add to Calendar

February 23rd at 12:00 PM Eastern (GMT -5)
Add to Calendar

Presenter: Aaron Nelson

In this session we will learn to perform several everyday data tasks including user database backups, scripting table objects and evaluating disk space usage with PowerShell. For each task we will explore the benefits of using PowerShell over the standard method. Only a basic understanding of PowerShell or DOS is needed. This session should serve as a good introduction to PowerShell for database users. The goal is to help everyone get their feet wet using PowerShell.

Aaron Nelson

Aaron is a Senior SQL Server Architect, Database Developer, DBA, and Business Intelligence Developer with over 10 years experience in architecture, development, maintenance, and performance tuning of SQL Server.

He has Experience managing enterprise-wide data needs in both a transactional and data warehouse environment.  He also holds certifications for  MCITP: Business Intelligence Developer, Database Administrator, Database Developer; as well as MCTS: Windows Server Virtualization, Configuration (meaning Hyper-V). Aaron blogs at SQLvariations

How do I view the presentation?

Attendee URL:  Live Meeting link (Eastern US Time Zone) Live Meeting link (Australian)


Older Meeting Recordings and files

Click here to download previous recordings

Summit on Demand

Introduction to T-SQL Enhancements in Microsoft SQL Server 2008 [Video Link]
Presented by Itzik Ben-Gan, Solid Quality Mentors (90 minutes)
This session provides an introduction to T-SQL Enhancements in Microsoft SQL Server 2008. The session will incorporate many demos and code samples to demonstrate the new features. Topics covered in this session include: T-SQL Delighters, MERGE Statement, Composable DML, Grouping Sets, Date and Time Datatypes and Functions, the HIERARCHYID Datatype, Table Types and Table-Valued Parameters, and more. 

Volunteer Info

Interested in volunteering for the AppDev Virtual Chapter? Email appdev_DL@sqlpass.org

 Resources

Featured Articles

Dynamic SQL Resources by Jeremiah Peschka
Time to Get Tested by Todd Robinson
Time to Get SMOoth by Todd Robinson

Previously Featured Articles

Dynamic SQL Resources

Finding good resources on working with dynamic SQL can be difficult. Many DBAs and developers ignore this powerful tool and choose to work with more cumbersome solutions.

Stored Procedures - Executing & Dynamic SQL - SQL Server Pedia has a short article about working with the EXEC statement and the sp_executesql system stored procedure. Understanding how both of these work is fundamental to working with dynamic SQL.

SQLQueryStress - SQLQueryStress is a tool developed by Adam Macahanic that you can use to stress test queries and determine the frequency of query plan recompilation, amongst other things.

Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005 - This whitepaper from Microsoft covers a number of the issues that can make dynamic SQL perform poorly: namely compile and recompile times as well as parameter sniffing. While this paper does not give any dynamic SQL specific solutions, it highlights the causes of these issues and provides tools and techniques to identify and solve these issues.

Automating T-SQL Testing - I'm shamelessly linking to myself here, but with good reason. I put together a T-SQL testing framework that makes heavy use of dynamic SQL. The benefit of this framework is that you can easily use it to run automated tests against dynamic SQL, especially when your dynamic SQL has optional parameters.

The Curse and Blessings of Dynamic SQL - This is probably the grandaddy of all resources on dynamic SQL. Erland Sommarskog works through many good coding practices for dynamic SQL and brings up security, formatting, and performance concerns and provides ways to address them.

 

Time to Get Tested by Todd Robinson

One of the frequent links I like to visit is the Microsoft Certifications blog by Gerry O’Brien. Here he lists information on the certifications for developer and SQL Server technologies. In his blog, you will find information on current beta exams which are in development. Best of all, these posts most often include a registration code good for the beta period which can be used to take the exam for FREE!

 I will stress though that if you do take them up on this wonderful offer that you

Show up – Nothing would make Gerry sadder then to offer these and have people not take them.

Be prepared – Look on the Microsoft Certification site for the objectives. These will give you an idea what will be on the exam.

Leave constructive comments – This is your chance to tell Microsoft how well they are doing! If a question might have an ambiguous answer, let them know, but also explain why you think so. If a question is hard to read or formatted weird, let them know how it could be better. The most important thing to remember is that your comments will be used to make a better exam experience for everyone.

GerryO’s blog can be found at http://blogs.msdn.com/gerryo/

Good luck on your next exam!

 

Time to Get SMOoth by Todd Robinson

 I just started a new position at a company where my main goal is to help them look over the performance, stability and disaster recovery of all their SQL Servers. During the first few days, you have to become acclimated to the systems, find out who supports what, and ultimately find out what are the servers that you’ll ultimately be responsible for.

They set me up with my workstation, granted me access to the database administrators group, and let me have at it. My first order of business was just to see what’s out there on the network. Previously, if you just wanted a list of all the servers that could be discovered on the network, you would use Osql with the –l parameter. It would return a list of all the servers it was able to browse on the network.

I ran this and saw many more rows than the 40 or so I was expecting. Obviously, there were some servers out there that hadn’t been documented. I wanted to gather a bit of details about these servers, specifically the version, just so I could see what I was facing. So what was the best way to do this?

I decided that I would use SQL Management Objects (SMO) to gather the same list of servers and hopefully get a bit more information out of them. Once I had my list I could delve further.

I brought up Visual Studio and started a new C# console application. In order to use SMO in your project, you need to add the references to the appropriate assemblies. Since I just want to list the servers out on the network as well as their version, at this time I will only need the Microsoft.SqlServer.Smo namespace.

Now I can add it to the list of directives at the top of the app so I don’t have to type everything out.

using Microsoft.SqlServer.Management.Smo;

Since I’m going to use a DataTable to store these values, I also want to add the directive

using System.Data;

Now I’m ready to start to get the info I want.

Inside of the Main function, the first thing I want to do is get a list of all the servers that are broadcasting on the network. To do this, I can use the EnumAvailableSqlServers method. You can specify the name of the server or instance you want to discover by providing the string as a parameter, but in this case, we want to see them all, so we don’t pass anything. This method in the SmoApplication class returns a DataTable with the enumerated list of SQL Servers. This table contains the columns Name, Server, Instance, Version, and isLocal and isClustered

DataTable dt = SmoApplication.EnumAvailableSqlServers();

Now that we’ve populated a table with the servers, we can iterate through the collection

if (dt.Rows.Count > 0)
{
  foreach (DataRow dr in dt.Rows)
    {
    Server svr = new Server((string)dr["Name"]);
    Console.Write(svr.Name);
    //Comment out the following line for a list just like OSql -l
    Console.Write(" "+ svr.Information.VersionString);
    Console.WriteLine();
  }
}

Now when we run this application, we get a list of all the servers that are broadcasting on the network along with its version. In the next article, we’ll take this code and build on it to create a list of servers that we can access, as well as a list of “rogue” servers. 

 Announcements

The PASS Application Development Virtual Chapter
website is getting updated!

Here at AppDev_VC, we like to think we're forward minded, outgoing kinds of people. So we got together on the phone and talked about ways we could make the visits to your favorite PASS site a more enjoyable and rewarding experience. Over the next days and weeks, you'll start to see changes happening here, with additions such as exclusive SQL Server Development articles, links to some of the best learning and support sites out there, and of course, the best speakers on the subject of SQL Server Development out there. We've even got some BIG surprises in store for you, so come back often and see how we grow!

Of course, if you have suggestions for anything you'd like to see here at AppDev_VC, drop us a note at appdev_DL@sqlpass.org - we're open to ideas, and would love to hear from you!

 

 Sponsors

PASSChapterLogo100.jpg 

 

sql_micro_sm.gif 

sql_ca_sm.gif