May 8, 2018 at 11:52 am
Feivel - Tuesday, May 8, 2018 11:47 AMScottPletcher - Tuesday, May 8, 2018 11:30 AMFeivel - Tuesday, May 8, 2018 10:27 AMScottPletcher - Tuesday, May 8, 2018 10:13 AM
CREATE TRIGGER [trg_srv_audit_DDL_Event]
ON ALL SERVER
WITH EXECUTE AS '<login_name>' /* replace with your own login_name with authority to write to audit table, etc. */WITH EXECUTE AS '<login_name>' /* replace with your own login_name with authority to write to audit table, etc. */
FOR DDL_EVENTS
AS
SET NOCOUNT ON;
...rest_of_trigger...Thanks! Scott...just what I needed...no more educating and straight to the point...lol
I consider it still to be "educating", just with more direct help. Some people don't have untold free hours when they need something fixed, sometimes they need it fixed now.
You really should learn how to read the MS command formats in their help, though. It's tremendously useful to help construct proper code.
For example, if you need to capture some columns from an INSERT, and someone tells you to "use the OUTPUT clause", you can read the MS command syntax to understand where to put the clause and how it works exactly.
No more comments...again thanks for piggy backing 😉
Sorry, these topics are usually open ended. Never know, someone else may come along with a similar issue and ask additional questions, or someone may just say "thanks, this helped me with my problem."
Viewing post 16 (of 15 total)
You must be logged in to reply to this topic. Login to reply