Script to completely Disable and Remove CDC

Hello folks, I believe most of us are having problems with stuburn CDC and would like to get rid of it someday somehow! Well, say no more! Usually after a srestore, CDC gets stuck and doesn’t behave properly but disabling using the old fashioned way doesn’t work either. So  here’s a complete script how to… Continue reading Script to completely Disable and Remove CDC

Do “random” Query Hints affect statistics in the Execution Plan?

So, there is this rumor that using a query hint affects the statistics that SQL Server uses to determine the execution plan, so we are told to ignore it. Well, ain’t that just great. Lets test it! So we did our setup. Lets test it on a simple select.  2373 gives us the memory allocation, and… Continue reading Do “random” Query Hints affect statistics in the Execution Plan?

Missing Indexes, Lazy Spools and Undocumented Flags

Now, lets start with the fact that Spools are awesome! Who doesn’t like free indexes stored in the tempdb? The whole idea about that spool operator is that it consumes a set of data and stores it in a temporary structure in the tempdb in order to be reused. However, they could be expensive! The… Continue reading Missing Indexes, Lazy Spools and Undocumented Flags

SQL Server Advanced Nested Transactions in Nested Procs

Hello Guys, As many of you have probably already experienced the pain of having to deal with multiple transactions in nested procedures, I overcame the problem with the following solution so thought I’d share it with you guys! As we have 2 procs: 1 Inner and 1 Outer( you can have as many as you… Continue reading SQL Server Advanced Nested Transactions in Nested Procs