Scripts

Technical Article

Simple script to list out SPID, Program_name and login details

If you have any requirement where you want to find out all the SPIDs running on a database along with the program/application name of the SPID and the login details. You can run the procedure to get the details very easily.

3 (4)

You rated this post out of 5. Change rating

2019-05-03 (first published: )

3,879 reads

Blogs

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

By

I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...

Counting Groups with Window Functions: #SQLNewBlogger

By

I looked at row_number() in a previous post. Now I want to build on...

Read the latest Blogs

Forums

Temporary Table Problem

By fk.da

Hello everyone, I hope you can help me. I have a table with measurement...

A Few Good DBAs

By Rod Weir

You can't handle the truth!!  (about data integrity) A few good database administrators https://www.helpmasterpro.com/blog/a-few-good-database-administrators/...

Python with SQL 2022 Enterprise doesn’t work

By VK_Carry

I have installed Machine Learning with SQL 2022 Enterprise Edition and installed and configured...

Visit the forum

Question of the Day

Incremental Statistics

I have run this on SQL Server 2022 for the Sales database:

ALTER DATABASE Sales SET AUTO_CREATE_STATISTICS ON (INCREMENTAL = ON)
I then run this in the Sales database:
USE Sales
GO
CREATE STATISTICS CustomerStats1 ON dbo.Customer (CustomerKey, EmailAddress) WITH INCREMENTAL = OFF
The dbo.Customer table is partitioned. How are statistics created?

See possible answers