Naming the Metabase History Files

Applies To: Windows Server 2003, Windows Server 2003 with SP1

To keep track of metabase history, IIS uses the following versioning scheme to enumerate the copies of MetaBase.xml that are stored in the History folder.

Metabase Version Numbers

The value of the HistoryMajorVersionNumber metabase property, also referred to as the major version number, increases when the in-memory metabase is written to disk.

The minor version number increases when the edit-while-running feature is enabled and an administrator changes and saves the MetaBase.xml file directly with an application such as Notepad.

HistoryMajorVersionNumber Property

The HistoryMajorVersionNumber property is located under the IIS_Global node in the metabase, as shown in the following example:

<?xml version = "1.0"?>
<configuration xmlns = "urn:microsoft-catalog:XML_Metabase_V54_0">
<MBProperty>
<IIS_Global Location = "."
   BINSchemaTimeStamp = "9676376defb8c201"
   ChangeNumber = "1023"
   HistoryMajorVersionNumber = "154"
   SessionKey = "4585thge754u4509853743hg0948054ug6t095"
   XMLSchemaTimeStamp = "444e436defb8c201"
   >
</IIS_Global>

Important

IIS uses the HistoryMajorVersionNumber property to track the versions of the metabase. Thus, manually changing the value of the HistoryMajorVersionNumber property is not recommended.

Minor Version Number

The minor version number is not a property that is stored in the metabase. IIS calculates the minor version number when the MetaBase.xml file is edited and saved directly, and if edit-while-running is enabled, as follows:

IIS looks in the History folder to determine the last minor version number that was used for a history file with the same HistoryMajorVersionNumber number as MetaBase.xml. IIS then uses the next sequential minor version number when naming the new history file.

When a history file is created because the in-memory metabase is written to disk, either through the regular timed history algorithm, or by the user explicitly saving the current configuration to disk, the major version number is incremented by 1, and the minor version number is reset to zero.

Naming the History Files

When a copy of MetaBase.xml is written to the History folder, the value of the HistoryMajorVersionNumber property is incremented and added to the names of the file pair. If edit-while-running is enabled, and the user makes a manual change to the metabase, the minor version number is incremented and added to the names of the file pair.

The file names of versioned MetaBase.xml files and MBSchema.xml files are created in the following format, respectively, where both the value of the HistoryMajorVersionNumber property and the minor version number are 10-digit numbers:

MetaBase_HistoryMajorVersionNumber_MinorVersionNumber.xml
MBSchema_HistoryMajorVersionNumber_MinorVersionNumber.xml

When either the HistoryMajorVersionNumber or the minor version number value is less than 10 digits, the number is padded with zeros in the file name to create a 10-digit number. This keeps the file names aligned and in numerical order when you sort by file name, making the contents of the History folder easier to read.

The following is an example of file names in the History folder:

MetaBase_0000000001_0000000000.xml
MetaBase_0000000001_0000000001.xml
MetaBase_0000000002_0000000000.xml
MetaBase_0000000002_0000000001.xml
MetaBase_0000000002_0000000002.xml
MetaBaseError_0000000000.xml
MetaBaseError_0000000001.xml
MBSchema_0000000001_0000000000.xml
MBSchema_0000000001_0000000001.xml
MBSchema_0000000002_0000000000.xml
MBSchema_0000000002_0000000001.xml
MBSchema_0000000002_0000000002.xml

For each instance of a MetaBase_MajorVersion_MinorVersion.xml file within the History folder, there is an MBSchema_MajorVersion_MinorVersion.xml file of the same version that is used with the metabase configuration.