Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Script Only the triggers in a SQL 2008 database?

Posted on 2010-08-30
3
Medium Priority
?
887 Views
Last Modified: 2012-06-21
I found this script to script just the triggers from a sql 2008 database: http://www.sqlservercentral.com/scripts/Maintenance+and+Management/30222/. Is that the only way to do it? Did MS really not give you a way to do it from SSMS without including the table definitions as well? I can't believe that since you would have to delete a table's data just to change how its triggers work.

Hopefully, there's a way to do this from SSMS. Otherwise, I'll see if my copy of ApexSQL will do the trick.

Thanks in advance.
0
Comment
Question by:ZekeLA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
avirups earned 1000 total points
ID: 33562968
There is no other way through SSMS.
0
 
LVL 5

Assisted Solution

by:spikelly
spikelly earned 1000 total points
ID: 33566920
No way through SSMS. Check with your APEXSQL which will help you achieve this by generating a Documentation; you can try SQLDoc from Redgate.Com as well, all are great SQL tools.

0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33567364
Hi Author,

SSMS is not provide any tool.but you can do achieve via query.



SELECT tl.name [Table Name],TR.Name [Trigger Name] ,EV.Type_Desc [Trigger Event],
c1.text
from sys.TRIGGERS tr
inner join sys.trigger_events ev on tr.object_id=ev.object_id
inner join SYS.OBJECTS tl on tl.object_id=tr.parent_id
INNER JOIN syscomments C1 ON tr.object_id=c1.id
order by tl.name

Open in new window

0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question