Technical Article

relatively simple mode, median, mean

Here's a sample script to help you get some generic mode, median, and mean statistics for something. In my example, I'm getting the number of days something takes to start and stop some task. The idea is that I'd have a fairly short list of jobs, and record would record the job id, and start/stop […]

You rated this post out of 5. Change rating

2006-08-17 (first published: )

1,041 reads

Technical Article

Change column collations back to database default

This script will create a single-line ALTER TABLE statement for each column in any table to change the collation to match the 'database default'. This is best accomplished in the Query Analyzer -- simply run the script, select all the records, and paste them into a new window to run them.

You rated this post out of 5. Change rating

2005-12-29 (first published: )

1,954 reads

Technical Article

Large auto-job-creation script for adding backups

This script creates a stored proc that was intended to run from a trigger on the master..sysdatabases for each database creation. Alas. It will create three jobs for each database you apply it to. First, it'll create a job to run a full backup each Sun, at 5am (see below). Those backups will be retained […]

You rated this post out of 5. Change rating

2004-12-16 (first published: )

371 reads

Blogs

Using Git Prune–#SQLNewBlogger

By

As I’ve been working with SQL Saturday and managing changes to events, I’ve accumulated...

Microsoft Purview new data governance features

By

Starting last week is a rollout of the public preview of a new and...

SQL Database Administration: Not For Everyone (But Maybe It’s for You)

By

Let's get one thing straight: database administration isn't the most glamorous tech job out...

Read the latest Blogs

Forums

Do I need a recursive query for this? bill of materials (sort of)

By pietlinden

I am working on a data warehouse project for a bakery. For the most...

Do I need a recursive query for this? bill of materials (sort of)

By pietlinden

I am working on a data warehouse project for a bakery. For the most...

Create Copy of DB in same server.

By terry999

Hi I want to create a copy of a DB on the same server....

Visit the forum

Question of the Day

Restoring the Resource Database

How can I restore a version of the Resource Database in SQL Server 2022?

See possible answers