473,839 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 72663
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.go ogle.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(par ent_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.go ogle.com>...
ry************@ kp.org (Ryan) wrote in message news:<b5******* *************** ****@posting.go ogle.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(par ent_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.co m (Chinni) wrote in message news:<6d******* *************** ***@posting.goo gle.com>...
sq*@hayes.ch (Simon Hayes) wrote in message news:<60******* *************** ****@posting.go ogle.com>...
ry************@ kp.org (Ryan) wrote in message news:<b5******* *************** ****@posting.go ogle.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(par ent_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
3501
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 current workplace. We have agreed that developers should not modify objects such as views or stored procedures directly, they should check the script out of VSS first, modify it, run it, and then check it back in. The problem we are having is...
0
1148
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 changed in one window (user goes to another page, or thepage content is changed in any way...) the second client's viewlosts it's server view and becomes broken because it canntprocess any postback. I store the server view in the Session variables,...
1
1074
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 appreciated!!! Thank you, -Valerie SELECT TOP 100 PERCENT dbo.PATIENTMEDICATION.PatientMedicationID, dbo.MEDICATION.MedicationDS, dbo.MEDICATION.MedicationID,
1
2440
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 -raju
0
2406
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 View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
0
1343
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 Pivot Table view? Steve
1
4465
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 and stop of the server is done through icon in task bar. Please let me know if i need to add some code so that i can view this server console. Please help me as this is urgent.
2
1296
by: maheshmurali | last post by:
Can Mysql Support VIew, Triggers, Cursors? If possible, Do all versions of Mysql support the above?
5
2520
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?
0
9854
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10584
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9425
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7827
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5681
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4482
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.