Category Archives: SQL Development

How to sign a SQL Server CLR Assembly in Visual Studio 2015

It took me quite a while to figure out how to sign a SQL Server CLR Assembly (like a CLR stored procedure / function / trigger etc) in VS 2015. If you google “sign a SQL Server CLR Assembly”, you … Continue reading

Posted in SQL Development | Leave a comment

CLR Stored Procedure Cannot Be Marked as System Object?

It is an open secret that in SQL Server, we can “create a system object” by using an undocumented stored procedure sp_MS_marksystemobject as explained here. The benefit is that when you put a SP in the [master] database and mark … Continue reading

Posted in SQL Development | Tagged | 1 Comment

Decode SQL Server Job Schedules

As once a data architect, I cannot help but admiring and appreciating the data model behind the sql server job schedules. The core design is actually just one table, msdb.dbo.sysschedules, but the design beauty/elegance of the table is that it … Continue reading

Posted in Administration, SQL Development | Tagged , | Leave a comment

Delete backup files older than <xx> days

For almost all sql backup jobs, we want to have a step to delete old backup files older than a specified time. Usually there are two ways, one is to use Maintenance Plan or we create our own “cleaning” step … Continue reading

Posted in SQL Development | Tagged , , | Leave a comment