SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Monitor Database and Log Growth

By Lori B, 2005/07/27

Total article views: 568 | Views in the last 30 days: 21

Most DBA's would like to be notified when automatic database file growth occurs. This script will log file growth. It will not log file shrink but could be easily modifed to do so.

Script does the following:
1. create tables to store server list, current & historical file sizes and actual growth for each database file
2. add a user-defined error message to state that file size has changed
3. create an alert for that message that will notify an operator of file growth
4. create stored procedure to compare the current file size and the stored file size. If file size has changed this stored procedure will raise the error and it will trigger the alert.
5. create a scheduled job to run the procedure regularly.

By Lori B, 2005/07/27

Total article views: 568 | Views in the last 30 days: 21
Your response
 
 
Related tags
 
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com