Working smarter, not harder, as a DBA

The butterflies were flying!  This was my first presentation for Triad SQL PASS user group, and any group for that matter.  I started attended our local SQL PASS chapter back in the fall of 2011 while I was between jobs.  Kevin Goode was the one who got me thinking about doing a presentation, and after I had a few months under my current position as DBA, I came up with a topic: how to work smarter as a DBA.  I found that starting a new DBA position requires working on understanding your environment quickly without disrupting the day-to-day business.  This presentation gives you insight into tools that keep our servers running smooth and the training that keeps me up to date of the latest trends.

Here is the link to the PowerPoint slides.

Here is the link to the DBA Standards Document.

Here is the link to the server specific install settings and configuration.

Here is the link to the backup script I use each night.

Here is the link to the server side security audit script.

Here is the link to the database side security audit script.

Here are the links to the setup scripts that are used after the install of SQL Server 2008 R2.  Just edit the files based on your environment:

Doug Purnell
sqlnikon@gmail.com

#meme15 for Twitter

Jason Strate (blog|Twitter) has started a new meme project about social networking for SQL Server professionals.  This month’s theme is all about Twitter.  We have been asked to answer the following two questions:

  1. Why should the average Jane or Joe professional consider using Twitter?
  2. What benefit have you seen in your career because of Twitter?

I consider myself an average Joe SQL Server professional.  I’m a DBA for a private University and enjoy solving business problems with data.  Up until June of 2010, I did not have a Twitter account and was not involved in the #SQLFamily.  When I was getting back into the DBA field after going to the dark side (management) for a few years, I found Twitter as the catalysts for learning.  I was able to follow a few big hitters in the #SQLFamily and with in the first day, started reading tweets for webcasts and blog posts.

This is the key for me using Twitter, there is so much good information posted everyday to keep you informed about SQL Server topics.  The beauty of Twitter is most of the #SQLFamily don’t post the same as your friends do on Facebook.  Twitter has become a medium for disseminating information.  Now, there are plenty of tweets from celebrities and even your friends that are just plain noise, this is where the #SQLFamily stands out.  Most of the people I follow tweet about topics related to SQL Server.  I enjoy reading new blogs and being notified of webcasts where I can learn new things.

As I stated earlier, I found Twitter as my means of getting back into the DBA world.  I started with Brent Ozar’s Twitter Book and created an account.  From there it was as easy as following Brent Ozar (blog|Twitter), Glenn Berry (blog|Twitter), Thomas Larock (blog|Twitter) and Aaron Bertrand (blog|Twitter).  From just those four people, I was introduced to so many more and started following them.  Each time I started following someone new, I was introduced to few other people and the Twitter snowball kept growing.  As of Jan 2012, I’m following ~150 people and it’s hard to keep up during the day and usually spend nights catching up on all the tweets for the day.

The benefits of Twitter helped me land a great DBA job in higher education.  I had plenty of experience under SQL Server 2000 & 2005 but only limited direct interaction with SQL Server 2008 & 2008 R2.  This is where the webcasts and blogs that I was notified about on Twitter helped me fill the gaps and use that knowledge to practice in my home lab.  Without Twitter, I would have not had the #SQLFamily behind me and would have struggled getting back in the game.

Doug Purnell
sqlnikon@gmail.com

2011 was the year of #SQLFamily

As the name suggests, SQL Family feels like family.  There is no other professional organization in the world that supports a product line as well as #SQLFamily.  My introduction to #SQLFamily was in the summer of 2011 when I decided to get back into SQL Server full-time after going to the dark side, management, for the two previous years.  I had a strong background in SQL Server 2000 & 2005 but not the full-time experience under 2008 & 2008 R2.

As I started searching for training opportunities for SQL Server, I came across Pragmatic Works.  Every Tuesday and Thursday throughout the year, they have a one hour web cast on all areas of SQL Server.  This allowed me to catch up on what was new under 2008 and brush up on the daily DBA tasks that I was accustomed to.  Each of the presenters had a personal blog and twitter address that had even more content over the session that was offered.  This got me interested in blogging for myself and starting to use twitter.  As I started searching for ways to get started in blogging and using twitter, I came across Brent Ozar (blog, twitter).  He built a great guide to help understand what twitter was all about.  I wasn’t interested in following celebrities or sports figures, I just wanted to use it for SQL Server.  It just so happened that Brent was a DBA and a photographer.  This one-two punch was just the right mix to start me on my way into WordPress and Twitter.

As I started following Brent, I started reading posts from him and other SQL Server professionals about the passion the SQL Server community had for helping others.  This was perfect for me as I started on my way to becoming a full-time DBA.  Each new blog entry or twitter post gave me a new understand of SQL Server and how strong the community was.  This also introduced me to PASS and the local user groups that were offered in my area.  As I started attending the local events, that same passion within the on-line community was equally as strong at the local level.  This allowed me to network with other SQL Server DBAs and get their input on ways to get back into the field full-time.

The local PASS events lead me to SQL Saturday.  I was able to attend the Atlanta #89 event in the fall of 2011.  This was very eye-opening for me.  There were over 400 people gathered for a full day of free training on a Saturday.  I was finally able to meet a few folks that I had only meet via twitter.  The highlight for me was hearing Bob Ward from Microsoft talk about wait types.  His session was level 500 and then some.  It was cool to see the inter-workings of SQL Server from one of the people who has access to the source code.

By the fall of 2011, I was already talking to a few companies about DBA positions and felt confident about finding the perfect DBA job.  As I accepted my current DBA role, I thought back to the family that got me there.  With out #SQLFamily, this would have not been possible.  This has given me the drive to give back to the community so others out there can find their perfect DBA role like I did.  My first step is our local PASS chapter and presenting during the summer of 2012.  I’m also working on blogging more regularly throughout the month, so others can learn from my view of being a SQL Server DBA.

I love being a part of the #SQLFamily.  Looking forward to a great year in 2012!

Doug Purnell
sqlnikon@gmail.com

Understanding SQL Server Instances

Being raised within SQL Server 6.5 & 7.0, SQL Server instances were not available in those versions.  I never fully understood the advantage of having multiple instances on the same server so I never embraced it.  I always had a single, default instance per physical server.  Once I got involved with virtualization a few years ago, having multiple instances of an OS running on a single physical server finally got me thinking about multiple instances of SQL Server.

My lab at home has been the perfect place to install, configure and understand multiple SQL Server instances.  I have two servers running ESXi 4.1 U1 and VM’s to support a small Windows Domain.

I started with a copy of Windows Server 2008 R2 64bit as the guest OS.  I installed my first copy of SQL Server 2005 Standard under a named instance of SQL03\SQL2005Standard (I currently don’t have a standard instance of SQL Server installed on this VM).  I then proceeded to install SQL Server 2005 Enterprise, SQL Server 2008 Standard & SQL Server 2008 Enterprise all as named instances on the same VM as SQL03\SQL2005Ent, SQL03\SQL2008Standard, SQL03\SQL2008Ent, respectively.

Here is what I learned about supporting multiple instances of SQL Server from a DBA point of view:

  • The default instance of SQL Server, known as MSSQLSERVER, runs under TCP port 1433
  • Under Windows Server 2008, the firewall is enabled by default so you need to create inbound rules to allow outside connections to be able to reach SQL Server.
  • SQL Server Browser service is responsible for taking requests for named instances and forwarding them to the correct port, whether it’s dynamic or statically configured.  If there are no named instances of SQL Server, the Browser service is not required.
  • The SQL Server Browser service runs under UDP port number 1434.  This will need to be opened under the firewall.
  • With out the SQL Server Browser service running, you would need to provide the IP and Port number (xxx.xxx.xxx.xxx:yyyy) in order to connect to a SQL Server instance.
  • To connect to a SQL Server instance by name, you use the <computer name>\<instance name> syntax.
  • By default, named instances are set to dynamic ports.  This causes an issue trying to open ports on the Windows firewall because each time SQL Server is restarted a new port can be set.  With the firewall enabled, it’s best to switch to static ports for all named instances and then create inbound rules for those TCP ports.
  • If you prefer to use dynamic ports, you can also exclude the sqlserver.exe process from the firewall.  This would allow inbound connections for just the SQL Server process and thus all clients to connect to dynamic or static ports without having to create individual rules for each TCP port number.
  • To set an instance to a static port, open SQL Server Configuration Manager (SSCM) and drill through SQL Server Network Configuration and expand the Protocols tree for your named instance.  Right click on TCP/IP and select Properties.  Click on the IP Address tab and scroll all the way to the bottom of the list until you see ‘All IP’.  Clear out the TCP Dynamic box and under TCP Port, provide the desired TCP port number.  To switch back to dynamic port allocation, just clear out the TCP Port box and place a zero in the TCP Dynamic box.  Any time you make a change to the Protocol settings, you will need to restart the SQL Server service for the named instance.
  • TCP and UDP ports are registered with a national directory.  You can reference them by using this Wikipedia article.  I chose to use TCp ports 1435 through 1438 for my instances.  Well known ports are from 0 – 1023, Registered ports are from 1024 – 49151, and Dynamic ports are from 49152 – 65535.
  • To see a list of ports the server is using, run ‘netstat -an’ from the command prompt.  Use this data along with available ports from Wikipedia to determine what ports are available on your system.
I hope you find this useful when you try to install SQL Server with multiple instances when the Windows Firewall service is enabled.
Doug Purnell
sqlnikon@gmail.com