• Interests: SQL Server, Christian Faith, Sri Lankan Politics, Tamil Literature

Trigger Generator for data audit

This Procedure generates 3 triggers (for Insert, Update & delete). The purpose of these triggers is to keep a SIMPLE audit trail. Create the table and the procedure in the database to which you want to have the auditing facility. To include a table for auditing run the procedure with Table Name as the parameter.

2002-10-09

980 reads

Compare the data of 2 Tables (Updated)

The SP compares the data in 2 tables and reports the different data. Tables could be from different servers, different databases or different schemas. This accepts 7 parameters 1, 2: Name of the 2 tables 3 : List only the differences 4. : Compare only the structure 5. : Check timestamp fields too 6. : […]

5 (1)

2002-08-17

1,364 reads

Change the User Defined Data type

User Defined Data Types (UDF) is one of the useful concepts in SQL Server. However UDF can't be modified after they are being used. You would have to remove your User Defined Data Type from each table before you can change it. This will be a big job under certain circumstances.This procedure changes all tables […]

2002-04-19

887 reads

Script Generator for Triggers

This Stored Procedure creates the script of all existing triggersOptionally it creates the script to drop the triggers too.Triggers may belong to different owners. This procedure takes care of it.In SQLServer Enterprise Manager there is a facility to generate scripts forTables, Views, Stored Procedures etc.But it won't generate script for triggers unless we include the […]

5 (6)

2002-03-27

2,520 reads

Compare the structure & code of 2 databases

We often make changes in the test databases. But failure in making even the smallest change in the production database may lead to unwanted situations.This utility compares 2 databases.Parameters to be passed   @DB1  Database 1 (SysName)  @DB2  Databse 2 (SysName)  @ShowDifferentOnly see later (Bit)       Parameters 1, 2 may include server name as  well. […]

2002-03-22

456 reads

Blogs

P2 Puts Easy, Flexible Project Tracking Tools In Your Hands

By

Improve your team's workflow and productivity with these project tracking blocks.

Daily Coping 22 Jun 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Why are my permissions missing?

By

You’d be amazed (or maybe you wouldn’t) how often I hear this: “I used...

Read the latest Blogs

Forums

Finding the Group

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding the Group

How to create SQL script to backup transaction log with append

By itmasterw 60042

Hi,   I am trying to write a backup script, in a way that...

SLEEP_BPOOL_STEAL wait type

By cphite

Does anyone know what the wait type SLEEP_BPOOL_STEAL means?  I cannot find any documentation...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers