Script to generate DEFAULT Constraint definitions

A few posts ago I published a Script to generate Trigger definitions. This week’s topic covers another automation script to generate scripts, this time related to DEFAULT Constraints.  Simplistically put, whenever a DEFAULT constraint is definied on a table column, if the column is set to disallow NULL values and... [Read More]

Automatically Back Up the Transaction Log when 75 Percent Full

Once your databases are live and your production SQL Server instance is functioning to it’s best, a user might decide to transfer large amounts of data into a database using SSIS, BCP, or some other custom application.  When such data transfers occur SQL Server logs activity in the transaction log. ... [Read More]

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]