Powershell to Automate SQL Compare

Tools
A question came up on the SQL Server Central Forums, how could you use Red Gate SQL Compare to automate creating scripts for all your databases at once. What’s the first thing that popped into my head? Yep, Powershell. SQL Compare Pro comes with a command line utility that allows you to automate just about everything you can do with the GUI. I like to use it when I’m setting up deployment mechanisms for systems because it makes one click deployments possible. I won’t go into all the methods of that type of automation here. For a lot more information on that topic, check out the Team-Based Development book. If you’re interested in exploring how you can use the command line, just type this: sqlcompare/? Now is a good time…
Read More

SQL Saturday #71: Call For Speakers

PASS
The SQL Saturday #71/New England Data Camp #3 call for speakers has been open for quite a while. But, we had not yet sent out an official request. That email has now gone out the door. Here it is for those who might be interested in presenting. Please consider this your personal email: Let me tell you a little bit about our event. Last year we had over 300 attendees. We plan on doing that well again this year. That’s a guaranteed audience for your presentation. We’re holding the conference in the Microsoft offices on Jones Road in Waltham. The venue is well appointed and set up for presentations. We’re already gathering sponsors from all over the country and the region. It’s going to be a great event. Please submit…
Read More

A Friend of Red Gate No More

Misc
Don’t get me wrong. It’s been great. The beta tests. The advanced notices. The opportunity for feedback. It’s been a great relationship, a fantastic friendship. Look, it’s not you, it’s me. I want more. I want to take our relationship to the next level. That’s why I’m excited as can possibly be to announce that I’m no longer in the Friends of Red Gate program because I’m now a Red Gate employee. That’s right, I’m colored Red! This is an amazing opportunity to step up my game to a whole new level and I’m thrilled to be able to take advantage of it. I have a fascinating title: Product Evangelist. I’m going to be traveling around the country to various events, SQL Saturdays (Cleveland & Chicago already booked), SQL Rally,…
Read More

Deprecation, Trace and Execution Plans

SQL Server, T-SQL
As I’m sure you know, Microsoft occasionally changes it’s mind. Or, it makes bad decisions and then rectifies them. Or, it even reinforces bad decisions. Regardless of the purpose, the means by which these changes are implemented when they involve taking things away is deprecation. Usually in SQL Server the deprecation process is supposed to be over three releases. So while seeing something on the deprecation list can be cause for concern if it’s something you like, you certainly don’t need to panic. I’ve finally had a chance to start working with Denali and the place that concerned me most was in the areas of deprecation. I want to make sure that when I suggest a particular approach, that the approach isn’t going to disappear in a version or two.Which…
Read More

DBA 101: Why is my log file full?

SQL Server
This question comes up constantly in different venues. I see it sometimes 2-3 times a day on SQL Server Central. I know it pops up at least once a week on Ask SSC. I’m sure I’ve seen it on Twitter #sqlhelp. “Why is my log file growing?” and “Why is my log file full” are heard regularly. Or, the variation, “I ran a full backup but the log file is still full/growing.” occasionally comes up. The people asking these questions are frequently, even appropriately, frantic. I’m writing this blog post for two reasons. First, to try to add a little bit of weight to what must surely be one of the most searched for phrases on the internet when it comes to SQL Server. Second, just to have a shorthand…
Read More

Failed Blog Posts

Misc
Over the last week I've started and trashed two blog posts. Let me tell you, that's painful. You get some great idea and then it all goes south. For example, I was going to explain the difference between a table/heap scan and a clustered index scan. The problem was, I ran into gaps in my knowledge, some outright errors in my beliefs on how data was stored, and really faulty conclusions drawn from those facts and a less than thorough set of tests. I'm not even going to tell you what went wrong with the other notion. Luckily, all this was behind the scenes so I didn't post my ignorance for all to see.  Since I'm not offering you a chance to point & laugh (in this instance), you might…
Read More

TSQL Tuesday: Resolutions

Misc
Sounds like a good action adventure movie. The theme this month on TSQL Tuesday, thanks to our host, Jen McCown (blog|twitter) of SQLawesomesauce, is Resolutions. In particular, Techie Resolutions. I have to do this because Jen just received her MVP award, in case you’ve been under a rock since last week. I’m not a resolutions kind of guy. I tend to make plans. The plans might start on January 1st, or they might start as soon as they lawyers are done making up the contract. I’m not hung up on schedules except as they relate to due dates. For example, when submissions are due for the PASS Summit or something along those lines, then I’m date driven. In other words, I don’t sit down New Year’s Day or New Year’s…
Read More

Encryption and the Performance DMOs

T-SQL
Ever wonder what you can see in the performance oriented DMOs when stored procedures were encrypted? Me neither. But, I did get that question during my DMO presentation at the PASS Summit. I did not have an answer. I did get an answer from Johan Bijnens (twitter) from the audience, which I repeated without entirely knowing what I was saying. I decided that I ought to actually know the answer to that question, so here’s a little experiment. I'm going to create a simple stored procedure: CREATE PROCEDURE dbo.GetSalesDetails (@SalesOrderId INT) AS SELECT soh.AccountNumber, sod.LineTotal FROM Sales.SalesOrderHeader AS soh JOIN Sales.SalesOrderDetail AS sod ON soh.SalesOrderID = sod.SalesOrderID WHERE soh.SalesOrderID = @SalesOrderID When I create this procedure and run it, you can see the general performance of the query being run…
Read More