"Nasir" <nm*****@prosrm.com> wrote in message
news:40***********************@news.twtelecom.net. ..
Does anyone has a script which gives all databases names and there
allocated, used sizes in SQLserver2k. I want to schedule this to create a
daily report.
Thanks,
Nasir
Depending on what you need, this may be good enough:
exec sp_MSforeachdb 'exec sp_helpdb ?'
and/or
exec sp_MSforeachdb 'exec ?..sp_spaceused'
Note that this will return multiple result sets, which are awkward to
process within SQL Server itself, although it should be straightforward in a
client script. sp_MSforeachdb is not documented, but you can use your own
cursor instead for production.
Simon