You are currently offline, waiting for your internet to reconnect

FIX: fn_virtualfilestats Skips the Last File

This article was previously published under Q290916
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 235019 (SHILOH_bugs)
If a database consists of four or more files (any combination of data and log), the output of the following query may skip one of the files:
select * from ::fn_virtualfilestats(<db_id>, -1)				
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
To reproduce the problem, execute the following code:
create database MultiFileDB on(name='MultiFileDB1', filename='c:\MultiFileDB.mdf', size=1),(name='MultiFileDB2', filename='c:\MultiFileDB2.ndf', size=1),(name='MultiFileDB3', filename='c:\MultiFileDB3.ndf', size=1) log on(name='MultiFileDBlog', filename='c:\MultiFileDB.ldf', size=1)godeclare @var intselect @var = db_id('MultiFileDB')select * from ::fn_virtualfilestats(@var, -1)godrop database MultiFileDBgo				

Article ID: 290916 - Last Review: 01/16/2015 21:49:44 - Revision: 3.2

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB290916