Delegate DBA Permissions to non-DBAs

In an organisation where Development, Test and Production environments are segregated and managed by a central team of DBAs sometimes developers or testers require a higher degree of privileges to specific users or groups of users in order to implement schema changes, creation of roles, etc. [Read More]

Saving a Binary File into SQL Server

Sometimes we have a requirement to store unstructured files such as JPG, PDF, DOC, and even media files such as WAV, MP3, and AVI (to name a few) to an SQL Server database. Examples of such applications include forms (structured) which include photos, scanned images or documents, CV’s, and more.... [Read More]

Dynamically load delimited files to a table

There are various methods to load delimited files to a database. Some might opt to use SQL Server Integration Services (SSIS), others the BCP command line application, or write a .NET application which used the SqlBulkCopy Class, while some might choose one of the many non-Microsoft products available on the... [Read More]

Persist Index Usage Statistics

During a database/application performance investigation we wanted to check which indexes were being used. The database had almost 1,200 indexes (!!) most of which we believed were redundant or partly causing a performance overhead. A quick review of the indexes showed that most were created on one column and only... [Read More]