Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

DDL trigger Expand / Collapse
Author
Message
Posted Wednesday, January 18, 2012 7:13 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, February 9, 2015 1:34 AM
Points: 2,883, Visits: 3,886
SQL Kiwi (1/18/2012)
The BOL entry for sys.all_objects says:

"Shows the UNION of all schema-scoped user-defined objects and system objects."

Server-scoped DDL triggers are not schema-scoped.

Thanks, that makes sense.


Best Regards,
Chris Büttner
Post #1237943
Posted Wednesday, January 18, 2012 7:36 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, February 12, 2015 7:07 AM
Points: 2,730, Visits: 1,068
Maybe I misread the question...probably, but I found this on TechNet and still got the answer wrong. Oh well, learned another one the hard way :)

Server-scoped DDL triggers are stored as objects in the master database. However, you can obtain information about server-scoped DDL triggers by querying the sys.server_triggers catalog view in any database context.
Post #1237961
Posted Wednesday, January 18, 2012 8:13 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 7:59 AM
Points: 1,435, Visits: 1,838
I got it right for the "wrong" reason: I reasoned that 2 had to be false, because nothing is stored in a view. A view is by definition a mechanism to access data stored elsewhere.
Post #1238014
Posted Wednesday, January 18, 2012 8:27 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, January 14, 2015 8:57 AM
Points: 1,428, Visits: 811
My only disappointment is that 49% have got this right!
I was hoping for less.
Post #1238032
Posted Wednesday, January 18, 2012 8:27 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Saturday, February 28, 2015 9:30 AM
Points: 651, Visits: 406
sknox (1/18/2012)
I got it right for the "wrong" reason: I reasoned that 2 had to be false, because nothing is stored in a view. A view is by definition a mechanism to access data stored elsewhere.


Well, Idexed views are stored in the db. Can't blame you for using this reasoning, though.


---------------
Mel.
Post #1238033
Posted Wednesday, January 18, 2012 8:40 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:53 AM
Points: 1,176, Visits: 778
tks for the question
Post #1238039
Posted Wednesday, January 18, 2012 8:45 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, February 26, 2015 6:40 AM
Points: 987, Visits: 1,851
BarbW (1/18/2012)
Maybe I misread the question...probably, but I found this on TechNet and still got the answer wrong. Oh well, learned another one the hard way :)

Server-scoped DDL triggers are stored as objects in the master database. However, you can obtain information about server-scoped DDL triggers by querying the sys.server_triggers catalog view in any database context.


"Which of these statements is true?

Server-scoped DDL triggers are stored as objects in the [master] database.
Server-scoped DDL triggers are stored in the 'sys.triggers' catalog view in the [master] database."

THe view you mention is sys.server_triggers, not sys.triggers.
Post #1238047
Posted Wednesday, January 18, 2012 9:24 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 9:52 AM
Points: 3,499, Visits: 2,064
Thanks for the question
Post #1238099
Posted Wednesday, January 18, 2012 9:28 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:58 PM
Points: 4,131, Visits: 3,438
Thanks for the question, Dan!
Post #1238105
Posted Wednesday, January 18, 2012 9:29 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:34 AM
Points: 1,639, Visits: 1,999
sknox (1/18/2012)
I got it right for the "wrong" reason: I reasoned that 2 had to be false, because nothing is stored in a view. A view is by definition a mechanism to access data stored elsewhere.


I used the same reasoning. 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.

Thanks for the question, I learned something even though I got it right.
Post #1238106
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse