Scripts

Technical Article

Script to montior ErrorLogs every 3 hours.

This script monitors your errorlogs every 3 hours for the past 3 hours. It notifies you by email for all types of errors and by pager for all critical errors with severity type > 16. Saves lot of time when you have to monitor several servers every day 24x7. Run this script on a dedicated […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2002-08-09

1,222 reads

Technical Article

Smart Index Manipulation system

We are constantly having to drop indexesfrom tables while repopulating the datain the table. We then have to rebuild the indexes as they were before dropping them.This requires writing a custom drop and recreate index script for each unique situation. If we tryto write scripts ahead of time as soon as the indexing schemechanges on […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-08-06

984 reads

Technical Article

Change DTS package owner

There is a un-documented stored procedure in msdb called sp_reassign_dtspackageowner. Unfortunately, this requires a package name and will only work on one at a time.  If one developer is taking over for another, it may be helpful to change all of Bob's dts packages over to Jim.   The following procedure will do just that.Not sure […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2002-08-05

471 reads

Technical Article

Retrieve every n values

this scripts presents the way to retrieve from a given result set the values given n where n determines that the Nth value,2N th values , 3Nth value will be returnedin the example n = 3 the returning rows are 22,32,42the given set is 20,21,22,30,31,32,40,41,42

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-08-01

468 reads

Technical Article

Smooshing String Function

Smooshing - The act of removing all non-alphanumeric characters from a string. We have found several areas of our application where we need to perform cleaning on strings. The following is a SQL function which can be used to remove any non-alphanumeric characters. To use the function create the script and then SELECT dbo.fn_SmooshIt('B?\RU.,C>}E') will […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-07-26

565 reads

Blogs

Car Update September 2026

By

Software is hard. While I love our Lucid Gravity, I realize that they are...

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Read the latest Blogs

Forums

Moving Beyond the Reboot: Finding the Culprit Behind Memory Pressure

By Pablo Echeverria

Comments posted to this topic are about the item Moving Beyond the Reboot: Finding...

Reserved Words I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Reserved Words I

Get Along

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Get Along

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers