|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 9:43 AM
Points: 469,
Visits: 193
|
|
Great question on the 'Server-Scoped DDL trigger' that was tricky and needed a better understanding using the tip on of the main question.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, October 24, 2012 8:17 PM
Points: 1,558,
Visits: 247
|
|
Good question. Thanks for submitting.
http://brittcluff.blogspot.com/
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 2:04 PM
Points: 1,150,
Visits: 1,455
|
|
Thanks for the effort and great question.
Please don't go. The drones need you. They look up to you.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 9,373,
Visits: 6,470
|
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 6:29 PM
Points: 387,
Visits: 681
|
|
cfradenburg (1/18/2012) I probably would have used "viewed" instead of "stored" but at least it's not a wording choice that makes it more likely for people to get it wrong.
Yep, I would have preferred to see viewed instead of stored.
/* Anything is possible but is it worth it? */
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 12:39 AM
Points: 1,846,
Visits: 976
|
|
Nice Question .Thanks
Malleswarareddy I.T.Analyst MCITP(70-451)
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Thursday, October 25, 2012 7:39 AM
Points: 1,680,
Visits: 210
|
|
The answer given for the question is not quite consistent with SQL 2012. In fact, the SERVER scope DDL triggers present as,
"DDL triggers are not scoped to schemas. Therefore, functions such as OBJECT_ID, OBJECT_NAME, OBJECTPROPERTY, and OBJECTPROPERTYEX cannot be used for querying metadata about DDL triggers. Use the catalog views instead.
Server-scoped DDL triggers appear in the SQL Server Management Studio Object Explorer in the Triggers folder. This folder is located under the Server Objects folder. Database-scoped DDL triggers appear in the Database Triggers folder. This folder is located under the Programmability folder of the corresponding database."
Reference: http://msdn.microsoft.com/en-us/library/ms175941.aspx
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:07 PM
Points: 7,096,
Visits: 7,156
|
|
Haining (5/21/2012) The answer given for the question is not quite consistent with SQL 2012. In fact, the SERVER scope DDL triggers present as,
"DDL triggers are not scoped to schemas. Therefore, functions such as OBJECT_ID, OBJECT_NAME, OBJECTPROPERTY, and OBJECTPROPERTYEX cannot be used for querying metadata about DDL triggers. Use the catalog views instead.
Server-scoped DDL triggers appear in the SQL Server Management Studio Object Explorer in the Triggers folder. This folder is located under the Server Objects folder. Database-scoped DDL triggers appear in the Database Triggers folder. This folder is located under the Programmability folder of the corresponding database."
Reference: http://msdn.microsoft.com/en-us/library/ms175941.aspx It seems to me that unless I've horribly misunderstood something, the answer is completely consistent with SQL Server 2012. See the SQL 2012 BoL page sys.server_triggers. The page you refer to is about where things appear in SSMS, not about where they are stored, which for server scoped triggers is as in the answer. The answer also points out that database scoped triggers are visible in each database in the appropriate sys.triggers view in the appropriate database, which is confirmed by the relevant SQL 2012 BoL page sys.triggers as well as by the one you quote.
It's a pity that the answer references a BoL page for which there's no SQL 20112 version insetad of one which covers all three currently supported releases.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 11:19 AM
Points: 891,
Visits: 2,266
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:07 PM
Points: 7,096,
Visits: 7,156
|
|
SQLDCH (5/21/2012) The link takes you to the SQL Server 2012 entry, it just doesn't tell you that very well. Look on the left hand navigation hierarchy, it shows 'Books Online for SQL Server 2012'.
I feel a bit stupid to have missed that!
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|