Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shank
Starting Member
6 Posts |
Posted - 2012-01-26 : 10:02:56
|
Migrating from SQL2005 to SQL2008. Found a trigger was not firing and could not find the trigger. Tried to recreate the same trigger with the same trigger name that was used in SQL2005. I got this error: There is already an object named 'RMAUpdate' in the database. I cannot find this trigger anywhere. How can I search the database and find where this trigger might be? |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2012-01-26 : 10:15:46
|
select * from sys.objects where name = 'RMAUpdate' |
 |
|
shank
Starting Member
6 Posts |
Posted - 2012-01-26 : 10:40:47
|
I found it, but it doesn't show what table the trigger attached to. Where I expect it to be, it isn't. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-26 : 10:41:27
|
quote: Originally posted by shank Migrating from SQL2005 to SQL2008. Found a trigger was not firing and could not find the trigger. Tried to recreate the same trigger with the same trigger name that was used in SQL2005. I got this error: There is already an object named 'RMAUpdate' in the database. I cannot find this trigger anywhere. How can I search the database and find where this trigger might be?
you can even check sys.triggers as it will only have triggers infoIF EXISTS(SELECT 1 FROM sys.triggers WHERE name='RMAUpdate') DROP TRIGGER RMAUpdatehttp://msdn.microsoft.com/en-us/library/ms188746.aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-26 : 10:42:44
|
quote: Originally posted by shank I found it, but it doesn't show what table the trigger attached to. Where I expect it to be, it isn't.
to get tablename use below querySELECT OBJECT_NAME(parent_id) FROM sys.triggers WHERE name='RMAUpdate' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|