MSDN描述如下:
==========================
Analyze
Analyze.exe scans a VSS database for integrity and/or errors, displays them and, if set to do so, fixes them. VSS administrators should run Analyze.exe every week to verify that there are no problems in the VSS database.
Administrators can use the 32-bit command-line utility to repair version 4.0 VSS databases (and later). For example, a database problem exists when you select a file that you know exists in the VSS database, use a command, such as GET, and receive the error message, “File does not exist.”
Administrators can run Analyze.exe manually from the command line, or as part of a script for unattended operation, to analyze or fix the problem. Analyze.exe is in the WIN32 folder under the folder in which you installed VSS.
We recommend that you run Analyze.exe twice first with the -F option (to fix any errors found), and the second time to check if any errors remain. If you still have errors after the first run, you can check the Microsoft Knowledge Base at http://www.microsoft.com/kb) article Q152807 for more information.
Syntax
ANALYZE [-B <folder>] [-C] [-D] [-F] [-I-] [-V] [-X] [-?] [-H] <Full Database Path ¦ @Response File ¦ List of Files>
Option Description
-B <folder> Specify a backup folder.
-C Clean up and compress the database. This option can be slow.
-D Delete any unused files.
-F Attempt to repair any inconsistencies and corruption that are detected.
-I- Continue without stopping for user input (allowing unattended operation). By default, Analyze.exe leaves the results window on display.
-Vn Specify the verbosity of output. -V1 displays only critical errors, -V2 displays critical and significant errors, -V3 displays all errors, and -V4 shows all errors and warnings. The -V4 option shows its output in the lower pane of the Analyze Results window and contains detailed information on what the utility attempted and accomplished. The default is -V1. -V (without a number) is equivalent to
-V4.
-X Directs Analyze.exe to not lock files as it processes. Allows Analyze.exe to run against a live database. This option cannot be used with the -c, -d, or -f options and use of this option is not recommended unless absolutely necessary.
Full Database Path Path of the VSS data folder to analyze. This parameter must be the first non-switch parameter. A data path, list of files, or response file must be present on the command line.
@Response File File produced by running Analyze.exe, containing listing of problem files, named Analyze.bad by default. Using this file as input directs Analyze.exe to work on fewer files, thereby improving performance.
List of Files List of files to analyze. List can include only log files, or complete data paths, such as C:\VSS\Data\A\AAAAAAAA.
-?, -H Displays usage message containing descriptions of valid options.
Order of options is not important, but the full database path, response file, or list of files must be included on the command line as the first non-option item.
Examples
ANALYZE -C -D -F -V4 C:\VSS\Data
Analyzes and repairs the complete database and generates verbose output.
ANALYZE -BC:\Temp C:\VSS\Data
Analyzes the database, but does not fix it. Creates a list of corrupted files in C:\Temp.
ANALYZE -F -C -D @C:\Temp\Analyze.bad
Fixes any problems in the files listed in the Analyze.bad file generated by the preceding example.
Remarks
The types of problems that Analyze.exe can correct include:
Parent/child mismatch. Possible situations include those in which a project thinks it has a file or subproject but the child disagrees, a child thinks it has a parent but the parent disagrees, or child and parent don't reference each other but the child counts are off.
Corrupt database files. These files include the following: Names.dat (stores long filenames longer than 34 characters), Rights.dat (stores relationships between users and project rights), Status.dat (stores check out status for files), Um.dat (stores all users in a VSS database), and Version.dat (stores the VSS version).
Removing unused items from the database.
Administrators should run Analyze.exe regularly to verify that no problems exist in their VSS databases. All results of Analyze/Repair are logged to the file, Analyze.log, which is placed in the \VSS\Data\Backup folder and is replaced each time Analyze.exe is run. When you analyze the database, Analyze.exe creates a file listing all corrupted files. This file is called Analyze.bad and is also placed in the \VSS\Data\Backup folder. In addition, the original versions of files that have been repaired are placed in the \VSS\Data\Backup folder.
Under normal conditions, all users should be logged out of VSS before Administrators run Analyze.exe. Users must be logged out to run Analyze.exe with the - F option to repair problems. Analyze.exe does not run if any users are logged into VSS unless the -X option is supplied.
Analyze.exe writes output to the Analyze Results window. This window may contain two panes. You must close any open results windows before running Analyze.exe another time.
The top (or only) pane contains summary information. For example:
Analyze Version 4.00[Build 1110]
Database analysis in progress.
The Parent Project for item acctapp is corrupt and the link to the child file has been lost until the project is recovered.
Analysis complete.
This is the information provided in the output window when you run Analyze.exe using the -V or -V4 option for verbose output. When you use the -V option, the information provided is written to the bottom pane of the Analyze Results window. The following example shows verbose output:
Started analyzing user management system.
Successfully completed analyzing the user management system.
Rebuilding corrupted project for item aaaaaaaa.
Building the project list.
Checking cross file relationships.
Checking parent/child relationships.
Validating the Security System.
Writing a new copy of ‘c:\vss\data\a\aaaaaaaa’.
The count of children of item ‘aaaaaaaa’, as given in its header, does not match the number of children found on disk. The count will be adjusted.
The count of sub-projects of item ‘aaaaaaaa’, as given in its header, does not match the number of sub-projects found on disk. The count will be adjusted.
Note that the actual output in the Analyze Results window does not wrap; it scrolls within the pane.
When the Rights.dat database file is rebuilt by Analyze.exe, it turns on project security, even if security was disabled before the rebuild. As a result, only the Administrator can log on to VSS after the rebuild of Rights.dat. Therefore, the Administrator must then run the SSAdmin program to turn off Project Security or re-assign all user rights.
VSS analyze
最新推荐文章于 2020-12-20 18:11:17 发布