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]

Generate BCP Export and BCP or BULK INSERT Import Code

As the final post of 2011, and considering that most DBAs might start considering upgrading to the latest version of SQL Server when it is launched at the end of March 2012 (?), I am publishing a script which I found very helpful for upgrades and database migrations. [Read More]