Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 30th, 2008, 02:34 PM
Authorized User
Points: 306, Level: 6
Points: 306, Level: 6 Points: 306, Level: 6 Points: 306, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: , , .
Posts: 54
Thanks: 2
Thanked 0 Times in 0 Posts
Default Need to search db for all triggers and list SQL

Hi! I am not new to SQL but I am new to using T-SQL and the system tables.

I inherited a SS2K database that is fairly extensive. I need to examine the SQL coding of all triggers in all instances of the datbase. I have Enterprise Manager, but it would be a lengthy process to open all tables of all instances to examine the SQL coding.

I am able to query system tables but I don't know their schema well enough to do find the information I need.

QUESTION: is there a T-SQL query I can write to find all triggers in the SS group and list the following?

- Instance name
- Table name
- Trigger name
- SQL code that makes up the trigger

Any help you can provide would be greatly appreciated!

-- Tom
--- Tom
  #2 (permalink)  
Old September 1st, 2008, 10:42 AM
Friend of Wrox
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts

Look at sysobjects table/view and xtype/type column.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search button doesn't search Access DB cbones Visual Studio 2008 1 October 27th, 2008 07:36 PM
Global Search&Replace Text in all fields in sql db buddyz SQL Server 2000 10 September 14th, 2006 08:24 AM
SQL Triggers (1 table) cole SQL Language 4 June 14th, 2005 04:36 PM
SQL Server Transactional Replication with Triggers RRNP SQL Language 0 October 4th, 2004 05:17 PM
Create drop down list from SQL DB lshamba Classic ASP Databases 2 August 26th, 2004 10:49 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.