Several months ago someone commented on a calendar thread that you should not even try to calculate Easter in SQL Server because the math was too hard. That got me to thinking and I decided to see if that was actually the case. I found that there are several well known algorithms available - but […]
2020-04-06 (first published: 2020-03-31)
5,020 reads
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: 2020-03-13)
1,616 reads
Easily graph your storage needs based on msdb backup data recorded automatically, no matter what your backup solution is.
2020-03-17 (first published: 2020-03-10)
1,695 reads
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: 2020-03-13)
1,274 reads
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 […]
2020-03-05 (first published: 2020-03-02)
1,171 reads
This script returns a list of all the fields of a table with it properties, primary keys and user defined types.
2020-01-21 (first published: 2014-04-30)
1,718 reads
See a template for a procedure in a procedure.
2019-12-20 (first published: 2019-12-10)
2,102 reads