473,804 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I find out how full my files are?

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?

Dec 13 '06 #1
3 1395
caseahr (ca*****@gmail. com) writes:
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, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 14 '06 #2
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.

Cédric Del Nibbio
MCP since 2003
MCAD .NET
MCTS SQL Server 2005
caseahr a écrit :
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?
Dec 14 '06 #3
Merci beaucoup, Cédric. That's exactly what I needed.

Cédric Del Nibbio wrote:
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.

Cédric Del Nibbio
MCP since 2003
MCAD .NET
MCTS SQL Server 2005
caseahr a écrit :
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?
Dec 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7006
by: Greg Yasko | last post by:
Hi. Does anyone know if there's an equivalent of Perl's file::find module in Python? It traverses a directory. I've googled extensively and checked this newsgroup and can't find anything like it for Python. I'd be using it in Linux to regularly search for files with a script. Is this a good application for Python or does Perl have more functionality for quick & simple scripting in Linux? Thanks.
1
3732
by: Xah Lee | last post by:
suppose you want to do find & replace of string of all files in a directory. here's the code: ©# -*- coding: utf-8 -*- ©# Python © ©import os,sys © ©mydir= '/Users/t/web'
1
7598
by: Dan Jones | last post by:
I'm writing a script to process a directory tree of images.  In each directory, I need to process each image and generate an HTML file listing all of the images and links to the subdirectories. Just about every source I can find on the 'net for processing subdirectories points you at Find::Find.  However, I'm trying to do something like this: enter directory open INDEX, ".\index.html" print INDEX HTMLheader
3
4463
by: Mats Mohlin | last post by:
We are testing Db2 Cube Views on DB2 V8 for Solaris Small MQT get created OK but for a big MQT we get this message in the db2diag.log ADM6017E The table space "TEMPSPACE1" (ID "1") is full. Detected on container "/db2/db2inst2/db2inst2/NODE0000/SQL00002/SQLT0001.0" (ID "0"). The underlying file system is full or the maximum allowed space usage for the file system has
8
3558
by: pakku | last post by:
We are being faced with a situation where our Windows Server based UDB (V7) crashes every so often due to log files getting too full. We are seeing lots of messages in the logs about full log files and escalating locks. We think both the escalating locks and the full log files are caused by queries that bring back too much data without enough commits. ON another forum I heard a reference to some kind of COMMIT parameter in Control...
13
3041
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format for accessing objects, controls, etc. in VB/Access2003. In particular where will I find explanations of:- Actions, Functions, Methods, Properties - I'm understand the
5
4888
by: Amritha.Datta | last post by:
Can anyone tell me why the below code returns error? Exception Details: System.IO.FileNotFoundException: Could not find file Dim strLFolder As String = "c:\Temp\F Files" Dim intClientID As Integer = 1221 Dim XMLStr As String = strLFolder & "\" & intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml" Dim dsPubs As New DataSet
8
2322
by: inFocus | last post by:
Hello, I am new to python and wanted to write something for myself where after inputing two words it would search entire drive and when finding both names in files name would either copy or move thoe files to a specified directory. But couple of attempts did not work as desired this is one of them. Could someone help fix it or maybe give a better example.
0
5092
by: nimjerry | last post by:
i am using db2 udb V 9 on aix 5.3 and in db2diag.log alwas has this error occurr below is sample message 2008-03-03-09.45.34.366406+420 I306667A443 LEVEL: Warning PID : 835622 TID : 1 PROC : db2stmm (WEBEDIDB) INSTANCE: db2inst1 NODE : 000 DB : WEBEDIDB APPHDL : 0-8 APPID: *LOCAL.db2inst1.080229022428 AUTHID : DB2INST1 FUNCTION: DB2 UDB, Self tuning memory...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.