Working with a set of tables recently that “should” have all been created in a similar manner, I noticed that some of the tables had a primary key defined while others had a unique index. Based on experience I knew that these 2 concepts were “almost” the same but had never bothered to note the… Continue reading Primary Keys vs. Unique Constraints vs. Unique Indexes
What? Time travel? So…today I had a request to change the date on one of our “test” SQL Servers so that the users could perform some date-sensitive testing. I moved the date forward (the OS date/time) a couple of days…the users tested…then I moved the date back to the current date. Easy, right? Well, SQL… Continue reading SQL Agent and Time Travel
This post is the second part of a two-part series on techniques for writing stored procedures. I’ve been mulling over this topic for some time, writing notes on occasion and trying to put some order around this topic… What I’d like to convey is not so much the “syntax” of writing stored procedures, but some… Continue reading Stored Procedure Techniques – Batch
This post is (hopefully) part one of a two-part series on techniques for writing stored procedures. I’ve been mulling over this topic for some time, writing notes on occasion and trying to put some order around this topic… What I’d like to convey is not so much the “syntax” of writing stored procedures, but some… Continue reading Stored Procedure Techniques – Online
I recently had someone ask me this question, and I didn’t know the answer. Yes, SSRS keeps track of this information in the ReportServer database, I just had to look around a little bit. Here are some quick queries to let you know what reports are in your SSRS instance and what users are running… Continue reading Who is executing my SSRS Reports?
Maybe this title is a bit misleading…another title might be “how are you monitoring your SQL Servers?” There are many ways for a DBA to keep tabs on his/her servers; I have many different T-SQL scripts to grab info when I need it. However, I frequently run into the same issue; I can run these… Continue reading Are you using SSRS?
One of my SQL Agent jobs recently started throwing the following error: Failed to initialize sqlcmd library with error number -2147467259. [SQLSTATE 42000] (Error 22050). This job has run successfully for years…Why the sudden error? I searched the web for answers and found articles that told me that my SQL Agent service account wasn’t setup… Continue reading Sp_Send_dbmail error