All posts by Codereview

Setup SQL Server alerts and email

Scenario

Setting up an alert to e-mail an operator with a message is a multiple step process. You can setup database mail, define an operator and an alert, but still no e-mail is being sent. So how do you send an alert to an operator?

Solution

This solution involves restarting SQL Agent. Continue reading Setup SQL Server alerts and email

#Sql Server interview question: What is filestream in SQL Server?

Filestream allows you to store unstructured large objects (text documents, images, and videos) in the file system and have these files integrated within the database. Filestream basically integrates the SQL Server Database Engine with NTFS (New Technology File System); it basically stores the data in the varbinary(max) datatype. Continue reading #Sql Server interview question: What is filestream in SQL Server?

#Sql Server interview question: What do you mean by TABLESAMPLE in SQL Server?

TABLESAMPLE allows you to extract a sampling of rows from a table in the FROM clause. Continue reading #Sql Server interview question: What do you mean by TABLESAMPLE in SQL Server?

#Sql Server interview question: What is change tracking inside SQL Server 2008?

Change Tracking was a much anticipated feature in SQL Server 2008. Prior to SQL Server 2008, SQL DBAs had to code complex triggers and archive tables in order to track changes made to their database tables. Continue reading #Sql Server interview question: What is change tracking inside SQL Server 2008?

Exemple of SQL Server Cursor

Scenario

In my T-SQL code I always use set based operations.  I have been told these types of operations are what SQL Server is designed to process and it should be quicker than serial processing.  I know cursors exist but I am not sure how to use them.  Can you provide some cursor examples?  Continue reading Exemple of SQL Server Cursor