Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

difference in file size on disk and sysaltfiles

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
db - 10 Mar 2008 18:52 GMT
SQL server 2000

When i select size of files using sql server using
"select name,filename,size from sysaltfiles" I get size of files as

File one size: file1.mdf = 4976
File two size:  file2.ldf = 2504
File three size file3.mdf = 1360
File four size file4.ldf = 13408

When I see the size of files in the disk using windows explorer I get
different size

File one size: 39804 kb
File two size:  20032 kb
File three size:10,880 kb
File four size:  107,264 KB

Why is that difference in file sizes?
Signature


--
ontario, canada

Tibor Karaszi - 10 Mar 2008 19:12 GMT
The unit for sysaltfiles is in pages (one page is 8KB).

Signature

Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

> SQL server 2000
>
[quoted text clipped - 15 lines]
>
> Why is that difference in file sizes?
Aaron Bertrand [SQL Server MVP] - 10 Mar 2008 19:14 GMT
Why are you using sysaltfiles?

> SQL server 2000
>
[quoted text clipped - 15 lines]
>
> Why is that difference in file sizes?
db - 10 Mar 2008 19:19 GMT
To get the size of all the databases.
Signature

ontario, canada

> Why are you using sysaltfiles?
>
[quoted text clipped - 17 lines]
> >
> > Why is that difference in file sizes?
TheSQLGuru - 10 Mar 2008 21:01 GMT
As Tibor mentions, sysaltfiles units are 8K pages.  8192 bytes.  Thus:

select 8192*4976/1024.0 --39808.000000 KB

Signature

Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net

> SQL server 2000
>
[quoted text clipped - 15 lines]
>
> Why is that difference in file sizes?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.