Miscellaneous

Technical Article

Sp to enable, disable or list all Triggers in  DB

  • Script

This one is For SQL 2000.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 […]

You rated this post out of 5. Change rating

2002-09-19

675 reads

Technical Article

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

  • Script

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

594 reads

Technical Article

Stored procedure sp_for

  • Script

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

899 reads

Technical Article

For SQL 2000.Scan all indexes for fragmentation

  • Script

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,295 reads

Technical Article

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

  • Script

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

842 reads

Blogs

The Book of Redgate: Customer Quotes

By

Many organizations list customer testimonials and quotes on their websites or literature. It makes...

Using Cron in Postgres Flex

By

pg_cron is a simple cron-based job scheduler for PostgreSQL that runs inside the database...

Can I Change a Primary Key Value? #SQLNewBlogger

By

I heard someone say recently that you can’t change a primary key value in...

Read the latest Blogs

Forums

Life Moves Pretty Fast

By Grant Fritchey

Comments posted to this topic are about the item Life Moves Pretty Fast

Parse XML data from SQL table using temp tables and variables

By Lord Slaagh

Hello SSC, Happy Friday! I have to optimize a process that uses dynamic SQL...

50 Years of Microsoft

By Steve Jones - SSC Editor

Comments posted to this topic are about the item 50 Years of Microsoft

Visit the forum

Question of the Day

Multiple Collations

Can I have a collation expression like this in SQL Server 2022?

...
WHERE ColumnA = ( 'abc' COLLATE French_CI_AS) COLLATE French_CS_AS
...

See possible answers