Welcome to Everday SQL
My name is Patrick Keisler and I have been a Microsoft SQL Server DBA for over 12 years. During that time I have been working for Wells Fargo Securities. I have gained considerable knowledge over...
View ArticleUse Powershell to Manage Idera SQL Diagnostic Manager
Idera SQL Diagnostic Manager (or as I call it "SQLdm") is a great monitoring and performance tuning tool that I was introduced to a few years ago. There are no server-side agents, so it's a very...
View ArticleHow to Make SQL Server Listen on Multiple Ports
Have you ever needed an instance of SQL Server to listen on multiple TCP/IP port numbers but didn't know how to implement it? Well here's a quick step-by-step guide that will work for SQL Server 2005,...
View ArticleGrant Execute Permission on All Stored Procedures
Right out of the box, SQL Server makes it pretty easy to grant SELECT, INSERT, UPDATE, and DELETE to all user tables. That's accomplished by using the built-in db_datareader (SELECT) and db_datawriter...
View ArticleWhich SQL Instance is Killing Your CPU?
You have 5 instances running. How do you know which one is killing your CPU?As you can see from Windows Task Manager, you have several instances of SQL installed and one of them is using nearly half...
View ArticleCapture Index Usage Statistics for Better Analysis
Starting with SQL Server 2005, Microsoft introduced Dynamic Management Views to help DBAs see what's going inside of SQL Server. One of my favorite is the sys.dm_db_index_usage_stats. It collects...
View ArticleCustomize the Management Studio Toolbar
Management Studio is great tool with almost everything you need right at your fingertips. Notice I said "almost". I like to customize the toolbars to meet my needs of doing work every day. Because...
View ArticleDynamically Create a Folder for Each Database
If you're a DBA like me then you're probably pretty detail-oriented and like to keep things very organized. For example, when doing database backups, I like to have a specific folder structure to hold...
View ArticleHow to Use xp_dirtree to List All Files in a Folder
UPDATED -- Dec 31, 2012 -- Be sure to read Part 2 of this post discussing xp_dirtree.Last week I blogged about how to use an undocumented stored procedures to create folders. This week we need to do...
View ArticleHow to Use xp_delete_file to Purge Old Backup Files
Continuing on my recent trend of using undocumented stored procedures, this week I thought we can cover using xp_delete_file to purge old backup files from a folder. This is stored procedure used by...
View ArticleGet Performance Counters from within SQL Server
I think most DBAs know that you can use the Windows Performance Monitor to capture performance metrics for your SQL Server. But did you know that you also have access to all the SQL Server performance...
View ArticleT-SQL Terminator
You may have noticed in my code examples, I always include a semicolon ";" at the end of my TSQL statements. If you're not doing this, then you need to start now. Actually, if you're not writing TSQL...
View ArticleSQL Saturday #143 - Washington, DC
Last week, I attended my very first SQL Saturday event in Washington, DC. Although I don't live anywhere near Washington, I was able to make the short trek from Charlotte, NC. It was well worth the...
View ArticleHow to Use xp_dirtree to List All Files in a Folder - Part 2
In a previous blog post, I demonstrated how you can use an undocumented stored procedure, master.sys.xp_dirtree, to list all files in a folder. The previous posting mostly talked about how the stored...
View ArticleSQL Server has encountered % occurence(s) of cachestore flush for the %...
Have you seen this type of an informational message in your SQL errorlog before? If so, then I hope the timestamp associated with it was not during the middle of your peak processing time. This is a...
View ArticleExam 70-432 - SQL Server 2008 Implementation and Maintenance
For years, actually more like a decade, I've been saying that I'm going to get certified in SQL Server. Well finally after years of saying it, I finally did. I passed my first exam, 70-432, this past...
View Articlesp_PerformanceCounters - Get a Health Check of SQL Server's Performance
During your career as a DBA, you'll run across articles by SQL experts or other DBAs that just give you an idea. A few years ago I found an article, or a poster to be more precise, that explains SQL...
View ArticleHow to Remove (Undo) Table Partitioning
I have seen plenty of articles and blog posts out there for how to setup and implement table partitioning, but very few for removing or undoing it. So I thought I would cover a few ways to accomplish...
View ArticleWhat is DBCC SHOW_STATISTICS Telling Me About My Data?
Per Books Online, DBCC SHOW_STATISTICS displays current query optimization statistics for a table or indexed view. Basically it shows you the statistics, or a summary of the data, that SQL Server will...
View ArticleT-SQL Tuesday - Use Powershell to Restore a Database on a Different Server
T-SQL Tuesday - This month's party is hosted by Wayne Sheffield (blog|twitter), and the topic is about Powershell and how to use it for anything SQL Server. With that challenge, I'd like to share a...
View Article