Patrick Slesicki


Technical Article

Select Group Members from Logins

Know who all the individual group members are for a given WINDOWS_GROUP login. This script uses the sys.xp_logininfo procedure to find group members for each login on an instance. This is useful when attempting to remove orphaned WINDOWS_LOGINS. May have issues working across your logged in domain.

1 (1)

You rated this post out of 5. Change rating

2020-03-23 (first published: )

1,569 reads

Technical Article

Orphaned Users Search and Destroy

This script will find all orphaned users on all databases on an instance, and generate a script to drop each user. Simply execute, copy the values from the DropScript column to a new SSMS window and execute. There are two risks with this script. Use with caution: This script attempts to take into account users […]

You rated this post out of 5. Change rating

2020-03-16 (first published: )

1,219 reads

Technical Article

String Search

The script searches through every column of every record in a database to find a value. It works with numbers too. Simply assign a value to @MyString. Indicate what datatype(s) you wish to search through, and indicate if you want wildcards, and execute. The search is smart and will only search through columns where @MyString is […]

3 (3)

You rated this post out of 5. Change rating

2020-03-05 (first published: )

1,157 reads

Blogs

A Basic Update Trigger: #SQLNewBlogger

By

I had someone ask me about using triggers to detect changes in their tables....

Apply for a 2025 PASS Summit Scholarship

By

Redgate is offering 13 PASS Summit scholarships which not only includes the 3-day ticket...

SQL Server TempDB: The Most Overlooked Bottleneck

By

Configuration, Performance, and Unnecessary Usage TempDB is the SQL Server equivalent of a junk...

Read the latest Blogs

Forums

Best/easiest way to import an SSIS package...

By jellybean

Folks, Looking for advice on the best way to import a package. I hope...

Measure duplicating its value when non-conformed dimension attribute is included

By stiej1977

Hi,   I have two fact tables (say FactA, and FactB), that are joined/shared...

balancing numa nodes

By PearlJammer1

Can anybody advise on how i go about balancing threads to each node. As...

Visit the forum

Question of the Day

How Many Nested Triggers?

I have DDL trigger code that I'm working on in SQL Server 2022, but I am concerned that we might end up with multiple triggers firing and the response to the user is delayed. If I want to check how many triggers have fired, or are nested, how can I do this in my code?

See possible answers