FrankDolan77

I have been working with SQL Server for nearly 10 years as a database developer.

SQLServerCentral Article

T-SQL Language Changes in SQL Server 2022

SQL Server 2022 is in preview in August 2022. I assume this version will be released later this year, and I have been testing it with the idea that I will be looking at an upgrade sometime in the next year for a few servers. There are a lot of changes in the database platform, […]

4.92 (12)

You rated this post out of 5. Change rating

2022-08-31

25,792 reads

SQLServerCentral Article

PowerShell Day By Day: The Pipeline

In this article, I wanted to discuss the PowerShell (PoSh) pipeline, which was confusing to me at first and took some time to get used to working with. I had used one in Linux before, but the PoSh one is more powerful, but also slightly different. Hopefully I can demystify some of the concepts for […]

5 (5)

You rated this post out of 5. Change rating

2020-12-31

4,056 reads

SQLServerCentral Article

Creating SQL Agent Jobs to Run PowerShell

In one of my articles, Calling Procs from PowerShell with Parameters, there was a question in the discussion about calling PowerShell (PoSh) from SQL Agent Jobs. I haven't done much of that, as most of my PowerShell is interactive scripts to make work easier when managing lots of servers. However, it was an interesting challenge, […]

4 (1)

You rated this post out of 5. Change rating

2020-11-30

5,773 reads

SQLServerCentral Article

PowerShell Day by Day: Filtering Objects

In my last article, The Basics of PowerShell Day By Day, I covered some basics of getting started. These articles aren't intended to replace some of the getting started information in things like the Stairway to PowerShell. Instead, I am covering some of the tips, tricks, techniques, and bits of knowledge that I wish I'd […]

5 (6)

You rated this post out of 5. Change rating

2020-10-08

2,784 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

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

How Big Data Supports Gen AI

By Prasenjit

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

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