You are here: Re: Is there a way to find growth in log (ldf) and database(mdf) ? « MsSQL Server « IT news, forums, messages
Re: Is there a way to find growth in log (ldf) and database(mdf) ?

Posted by Jens on 10/01/66 11:27

I found that on Google and added some further stuff like ID and
Reporting Date in order to keep the information stored permantly, for
permanent storage of the table create a non-temporary one.:

create table #dbinfo
(
ReportId INT IDENTITY(1,1),
dbname sysname,
dbsize decimal(10,2),
dbused decimal(10,2),
ReportDate datetime DEFAULT GETDATE()
)


exec sp_MSforeachdb 'insert into #dbinfo(dbname, dbsize, dbused) select

''?'', dbsize = sum(convert(dec(15),size))/128, (select
sum(convert(dec(15),used))/128 from [?]..sysindexes where indid in (0,
1,
255)) from [?].dbo.sysfiles where status & 0x40 = 0'

Select * from #dbinfo

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация