Get the NULL percentage of values in a specific table dynamically

  Nothing really fancy, but a small script I was now asked twice for. So I thought I publish it for the public and for the reference for others. It simply calculates the percentage of NULL values for a specific table in all columns. The last request was originated from the post here. Be aware…

4

ALM Visual Studio Database Projects Guidance is out in the wild !

  After many months of hard work, collaboration, short weekends and nights, the new ALM Rangers guidance document is out covering Visual Studio Database Projects. Details about the documents and the documents themselves can be found here: Visual Studio Database Guide on Codeplex  You will find a General guidance Specific scenarios HOLs for each topic Solution…

3

Expand :r referenced files for SQLCMD into one file (SQLCmdScriptExpander)

(Updated version available in this blog post) How can we expand files from a .sql file referenced with the :r operator ? Ok, lets make a step back in the past and see how we used to reference files in .sql files and calling them via OSQL or ISQL. The answer is, we couldn’t. We…

5

Script out jobs in SQL Server v2

  For those asking a couple of times if the JobScripter for SQL Server Agent jobs is also available in 2008… here it is ! The only difference is that the version v2 is now targeting to SMO Assemblies of SQL Server 2008 which is version 10.0. This sure means that you are able to…

4

Did your SQL Agent doze off and you don´t know which jobs to run afterwards ?

  In some cases you might face the problem that SQL Server Agent Service didn’t come up or was stopped for reason. Jobs scheduled in the downtime will not run automatically when the Agent service comes up again, and that is a good thing. I often hear people saying, why isn’t that supposed to be…

9

Database internal file versions–Where is the Undo button for a database upgrade ?

  A common question is how to move back to the older version of the database once upgraded. The answer is, you can´t. By attaching the database to the new SQL Server version an upgrade is done internally which can be seen if you run the attach commands in e.g. the script window of SSMS….

3

SSIS as a data source for SSRS–where is it gone for SQL Server 2008 R2

Some time ago I did a blog entry for SQL Server Integration Services packages as a data source for SQL Server Reporting Services reports. You can find this article here. This feature relies on a data processing extension that is explained in detail here (http://msdn.microsoft.com/en-us/library/ms345250.aspx). Due to security reasons, this feature has been deprecated and…

4

Usage of @@Trancount in DML statements

  Some time ago I got an interesting questions why the following applies: –drop table a create table a(m varchar(max), i int) go declare @cnt int –Explicit transaction begin tran set @cnt=@@trancount insert into a select ‘inside’, @@trancount insert into a select ‘inside cnt’, @cnt commit tran set @cnt=@@trancount –Implicit transcation insert into a select…

5