On the General tab of a database properties screen there are two fields:
Size and Space Available. Is there a way to access the two fields
programmatically? This would be an easy way to keep track of when the
database needs to be grown.
Thanks,Try sp_spaceused at query analyser (after selecting the target database).
Roberto.
"Tim Kelley" <tkelley@.company.com> wrote in message
news:OOr%23yloKHHA.1248@.TK2MSFTNGP02.phx.gbl...
> On the General tab of a database properties screen there are two fields:
> Size and Space Available. Is there a way to access the two fields
> programmatically? This would be an easy way to keep track of when the
> database needs to be grown.
> Thanks,
>
>|||Tim
sp_helpdb 'dbname'
"Tim Kelley" <tkelley@.company.com> wrote in message
news:OOr%23yloKHHA.1248@.TK2MSFTNGP02.phx.gbl...
> On the General tab of a database properties screen there are two fields:
> Size and Space Available. Is there a way to access the two fields
> programmatically? This would be an easy way to keep track of when the
> database needs to be grown.
> Thanks,
>
>|||Hello,
To get the space allocated and usage you could use below commands:-
FOR Data files - SP_SPACEUSED
For LDF files- DBCC SQLPERF(LOGSPACE)
For SQL 2005; use the below Dynamic management view (DMV)
sys.dm_os_performance_counters
THanks
Hari
"Tim Kelley" <tkelley@.company.com> wrote in message
news:OOr%23yloKHHA.1248@.TK2MSFTNGP02.phx.gbl...
> On the General tab of a database properties screen there are two fields:
> Size and Space Available. Is there a way to access the two fields
> programmatically? This would be an easy way to keep track of when the
> database needs to be grown.
> Thanks,
>
>
No comments:
Post a Comment