Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Notification of Database Creation

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-08 : 10:09:08
Hank writes "Is there a way I can configure all 60 SQL servers to notify me if a database is created. Our current policy gives some Vendors direct access to SQL servers without supervision. I am trying to keep a log off all databases and SQL servers on the network and need to know when someone creates one.

Thanks,

Hank"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-08 : 10:11:11
I can't find an alert event for table creation, but SQL Profiler can track object creation actions. I don't know how you might go about getting an alert from that trace, though.

How about a scheduled job that runs every 5 minutes or so that checks sysobjects for new entries? That could be configured to send an email or other kind of alert.

Go to Top of Page

efelito
Constraint Violating Yak Guru

478 Posts

Posted - 2002-02-08 : 10:18:10
I would create a tracking database of my own and populate it will all the info you want to track. If you just want to track database creation, then create a stored proc that connects to each server and compares the results of sp_helpdb with info you've collected in your database. You could then email yourself any variations. The schedule the stored proc like robvolk suggested. Frequency depends on how fast you want to know that a db was created.

Jeff Banschbach
Consultant, MCDBA
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-08 : 10:21:53
Not only is that a GREAT idea (go Jeff! go Jeff!), but it just occurred to me that you could create a Profiler trace and output it to a SQL Server table. You could then add a trigger to that table to send the alert whenever a new table is created.

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-02-13 : 13:40:47
Rob,

Constantly running profiler can be a performance hit. Not sure you would want to go about it that way. I like Jeff's idea though.

-Chad

Go to Top of Page
   

- Advertisement -