Scripts

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,097 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,268 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,140 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

309 reads

Technical Article

Setting permissions (Updated: UDF's now set)

Here is a script I wrote to automate updating of permission on a database. Often running as sa I forget to set the rights for objects when distributing db objects. It provides the capability to process only certain object types, and whether or not to print and execute the persmissions change or just print out […]

You rated this post out of 5. Change rating

2002-11-22

447 reads

Technical Article

Grant/Revoke EXEC permissions  for all procs in DB

Useful in dev environments when you need to periodically assign execute permissions on all procs in a db (drop/create scripts may have been run without re-assigning permissions)Accepts DB name, ProcLike for matching 'starts with' pattern against proc names in DB, revoke (optional - defaults to 0/True) specifies wheter to GRANT or REVOKE permissions

You rated this post out of 5. Change rating

2002-11-21

391 reads

Technical Article

Monitoring SQL Server downtime

The following script creates a monitoring utility to find out for how long a sql server was down prior to the latest startup. The script creates one table (tblHeartbeat), four stored procedures (uspFillHeartBeat, uspGetDowntimeSummary, uspCleanHeartbeat, uspAtStartup) and two jobs (FillHeartbeat and CleanHeartbeat).Notes:1. By convention I introduced in my company (UGO Networks, Inc.) all "service" database […]

You rated this post out of 5. Change rating

2002-11-21

799 reads

Blogs

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Read the latest Blogs

Forums

Creating paginated report where each page is a month in the range selected

By plsh

With in the paginated report I am trying to display on each new page...

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Do You Want a Microsoft Solution?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Do You Want a Microsoft...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers