December 20, 2010 at 11:45 pm
Please help me,Its urgent.
Thanks in Advance
December 20, 2010 at 11:56 pm
praveen.gln1 (12/20/2010)
Please help me,Its urgent.Thanks in Advance
can you please post what is the issue & which type of help do you require?
Create trigger related help is available at: http://msdn.microsoft.com/en-us/library/ms189799.aspx
Thanks
December 21, 2010 at 12:05 am
here is my issue
Am Produciton DBA and supporting 150+ servers(prod,DEv,UAT).i want to know about the users and database details who will create new databases on DEV machines.i require this for my documentation purpose.
If i will have trigger like this which sends mails to my alias then it will be easy for me to keep track of new database creation. I will be more help ful if i get script for deletion too.
December 21, 2010 at 12:16 am
praveen.gln1 (12/21/2010)
here is my issueAm Produciton DBA and supporting 150+ servers(prod,DEv,UAT).i want to know about the users and database details who will create new databases on DEV machines.i require this for my documentation purpose.
If i will have trigger like this which sends mails to my alias then it will be easy for me to keep track of new database creation. I will be more help ful if i get script for deletion too.
You can create DDL Trigger on the server which you want to monitor.
Following trigger will fire whenever any user is creating the database on the server where you have created the trigger:
CREATE TRIGGER ddl_trig_database
ON ALL SERVER
FOR CREATE_DATABASE
AS
PRINT 'Database Created.'
GO
You can enhance the trigger as per your requirement.
you can also drop the database the same way.
Thanks
December 21, 2010 at 12:17 am
You can refer: http://msdn.microsoft.com/en-us/library/ms189799.aspx
Thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply