Scripts

Technical Article

5 (6)

You rated this post out of 5. Change rating

2022-02-22 (first published: )

7,214 reads

Technical Article

SQL Server instance startup type check by SQL script

I have developed the script to check SQL Server instances startup type, sometimes we didn't know all our SQL instances startup type correctly configurated, especially we cannot distinguish the Automatic and Automatic(Delayed Start) from the direct query, the only way is querying from the registry, you can use this script in your environment to bulk […]

5 (1)

You rated this post out of 5. Change rating

2021-12-24

1,393 reads

Technical Article

Get backup folder sizes from shared Location

Got a message from the Operation team as below Hi Harsha, I'm seeing a larger than normal rate of change for a week day on the backups for the SQL2000 servers. Did anything run differently yesterday compared to Monday? I have 22 sql servers and all the Weekend and Monthly backups goes to the location […]

5 (1)

You rated this post out of 5. Change rating

2021-12-03

494 reads

Technical Article

Import Multiple Packages to SSIS server

We cannot import multiple packages on the SSIS server. So, loading 100 packageS from  file location will be a tedious task for a DBA. We can solve this issue by making use of the DTUTIL utility. The DTUTIL utility can also import one package at a time, but we can write the batch file using the […]

You rated this post out of 5. Change rating

2021-09-27 (first published: )

1,478 reads

Blogs

6 Can’t-Miss Basic SQL Courses to Learn in 2024: Your Fast Track to Data Mastery

By

Ready to dive into the world of SQL? Whether you're dreaming of a lucrative...

Data-driven vs. Data-informed: Let’s Acknowledge the Truth

By

This comic was retweeted into my timeline on Twitter (I refuse to call it...

Writing Parquet Files – #SQLNewBlogger

By

Recently I’ve been looking at archiving some data at SQL Saturday, possibly querying it,...

Read the latest Blogs

Forums

Excel blobs & BCP extract commands...

By jellybean

Hi everyone, I have been asked to investigate storing Excel files in Sql Server...

Can you connect Power Apps to SQL Server if you work in the government?

By JJ B

My agency has been using the combo of on-premises SQL Server for the back...

Unable to connect to SQL 2019 using Pyodbc

By yyang5823

Development Environment I am learning how to use pyodbc and accessing database in SQL...

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