Execute Multiple Script Files in One Batch

This must have happened to most DBAs: you’re working on the usual stuff, monitoring your SQL Server instances, trying to keep everything oiled and running smoothly when you receive a phone call from a developer who tells you about some new module that has to be implemented soon.  You schedule... [Read More]

Extract Database Priviliges for a Login

A common post-implementation requirement is the checking or verification of database privileges granted to logins.  This is usually triggered by an audit, a security breach, or (preferably) a proactive approach to security.  In SQL Server 2000 permissions were quite simple.  A login had access to a database or not.  The... [Read More]

Using Built-In Multi-Language Month and Weekday Names for Application Lists

Client-facing applications which require that a user choose say, a month or weekday name from a list usually rely on hard-coded lists or by the values in a table, config file, or other location.  Unless the original design allows for multiple languages, it can easily get messy when extending the... [Read More]

Find the Next Available Working Day using T-SQL

A while ago I helped a colleague develop a T-SQL function that would increment a date by an integer value and return the first working day following and closest to the resulting date.  The requirements were not complex - a date is incremented by a number of days and the... [Read More]