SQLServerCentral Article

SQL Server Stored Procedures and SET options

SET options on stored Procedures work a bit different when compared with ad-hoc queries. These differences in behavior are often overlooked when developing the procedures and generating deployment scripts. This mistake can lead to undesired behavior in the application.

4.25 (36)

You rated this post out of 5. Change rating

2015-10-02 (first published: )

20,066 reads

SQLServerCentral Article

An in-depth look at change detection in SQL Server - Part 02

Auditing, conflict resolution, tamper & concurrency protection are some of the most common requirements for any enterprise system – this 2-part series presents an in-depth look at the various change detection mechanisms available within SQL Server.

4.92 (13)

You rated this post out of 5. Change rating

2013-02-19

8,281 reads

SQLServerCentral Article

An in-depth look at change detection in SQL Server - Part 01

Auditing, conflict resolution, tamper & concurrency protection are some of the most common requirements for any enterprise system – this 2-part series presents an in-depth look at the various change detection mechanisms available within SQL Server.

4.58 (12)

You rated this post out of 5. Change rating

2013-02-12

5,242 reads

SQLServerCentral Article

Never update systems tables directly - a study in Agent job scheduling

It is often recommended that system tables should not be updated directly. Presenting a case in point built around nightly job configuration in order to demonstrate the possible issues with updating system tables directly.

4.44 (16)

You rated this post out of 5. Change rating

2012-09-17

5,541 reads

Blogs

Are ABORT_AFTER_WAIT's victims logged?

By

In SQL Server, using the KILL command to terminate a session results in an...

Part 2: The Modern Azure Data Warehouse – ADF and ADLS

By

In today’s data-driven world, having the right tools to manage and process large datasets...

A New Word: Flichtish

By

flichtish – adj. nervously aware how much of your self-image is based on untested...

Read the latest Blogs

Forums

How Big Data Supports Gen AI

By Prasenjit

Comments posted to this topic are about the item How Big Data Supports Gen...

Backup with Checksum Show No Issues, While DBCC CHECKDB Reports Errors

By IT researcher

I took a backup with the CHECKSUM option, which was successful and showed no...

Realities of Predictive Analysis

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Realities of Predictive Analysis

Visit the forum

Question of the Day

Multiple Query Trace Flags

I want to enable two trace flags, 4199 and 4137, for a single query. How should I do this:

-- A
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199, 4137);

-- B
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199, QUERYTRACEON 4137);

-- C
SELECT
  a.AddressID
, a.AddressLine1
, a.AddressLine2
, a.City
, a.StateProvinceID
, a.PostalCode
, p.FirstName
, p.LastName
FROM
  Person.Address a
  INNER JOIN person.Person AS p
    ON p.rowguid = a.rowguid
WHERE
  City           = 'SEATTLE'
  AND PostalCode = 98104
OPTION (QUERYTRACEON 4199), (QUERYTRACEON 4137);

See possible answers