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,563 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,202 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,153 reads

Blogs

The Book of Redgate: Customer Quotes

By

Many organizations list customer testimonials and quotes on their websites or literature. It makes...

Using Cron in Postgres Flex

By

pg_cron is a simple cron-based job scheduler for PostgreSQL that runs inside the database...

Can I Change a Primary Key Value? #SQLNewBlogger

By

I heard someone say recently that you can’t change a primary key value in...

Read the latest Blogs

Forums

Life Moves Pretty Fast

By Grant Fritchey

Comments posted to this topic are about the item Life Moves Pretty Fast

Parse XML data from SQL table using temp tables and variables

By Lord Slaagh

Hello SSC, Happy Friday! I have to optimize a process that uses dynamic SQL...

50 Years of Microsoft

By Steve Jones - SSC Editor

Comments posted to this topic are about the item 50 Years of Microsoft

Visit the forum

Question of the Day

Multiple Collations

Can I have a collation expression like this in SQL Server 2022?

...
WHERE ColumnA = ( 'abc' COLLATE French_CI_AS) COLLATE French_CS_AS
...

See possible answers