Scripts

Technical Article

Dependencies on a specific table column

SQL Server provides a built-in stored procedure, sp_depends, that returns object dependencies.  Recently, I discovered a need for determining dependencies on a table column, not just the table itself.  For example, a table may be referenced by many stored procedures and views, but a specific column in that table may only be referenced in a […]

5 (1)

You rated this post out of 5. Change rating

2002-12-03

2,805 reads

Technical Article

Add Check Digit (LUHN)

If you ever need to create a credit card like number this stored procedure is for you.Most credit cards contain a check digit, which is the digit at the end of the credit card number. To generate the check digit, the LUHN formula is applied to the number. To validate the credit-card number, the check […]

You rated this post out of 5. Change rating

2002-11-30

4,153 reads

Technical Article

Check user activity

This stored procedure is another monitoring utility that can be executed periodically as a sql server agent job. The procedure checks if there are any open connections, and if there was any recent user activity within a given period of time in a given (or any) database by a given (or any/any except given) login […]

You rated this post out of 5. Change rating

2002-11-30

1,279 reads

Technical Article

Delete old versions of DTS packages

This script will remove old versions of DTS packages. It accepts a single parameter which is used as a filter criteria on the package name. It will also remove package log records for the version that is deleted.EXAMPLE: EXEC usp_DelOldDTSPkgVersions @vcrPkgName = 'Devel'This will delete old versions for packages that have 'Devel' in the nameQuestions […]

5 (2)

You rated this post out of 5. Change rating

2002-11-30

1,156 reads

Technical Article

Remove old DTS Package versions

This Procedure is what I use to clean out all the old DTS package version on my server periodically. You just place it in the msdb database and run it as you need to.Note: Although I have never had an issue with it, I do suggest backup msdb database beforehand, just in case you wack […]

5 (1)

You rated this post out of 5. Change rating

2002-11-30

310 reads

Blogs

Secret management using Pulumi ESC SDK and Azure Key Vault

By

This is a submission for the Pulumi Deploy and Document Challenge: Shhh, It’s a Secret!What...

The Book of Redgate–Being Reasonable

By

As a part of the Book of Redgate, we have a series of (red,...

Azure Data Factory Pipeline Debugging Fails with BadRequest

By

I recently had a new pipeline fail. It was actually a copy of an...

Read the latest Blogs

Forums

The User Login

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The User Login

Using Feature Flags

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Using Feature Flags

Understanding UNION and UNION ALL in SQL Server

By omu

Comments posted to this topic are about the item Understanding UNION and UNION ALL...

Visit the forum

Question of the Day

The User Login

When I create a user in a SQL Server 2022 database, on which types of logins in the master database can it be based?

See possible answers