Scripts

Technical Article

Encryption Example

Here in this T-sql tip I'am trying to compare the word "Hijacker" with two cases(line 3 and 4). Now they are in same when you compare the case (letter to letter), now you change the case of word "Hijacker" in either of the lines and run this SQL statements it will return different results. This […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-01-05

707 reads

Technical Article

Shrink DBs - Job Script

I'm posting this job script because it gets used by my scheduler script. It simply enumerates through each database on the server, and then executes a DBCC SHRINKDATABASE. The only wrinkle here is that I have it do a quick check to make sure that certain jobs are not already running.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-01-04

1,218 reads

Technical Article

Transaction Logs - Job Script

I've included this job script, because it is used by the scheduler scripts that I've also posted. This job is a little more involved than most may need... It first checks to see if certain jobs are running. Is so, it waits for a while, and then checks again. After that it drops the existing […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-01-04

1,193 reads

Technical Article

Check Jobs Current State

I created this script in an attempt to better automate many different jobs that run each morning, as part of a datawarehouse build. I use it to not only tell me what jobs are currently running (so that I can manage how many I would like to run at a time), but what happened to […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2002-01-03

1,318 reads

Technical Article

Generate Restore DB Scripts from prev backups v1.0

Using the the MSDB backup tables, will generate the basic disk RESTORE commands for a database. It will include the Full, differential and all associated log recovery commands for you. Run the stored proc in Query Analyser then copy/alter the output to recover your DB. Great if using EE is not your cup of tea. […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-01-03

397 reads

Technical Article

Port from Oracle's TRANSLATE Function

Here is a port from the Oracle's TRANSLATE function to T-SQL. It gets three arguments: a string to be searched, a string with a set of characters to be found and replaced, and another set of characters as the replacements. Example: SELECT dbo.TRANSLATE('ABCDE', 'BD', 'CE') It will return 'ACCEE'.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2002-01-03

504 reads

Technical Article

Script to Show All Failed Jobs in Specified Period

This script will allow you to create a stored procedure that will check a server for any jobs that have failed in a specified number of days. It has proven valuable to me, since I have servers with lots of jobs that run frequently; I got tired of checking the history of each job to […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(4)

You rated this post out of 5. Change rating

2002-01-01

4,506 reads

Blogs

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,...

Don’t Fear the Technology

By

The concern that a particular technology is going to destroy the world seems to...

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