473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to view triggers in SQL server

Hello,

I am pretty much a newbie with SQL server. I have what is probably a
pretty stupid question. In SQL Enterprise manager, is there a way to
easily see all triggers, or, even better, all tables and there
associated triggers? I suppose at the least in a way similar to
viewing all saved functions or views.

Thanks,
Ryan
Jul 20 '05 #1
4 72639
On 30 Aug 2004 15:47:53 -0700, ry************@kp.org (Ryan) wrote:
Hello,

I am pretty much a newbie with SQL server. I have what is probably a
pretty stupid question. In SQL Enterprise manager, is there a way to
easily see all triggers, or, even better, all tables and there
associated triggers? I suppose at the least in a way similar to
viewing all saved functions or views.

Thanks,
Ryan


It's a bit cludgy, but in Enterprise Manager, on the database you are
looking at, select [generate SQL scripts].
Untick [Script All Objects]
Tick [All Tables]
Under the [Formatting Tab] untick everything.
Under the [Options] tab, tick [Script Triggers]
(.) Create one file
Then [OK]

This text file will then contain the scripts for creating every
trigger in the database.
I know that is not what you wanted, but you never know!
Jul 20 '05 #2
ry************@kp.org (Ryan) wrote in message news:<b5**************************@posting.google. com>...
Hello,

I am pretty much a newbie with SQL server. I have what is probably a
pretty stupid question. In SQL Enterprise manager, is there a way to
easily see all triggers, or, even better, all tables and there
associated triggers? I suppose at the least in a way similar to
viewing all saved functions or views.

Thanks,
Ryan


Probably the easiest way is to use a query in Query Analyzer:

select name as 'Trigger', object_name(parent_obj) as 'Table'
from sysobjects
where xtype = 'TR'

sp_helptrigger will give you the details of an individual trigger, but
you need to know the table name first.

Simon
Jul 20 '05 #3
sq*@hayes.ch (Simon Hayes) wrote in message news:<60**************************@posting.google. com>...
ry************@kp.org (Ryan) wrote in message news:<b5**************************@posting.google. com>...
Hello,

I am pretty much a newbie with SQL server. I have what is probably a
pretty stupid question. In SQL Enterprise manager, is there a way to
easily see all triggers, or, even better, all tables and there
associated triggers? I suppose at the least in a way similar to
viewing all saved functions or views.

Thanks,
Ryan


Probably the easiest way is to use a query in Query Analyzer:

select name as 'Trigger', object_name(parent_obj) as 'Table'
from sysobjects
where xtype = 'TR'

sp_helptrigger will give you the details of an individual trigger, but
you need to know the table name first.

Simon


YOu can run sp_helptext 'Triggername' to display the text of triger, sp function.

Raju
Jul 20 '05 #4
Thank you everyone for you help. I am able to view individual
triggers using the method you suggested Simon/Raju. I would like to
use the scripting wizard that was recommended by you Chinni, as this
would give me a list of all the trigger definitions at once, but when
I generate the script per the instructions provided I only ger an
empty file. I know there are triggers set. Any idea as to why this
might be. We are running SQL 2000 if that helps.

Thanks,
Ryan

an****@gmail.com (Chinni) wrote in message news:<6d*************************@posting.google.c om>...
sq*@hayes.ch (Simon Hayes) wrote in message news:<60**************************@posting.google. com>...
ry************@kp.org (Ryan) wrote in message news:<b5**************************@posting.google. com>...
Hello,

I am pretty much a newbie with SQL server. I have what is probably a
pretty stupid question. In SQL Enterprise manager, is there a way to
easily see all triggers, or, even better, all tables and there
associated triggers? I suppose at the least in a way similar to
viewing all saved functions or views.

Thanks,
Ryan


Probably the easiest way is to use a query in Query Analyzer:

select name as 'Trigger', object_name(parent_obj) as 'Table'
from sysobjects
where xtype = 'TR'

sp_helptrigger will give you the details of an individual trigger, but
you need to know the table name first.

Simon


YOu can run sp_helptext 'Triggername' to display the text of triger, sp function.

Raju

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: gilles27 | last post by:
I've ready many of the posts on this and other newsgroups in which people describe working practices for source control of database scripts. We are looking to implement something similar in my...
0
by: Dan Ignatov via .NET 247 | last post by:
Hi, I am developing an ASP.NET application and have faced with aproblem: my server view of application is shared between twoclient views when a user opens a new IE window! After the firstview is...
1
by: kvrdev1 | last post by:
I have a view that is joining multiple tables. How do I modify this view so that it also returns when the value is "NULL" for some of the join table fields??? Any help would be greatly...
1
by: SVGK, Raju | last post by:
Hi, I have a table where in lot of triggers were included in that as shown below. How to view/access triggers and procedures from postgresql. I am using postgresql 7.4.1 on solaris. regds...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
0
by: SteveM | last post by:
I have created a form in Pivot Table View. The form runs fine on all local workstations but does not show any data on Server 2003. Anyone know of any issues with Server 2003 and Access forms in...
1
by: me2tech | last post by:
I installed Apache Tomcat 6.0 through window installer exe file in windows 2000 OS. Although the server runs perfectly, I need to see the server console which is not visible to me. As the start...
2
by: maheshmurali | last post by:
Can Mysql Support VIew, Triggers, Cursors? If possible, Do all versions of Mysql support the above?
5
by: lightyagami | last post by:
gud day... please help me with my project... how can i view the database from sql server 2000 in vb6 list view?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.