Patrick Slesicki

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.

2020-03-23 (first published: )

534 reads

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

577 reads

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

704 reads

Blogs

Daily Coping 8 Jul 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Don’t be afraid of No

By

How many times have you been afraid to hear “No”? We have all been...

Spark .NET - Spark ML TF-IDF

By

Spark ML in .NET for Apache Spark Spark is awesome, .NET is awesome, machine...

Read the latest Blogs

Forums

In where condition use column value which contains column name

By rohit.kumar.barik

Hi Team, Greetings! I have below table. let table name =Emp I need to...

Indexing in a Merge Replication environment

By pssudarshan

Hello SQL Gurus I am new to Database design.  We are building an application...

compare row data

By abhas

Hi , I am having table in below format. I want to calculate difference...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers