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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Email database size (monthly) to user

Author  Topic 

sgmiller
Starting Member

2 Posts

Posted - 2010-09-27 : 15:29:39
Hi, can someone advise how to produce a monthly report of the size of a database via email?

sp_spaceused seemed to be a good TSQL to use and if I run a query with that it reports what i need.

I need to get this emailed to me.

I tried creating a job and it seemed to go OK but then I got bogged down in configuring the Database Mail.

I wondered if I am missing a better reporting tool within SQL 2008.



Rgds
Steve

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-27 : 16:24:56
Database Mail is the way to go for this. What part are you having issues with?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sgmiller
Starting Member

2 Posts

Posted - 2010-09-28 : 05:43:12
I have the Database Mail configured and working. I have created a job and added the following command:

sp_spaceused

This however results in a job completing and emailing me but contains no data.

I am guessing that I need more in the command than just the single line.

I have selected the database to run the command against.

Any help really appreciated.

Rgds
Steve
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-28 : 13:19:56
Please post what you put in the job step.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -