May 4, 2011 at 10:33 am
Is there a way that I can get an alert that a database is created or dropped and by who in all our sql servers?
Thanks
May 4, 2011 at 10:36 am
Check the default trace. (nice articles here on the subject).
May 4, 2011 at 10:37 am
Thank you, can you point me a link to the article.
May 4, 2011 at 10:41 am
You know there's a search button top right on this page...
http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/
May 4, 2011 at 10:42 am
That's a nice one too.
http://www.sqlservercentral.com/articles/Stairway+Series/72464/
May 4, 2011 at 10:46 am
Lowell
May 4, 2011 at 10:47 am
Thanks a lot
May 4, 2011 at 10:51 am
Thanks, the standard report has so many new features I haven't found. I guess thies is recorded by default trace.
Thanks again
May 4, 2011 at 10:51 am
SQLMyFriend (5/4/2011)
Thanks, the standard report has so many new features I haven't found. I guess thies is recorded by default trace.Thanks again
yes it is.
May 4, 2011 at 11:27 am
I see the report of schema change history, I see our report is huge, I export to excel to do some filtering.
If MS can add some filter on the report itself, that would be very helpful.
May 4, 2011 at 11:36 am
SQLMyFriend (5/4/2011)
I see the report of schema change history, I see our report is huge, I export to excel to do some filtering.If MS can add some filter on the report itself, that would be very helpful.
Post a thread on connect and propose the idea.
Plan A would be the find the Rdl file in question, edit it to your needs and move on with it. I garantee it'll be faster that way (assuming you can edit those reports out)! :w00t:
May 4, 2011 at 3:14 pm
You can create trigger for that -
IF EXISTS (SELECT * FROM sys.server_triggers
WHERE name = 'ddl_trig_database')
DROP TRIGGER ddl_trig_database
ON ALL SERVER;
GO
CREATE TRIGGER ddl_trig_database
ON ALL SERVER
FOR DROP_DATABASE
AS
PRINT 'Database Droped.'
SELECT EVENTDATA().value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','nvarchar(max)')
GO
DROP TRIGGER ddl_trig_database
ON ALL SERVER;
GO
-MJ
Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.
May 4, 2011 at 3:17 pm
You can create trigger for that-
IF EXISTS (SELECT * FROM sys.server_triggers
WHERE name = 'ddl_trig_database')
DROP TRIGGER ddl_trig_database
ON ALL SERVER;
GO
CREATE TRIGGER ddl_trig_database
ON ALL SERVER
FOR DROP_DATABASE
AS
PRINT 'Database Droped.'
SELECT EVENTDATA().value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','nvarchar(max)')
GO
DROP TRIGGER ddl_trig_database
ON ALL SERVER;
GO
-MJ
Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply