SQLInsider Scripts

A Simply way to implement Audit Trail in SQL 2005

  • Script

In a recent project, I need to record audit trail for some tables (for Insert, Update and Delete).Using SQL 2005's XML datatype and the XML support it is very covenienet to use triggers to perform the audit trail requirement. I create one table (Table_Audit)  to hold all audit trial data. One stored procedure is created […]

5 (2)

2007-09-20

3,287 reads

Get Foreign Key of all the tables for Sqlserver DB

  • Script

This script will create two views and select the data from the TableReferences view. This view will give list of all the foreignkeys of the selected database with its constraint name, the table name and column name(s) on which the constraint is created and the referencing table name and column name(s).

5 (2)

2006-09-25 (first published: )

582 reads

IP Numeric To String

  • Script

A user defined function that converts an integer value to an IP address in dot notation format. This is performed by promoting a 32 bit signed integer value to a signed 64 bit bigint and converted to a binary representation of the integer. The purpose of this script is to allow the storage of an […]

2005-11-01 (first published: )

180 reads

Blogs

Weekly reading #29

By

The Data Breach Game: The 9 Worst IT Security Practices Joey D’Antoni shows bad...

#PowershellBasics: Get-Help -Online

By

One of the other things I learned from the Powershell class I’m taking this...

Undercover TV Podcast – Scripting Options in SSMS

By

In this episode of the podcast, Adrian looks at the scripting options available in...

Read the latest Blogs

Forums

Used Stored procedure in SSIS with different database name in DEV, Test and Prod

By patla4u

Hi, Can you please give me Idea, how can i use stored procedure in...

How to upgrade to SP3 with multiple named 2008R2 instances on same server

By trhorner

I have a server with two named instances of 2008 R2, SP1.  I have...

Upgrade from SP1 to SP3 on server with two named instances, run upgrade twice?

By trhorner

I have a server with 2008 R2 SP1 using two named instances.  When I...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers