Scripts

Technical Article

Sp to enable, disable or list all Triggers in a DB (SQL 7)

This SP enable,disable or list all the Triggers in the given database.If enable or disable are specified, finds all the triggers of all the tablesand enable or disable them, After that, it list all the triggers with it´s current state.If List is specified, then it only list the triggers with it current state. I didn't […]

You rated this post out of 5. Change rating

2002-09-16

593 reads

Technical Article

Stored procedure sp_for

The sp_for procedure provides simple single-statement loop processing for T-SQL statements, similar to the FOR command in the C language or the DOS command-line utility by the same name.It's syntax is similar to that of the DOS command.  It takes an argument to represent a variable, initialize the variable, set an increment, set an end […]

You rated this post out of 5. Change rating

2002-09-13

898 reads

Technical Article

FASTCOUNT() User-Defined Function (SQL 2000 only)

SQL Server's COUNT() function is a slow and expensive way to count a table's rows because it scans the entire table or index.  FASTCOUNT(), which I created, is much more efficient for this purpose - its only drawback being that it may return inaccurate results if a nonlogged (e.g., bulk) data modification operation was recently […]

You rated this post out of 5. Change rating

2002-09-10

840 reads

Technical Article

For SQL 2000.Scan all indexes for fragmentation

This script creates an error message with a valid error number, and alert associated with the error message. (everything when it doesn't exists). Then captures all the user indexes in the database and executes DBCC ShowContig for each one. It calculates the % of fragmentation on leaf level and fires the alert when is fragmented.Then […]

5 (1)

You rated this post out of 5. Change rating

2002-09-10

2,293 reads

Technical Article

fnCharPad

This function allows the user to pass in a string / character value and it     will padd the value according to given parameters. The parameters are as follows:@ValueToPad = Value to be padded by function.@PadCharacter = Character used to pad a given value.@Justification = Justification format bit 0 - Value will be RIGHT justified […]

You rated this post out of 5. Change rating

2002-09-06

263 reads

Blogs

A New Word: Lilo

By

lilo– n. a friendship that can lie dormant for years only to pick right...

Learning Database Design and Power BI Performance

By

I spend my days working on and managing SQL Server instances—working days at least,...

Free SQL Training: Dive into Databases This December!

By

Want to learn SQL and get some real practice this December? Check out the...

Read the latest Blogs

Forums

Database Archive missing FK

By abdalah.mehdoini

Bonjour à tous, je vais bientôt démarrer un projet d'archivage de données pour alléger...

SQL Server 2005 service fails to start

By iluminadajung

Hello, I’ve been trying to install Ms SQL Server 2005 for over two weeks...

How to Repair Corrupt MySQL Tables

By Nisarg Upadhyay

Comments posted to this topic are about the item How to Repair Corrupt MySQL...

Visit the forum

Question of the Day

The Funny Dynamic SQL

What happens when I run this code:

EXEC sp_executesql N'PRINT 1; GO';

See possible answers