• Interests: SQL, Biztalk, .NET

Technical Article

Create an audit trigger on a table

Sometimes you need an audit trigger on a table. I have created a generic trigger that will work for (almost)every table. if the audit table is not there yet, It will copy the table structure (but strip identity attributes) and put all the data in an AUDIT_ table.I believe this will work for almost every […]

5 (5)

2004-09-02

1,595 reads

Technical Article

Restore Backup and all TRANLOGS in a specific DIR

Many DBA's have a Maintenance plan running that creates a backup every night and a transaction log backup every hour.Restoring them to another server (for whatever reason) can be a tedious job. That is why I wrote this T-SQL script.It will read the contents of a backup directory created by the maintenance plan and create […]

5 (1)

2004-06-25

903 reads

Technical Article

Stored Proc with optional parameters

Sometimes people want a Stored Proc with optional parameters. A lot of times people will use a coalesce for this. The problem with optional paremeters is that the query plan will never be an exact mach for that specific query. ( You never know what paremeters are filled..... )To solve this problem look at the […]

2002-12-06

425 reads

Technical Article

Using a MEMORY table as an array

I liked the script of using a table as an array. But Didn't liked the cursor in it so I rewrote the script so that it uses a memory table.I tested it in the Query analyzer and this one is indeed faster. So all the people out there yelling that a memory table is faster […]

2002-08-07

1,166 reads

Blogs

Daily Coping 26 May 2022

By

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

Seeding an Availability Group Replica from Snapshot

By

Background If you’ve been using Availability Groups, you’re familiar with the replica seeding (sometimes...

Microsoft Build event announcements

By

There were a number of data platform announcements at Microsoft Build yesterday that I...

Read the latest Blogs

Forums

Account logging - pwd change/db access change

By Warren Peace

Is there a way to continuously log account changes? For SQL accounts log for...

Starting on Monday

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Starting on Monday

Charindex values of a substring inside a long sentence

By SQL_Hunt

I need to gather the starting position of the keyword "sql" from a sql...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers