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)

2020-03-23 (first published: )

1,122 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 […]

2020-03-16 (first published: )

937 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)

2020-03-05 (first published: )

1,038 reads

Blogs

Daily Coping 2 Feb 2023

By

Today’s coping tip is to challenge negative thoughts and look for the upside. I’m...

Deadline for Microsoft MVP contributions is 20 March 2023

By

Since changing to the new MVP renewal model, Microsoft MVPs have had until 31...

Why Managed Identities are Awesome

By

For the first workdays of this new year, I had the pleasurable task of...

Read the latest Blogs

Forums

Dimensional table and Stored Procedure

By yrstruly

To meet these requirements below, I came up with this SQL. Please evaluate my...

Anderson-Darling Calculation

By jackdanny816

Hi   I am following an article posted on sql server central on the...

Use of an NCI - that does not contain the Column required.

By SteveOC

Hello. I am a bit confused and not sure what terms to use to...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers