SQLServerCentral Editorial

A Thrill of Hope

I realize that this isn’t the last Database Weekly editorial of the year – that honor is reserved for Louis Davidson next week. 😊 However, as we approach the end of the year and various holiday celebrations, one of my favorite Christmas carols has been of particular encouragement to me recently. 2023 hasn’t gone exactly […]

SQLServerCentral Article

Creating a Hyperscale Database in Azure Using the Azure Portal

One of the most effective ways to fully utilize your data is to create an Azure Hyperscale database. The principles of Azure Hyperscale databases have been discussed in this article, including their cost-effectiveness, worldwide accessibility, automatic scaling, and reliable performance.

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

I have few snapshot transactions, now i need to put noloc in all tables.

By rajemessage 14195

I have few snapshot transactions , now my admin has informed me that put...

Kubernetes is Cool, But ...

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Kubernetes is Cool, But ...

Multiple Query Trace Flags

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Query Trace Flags

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