question is -- how do you know how full they are? Is there a stored
procedure for that?caseahr (caseahr@.gmail.com) writes:
Quote:
Originally Posted by
When you create data files and filegroups, you specify a size. My
question is -- how do you know how full they are? Is there a stored
procedure for that?
It should be possible to find by querying a couple fo system tables.
But before I go ahead, I need to know which version of SQL Server you
are using, because the solution for SQL 2005 is completely different
than for previous versions.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi,
You may try the following commands :
sp_spaceused : gets the statistics of usage for a DB or a table. these
stats are not splitted by file.
DBCC SHOWFILESTATS : Gets the statistics of usage per data file. Log
file is ignored. The size is given in extents, depending on your system
(usually, the factor number is 64 to get the size in KB).
DBCC SQLPERF (LOGSPACE) : Gets the statistics of usage for the log
file.
sp_helpdb and sp_helpfile : gets the information about size and growth,
for the database and the files.
These functions work properly either on SQL Server 2000 and SQL Server
2005.
Hope this will fit your needs.
Cdric Del Nibbio
MCP since 2003
MCAD .NET
MCTS SQL Server 2005
caseahr a crit :
Quote:
Originally Posted by
When you create data files and filegroups, you specify a size. My
question is -- how do you know how full they are? Is there a stored
procedure for that?
Cdric Del Nibbio wrote:
Quote:
Originally Posted by
Hi,
>
You may try the following commands :
sp_spaceused : gets the statistics of usage for a DB or a table. these
stats are not splitted by file.
DBCC SHOWFILESTATS : Gets the statistics of usage per data file. Log
file is ignored. The size is given in extents, depending on your system
(usually, the factor number is 64 to get the size in KB).
DBCC SQLPERF (LOGSPACE) : Gets the statistics of usage for the log
file.
sp_helpdb and sp_helpfile : gets the information about size and growth,
for the database and the files.
>
These functions work properly either on SQL Server 2000 and SQL Server
2005.
>
Hope this will fit your needs.
>
Cdric Del Nibbio
MCP since 2003
MCAD .NET
MCTS SQL Server 2005
>
>
caseahr a crit :
>
Quote:
Originally Posted by
When you create data files and filegroups, you specify a size. My
question is -- how do you know how full they are? Is there a stored
procedure for that?
No comments:
Post a Comment