Scripts

Technical Article

Create Log tables and Triggers

Usually in business applications it is necessary to maintain the history of the data being modified for auditing purposes or for later analysis. Proven way to achieve this is to create a log table for each datatable with an additional column "Action" to indicate what the user has done on the data (either insert, update […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(6)

You rated this post out of 5. Change rating

2007-10-26 (first published: )

6,337 reads

Technical Article

Find Table Usage

Creates a printable report of all stored procedures, views, triggers and user-defined functions that reference any of the tables passed into the procedure.Wrote this to easily list items affected by table changes when working in a fast-paced development environment developing a shrink wrapped product undergoing many schema changes.Split function is listed after sp definintion

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(6)

You rated this post out of 5. Change rating

2007-10-23 (first published: )

3,356 reads

Technical Article

Find Column Name Usage

This procedure produces a formatted report to list which tables, views and table functions have a column of the specified name. This is particularly useful in systems that do not enforce referential integrity or when schema changes are being evaluated.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(6)

You rated this post out of 5. Change rating

2007-10-22 (first published: )

4,198 reads

Technical Article

MOM 2005 Datawarehousing Catchup

I wrote this script because our MOM Datawarehousing got so damn behind.Every time the windows Scheduled task tried to run to warehouse the dataout of OnePoint, it would puke because the SQL log would fill up. Thisallows you to start so many days out and it will increment it down by the number of days […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-10-18 (first published: )

1,420 reads

Technical Article

MOM SCDWgroom Enhancement

It might not be useful now, but if you ever wanted to downsize the amount of data that you keep in your datawarehouse, good luck.  This will help you do that.  This job is set to shrink it down to 120 days, but you can adjust it as you like.  Runs again in 5 day […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-10-16 (first published: )

570 reads

Blogs

The New Unified Copilot in Fabric and Project Osmos: From AI Assistance to Agentic Data Engineering

By

(This post starts a three-part series on how AI is changing the way we...

SQL Server Problems You Can Reproduce, Measure and Fix: A Free Demo Library

By

I built a free library of runnable SQL Server demos. Each reproduces a real...

Experimenting with CHOOSE: #SQLNewBlogger

By

I was looking over the CHOOSE() function while editing an article at SQL Server...

Read the latest Blogs

Forums

Managed Instance vs Azure Database - is this a good option?

By jasona.work

We're currently in Azure, however as we had a very tight migration timeline when...

MERGE in a nested TRY/CATCH won't roll back

By Pete Bishop

I have a section of code similar to the following abstract: DECLARE @loop [int]...

Perfermance result aftet purge operatio

By abdalah.mehdoini

Hello everyone, I am planning to implement a data purging solution that is expected...

Visit the forum

Question of the Day

SQL Server 2025 Server-level Roles

In SQL Server 2022+, what does the ##MS_DatabaseConnector## role allow?

See possible answers