Prithi

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

Technical Article

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.

You rated this post out of 5. Change rating

2002-10-09

1,155 reads

Technical Article

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)

You rated this post out of 5. Change rating

2002-08-17

1,377 reads

Technical Article

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 […]

You rated this post out of 5. Change rating

2002-04-19

996 reads

Technical Article

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)

You rated this post out of 5. Change rating

2002-03-27

2,651 reads

Technical Article

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. […]

You rated this post out of 5. Change rating

2002-03-22

493 reads

Blogs

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Read the latest Blogs

Forums

SQL server native CDC

By SQL_Surfer

Have anyone implemented CDC, and if so, what has been your experience with it?...

Import and Export wizard stuck on Guest user

By Sam-263310

I'm getting a error when using the Import and Export wizard to copy tables...

Aligning Compatibility Version Strategy

By BOR15K

I have joined a new project, where the business uses Azure SQL Hyperscale for...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers