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,047 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: )

891 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,002 reads

Blogs

Why You Need Presentation Skills

By

And no, the answer is not because you want to be a Microsoft MVP....

Daily Coping 29 Sep 2022

By

Today’s coping tip is to avoid saying “I should” and make time to do...

How to Calculate Compound Rate in Power BI

By

Recently I had an interesting use case where I had to a compound calculation...

Read the latest Blogs

Forums

TCP Provider: A connection attempt failed for target server

By SQL Galaxy

Hi. In source SQL Instance target linked server has been created and connection tested...

Get Part number and display in Header

By Siten0308

Hello, so I have a part number, and I want to display it in...

BlobColumn to String

By yukinonon

I have this column in sql server that has value of "dog,cat,mouse" so I...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers