Author: way0utwest

  • Important Alerts for SQL Server

    One of the things that I think is extremely important for DBAs and really anyone that has to administer a SQL Server instance is a set of alerts on various items that might occur.

    I ran across Glenn Berry’s article on Provisioning SQL Server and there’s a section in there that is titled “Setting Up SQL Server Agent Alerts”. It assumes you have Agent running (and you should), and includes a series of alerts that you can set to inform you when certain things occur.

    Glenn has alerts for severity errors 19-25, which are important, and then includes an alert for Error 825.  This error is indicative of possible corruption and at least some I/O issue with your storage. It’s important to have this error trapped, but in addition, I’d also recommend setting alerts for 823 and 824 errors.

    I would recommend modifying Glenn’s code to include this T-SQL as well.

    -- Error 823: Read Write Request Failure
    DECLARE @Error823AlertName SYSNAME = N'I/O Alert - Error 823: Read or Write request failure';
    
    EXEC msdb.dbo.sp_add_alert @name = @Error823AlertName,
                  @message_id=823,
                  @Severity=0,
                  @enabled=1,
                  @delay_between_responses=900,
                  @include_event_description_in=1,
                  @category_name=N'[Uncategorized]',
                  @job_id=N'00000000-0000-0000-0000-000000000000';
    
    EXEC msdb.dbo.sp_add_notification @alert_name = @Error823AlertName,
    @operator_name=@OperatorName, @notification_method = 1;
    GO
    -- Error 824: Read Write Request Failure
    DECLARE @Error824AlertName SYSNAME = N'I/O Alert - Error 824: Logical Consistency I/O Error';
    
    EXEC msdb.dbo.sp_add_alert @name = @Error824AlertName,
                  @message_id=824,
                  @Severity=0,
                  @enabled=1,
                  @delay_between_responses=900,
                  @include_event_description_in=1,
                  @category_name=N'[Uncategorized]',
                  @job_id=N'00000000-0000-0000-0000-000000000000';
    
    EXEC msdb.dbo.sp_add_notification @alert_name = @Error824AlertName,
    @operator_name=@OperatorName, @notification_method = 1;
    GO
    
  • Manage By Delegation

    powershell
    Powershell might be a great skill if you need to manage lots of instances.

    More and more SQL Server instances are being deployed all the time. In fact, with the ease with which we can build a new virtual machine (VM) through snapshotting and cloning, it seems that many administrators are finding that the number of servers for which they are responsible might be doubling or tripling.

    Even moving to the cloud doesn’t completely remove the need for some administration of your data and databases, though it does require you to rework the type of administration that you perform. I foresee more hybrid solutions over time, which will require DBAs to not only manage data, but help analyze the financial impacts of moving data (and analysis) to, or back from, the cloud.

    In SQL Server 2008 we had the chance to begin managing our servers through a set of declared rules with  Policy Based Management (PBM). I haven’t seen that feature take off, and it seems relatively few people are using PBM to manage their servers. I think it’s a great platform for ensuring that your instances are conforming to certain rules, though I think there is a bit of creativity needed to ensure that this system works well for you.

    Powershell is becoming integrated into all Microsoft products. Virtually everything in SQL Server, perhaps even every thing by now, can be managed through Powershell scripts that access the SMO objects. I hear various people say that Powershell is a critical skill for DBAs of the future. I’m not sure of that, but I do think it will be used more and more if you have the need to perform repeated actions on multiple servers. Whether you use it now or not, it doesn’t hurt to learn how it works and what it can do for you.

    It just might be the tool to make your job easier as you get more and more instances to manage, something that seems to happen more and more.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • Thirteen Years Old

    A very cool shot of our company at 13.

    redgate13

    I first heard of Red Gate back in 2001 and they were our first advertising customer at SQLServerCentral.

    A few years ago they bought the company and I now work for them. It’s a great company, and a fun one. Things like this are very cool, and while a little corny, are a nice way to celebrate a minor milestone.

    I wish I was closer to the office for things like this.

  • I’m Not a Rock Star

    nickelback rockstar
    I’m not sure I would have enjoyed playing the same songs over and over, night after night.

    I used to play in a band in high school. I stood in front of crowds in bars and restaurants, dreaming of being a Rock Star. It never happened, and I’m not sure any of us had that much musical talent, but we had a lot of fun. As with most dreams, it was revived a few times in college, but eventually I let go of it, moving on to more practical, and less risky, career choices. However there are still times I’ve thought, “What if I’d tried harder….”

    I’ve had a great career and wonderful life and have no regrets. I’m lucky enough to work for a great company, and I get to spend my days at home, doing something I really enjoy. I get to travel as well, doing talks and meeting lots of data professionals all over. Both of those bring a smile to my face. Over the last couple weeks I participated in the SQL in the City tour, and while it was a tough schedule to follow, I really enjoyed the chance to meet so many DBAs and developers all around the country. We’ve still got one more event, on Monday, Nov 5, in Seattle, the week of the PASS Summit. Come by if you’ll be in town. It’s free, just register.

    Our tour covered five cities across eleven days, fortunately circling around Denver so I was able to go home a few times for a day or two. It’s much less grueling a schedule than many athletes or musicians follow, but it did teach me one thing: I wouldn’t have done well as a rock start. Delivering the same talks every two or three days was harder than I expected, and I didn’t love that part of the events. I would have preferred a little more variety of presentations, and it’s something I want to consider for future tour events.

    One very important thing I’ve learned across the last decade or so is that I need to understand who I am and what I like to do. I realized that often in my career I was willing to bend and flex to meet the demands of various employers. However when the bending and flexing was too far from my comfort zone, or occurred too regularly, I haven’t enjoyed the jobs.

    It’s important to know what you like, what you don’t, and what you are good at accomplishing and then finding the job that fits you. I might do another tour, but I won’t do them constantly. It’s not something I like or want to become a large part of my job.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.