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

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

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

811 reads

Blogs

Azure Platform Series: cloudshell code -your (brilliant) online editor

By

This post is about code which is an online editor you can use with...

Bash: ^^}: bad substitution – upgrade your Bash version (macOS)

By

This blog post is about a situation where you are capitalising an argument in...

Azure Platform Series “You have exceeded the maximum amount of scale changes within the past hour”

By

This blog post relates to where you might be doing scale operations of your...

Read the latest Blogs

Forums

Error in bcp query out

By SQL_Surfer

I've been playing around wiht bcp out the data into csv file but been...

Multi subnet failover cluster

By sqlguru

My goal is to have an FCI across 2 nodes with shared storage (node...

Power Query or SQL Server? Which, when and why

By vsanchezjauregui

Comments posted to this topic are about the item Power Query or SQL Server?...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Strange Code

See possible answers