Sdílet prostřednictvím


Import Office Migration Planning Manager log files into a database

 

Applies to: Office 2010

Topic Last Modified: 2011-08-29

Banner stating end of support date for Office 2010 with link to more info

After you use the Office Migration Planning Manager (OMPM) file scanner to scan your computers, you can import the resulting log or .cab files into the OMPM database. This article describes how to create the OMPM database, import OMPM log files into the database, fix import failures, and delete the database.

In this article:

  • Create an OMPM database

  • Import log files into an OMPM database

  • Fix import failures

  • Delete an OMPM database

Important

The OMPM tool has been updated as of July 2011, The release is available at the Microsoft Download Center (https://go.microsoft.com/fwlink/p/?LinkId=199599). Numerous fixes and enhancements are available for the OMPM File Scanner, the Office File Converter (OFC) tool, and the Version Extraction Tool (VET). If you are using a previous version of OMPM, you cannot re-use existing client scan results, databases, or any exported data with the new version of OMPM. You must create new databases and re-scan clients by using the new version.

Create an OMPM database

Before you create an OMPM database, verify that you have one of the following versions of SQL Server installed:

  • SQL Server 2005

  • SQL Server 2005 Express Edition

  • SQL Server 2008

  • SQL Server 2008 R2 Express

On the computer where you plan to use OMPM, you can use the CreateDB.bat file (located in the Database folder that is installed by OMPM) to provision an OMPM database. At the command prompt, navigate to the Database folder, and then type the following: CreateDB.bat <Computer/SQLServerName> <DatabaseName>.

Import log files into an OMPM database

The import script automates the process of importing the XML log file data or .cab files directly into a database server. The following two batch files are included in the Database folder:

You can start to import as soon as you have .xml files or .cab files generated by the OMPM File Scanner. You do not have to wait until all the data is collected. However, we recommend that you wait until all of the data from a specific computer is collected. You can run the import tool multiple times to add new information to the database when the data is collected.

Use the following procedures to import scan and action data into the database. Before you run either procedure, be aware that you should not run more than one import at the same time. Always let one import to complete before you start the next import. Running more than one import at the same time could result in data corruption. You can obtain help for either command by using the command prompt to navigate to the Database folder, and then typing the following: ImportScans.bat /? or ImportActions.bat /?.

Import OMPM File Scanner data files into the database

Use the following procedure to import log files that contain scan data obtained by the OMPM File Scanner. We recommend that you keep databases smaller than 1 million scan records if you plan to use the OMPM reporting tool. This can be accomplished by ensuring that individual scan runs of Offscan.exe do not include more than 1 million files, or by importing the data from a single run of more than 1 million files into multiple databases. (Tip: 100 scan .cab files contain 1 million or fewer files.) Include the Scan_{GUID}.XML in all databases if you choose the second option. For more information about Scan_{GUID}.XML, see Fix import failures later in this article.

To import OMPM File Scanner data files into the database

  1. Verify that you have the following permissions:

    • Database operator permissions

    • Read/write permissions for the storage location

  2. At a command prompt, navigate to the folder where OMPM is installed, navigate to the Database folder, and then type:

    ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

Import OMPM File Scanner action files into the database

Use the following procedure to import log files that contain action data obtained by the OMPM File Scanner, Office File Converter, or Version Extraction Tool.

To import OMPM File Scanner action files into the database

  1. Verify that you have the following permissions:

    • Database operator permissions

    • Read/write permissions for the storage location

  2. At a command prompt, navigate to the folder where OMPM is installed, navigate to the Database folder, and then type:

    ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

Important

Do not interrupt the import process. If an interruption occurs, you must reset the ImportInProgress bit and then restart the import. To reset the ImportInProgress bit, run the following command at the command prompt:
osql.exe -S <sqlserver> -d <database> -n -h-1 -E -Q "Update Process_Control Set ImportInProgress = 0"

Parameters for ImportScans.bat and ImportActions.bat

The parameters for ImportScans.bat and ImportActions.bat are shown in the following table. You can obtain more information about either command by typing the following at a command line: ImportScans.bat /? or ImportActions.bat /?.

Parameter Description

ComputerName

The name of the computer that is hosting the Microsoft SQL Server database.

SQLServerName

The name of the SQL Server computer where the new database is created. Required.

DatabaseName

The name of the database. Required.

PathToLogFiles

The local (or UNC) path of the folder where the log files are stored. The operator must have read/write/create permissions to this location. Required.

Note

The default path for scan data log files in offscan.ini is C:\OMPM\SCANDATA. The default path for action log files is C:\OMPM\ACTIONLOGS.

For example, if the computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and the log files are stored in C:\OMPM\SCANDATA, type the following at the command prompt:

ImportScans.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\SCANDATA

When the log files are successfully imported, the contents move to the imported subfolder in the original <PathToLogFiles> folder.

Files that were stored in <PathToLogFiles> are moved to the subfolder OMPMImported. To run the import by using the same set of files to a different database, copy the files back to <PathToLogFiles>.

Fix import failures

If you encounter a fatal error when you import the scan data, the OMPM database might be corrupted or you might be missing one file associated with the first .cab file. The scanner produces a single SCAN_{GUID}.xml with the first .cab file that it creates. The .xml file describes the configuration of the scan run. This includes RunID, folders to scan, and all the other properties set in the offscan.ini configuration file. For an import to be successful, the scan .xml file must be present. If you cannot find that first .cab file or the scan .xml file inside it, run the scan again to create a new scan .xml file. Because the database is populated with information from .cab files, you can use the .cab files to restore the data. If you still have all of the .cab files, you have not lost any data. The high-level process for fixing this situation is as follows:

  • Delete the existing database.

  • Create a new database.

  • Move all of the .cab files out of the OMPMImported folder.

  • Re-import the scan data and action .cab files.

You can use the following procedure to delete and restore the OMPM database.

To fix import failures

  1. At a command prompt, navigate to the OMPM\Database folder, and then type:

    DeleteDB.bat <ComputerName>\<SQLServerName> <DatabaseName>
    

    Warning

    This will delete the entire database. All data previously entered into the database will be lost.

    For example, if the computer name is COMPUTER1, the database server is SQLEXPRESS, and the database name is OMPM001, type the following at the command prompt:

    DeleteDB.bat COMPUTER1\SQLEXPRESS OMPM001
    
  2. At a command prompt, navigate to the OMPM\Database folder, and then type:

    CreateDB.bat <ComputerName>\<SQLServerName> <DatabaseName>
    

    For example, if the computer name is COMPUTER1, the database server is SQLEXPRESS, and the new database name will be OMPM001, type the following at the command prompt:

    CreateDB.bat COMPUTER1\SQLEXPRESS OMPM001
    
  3. Move all of the .cab files that are in the OMPM\SCANDATA\OMPMImported folder up one level to the OMPM\SCANDATA folder, or to another folder if you prefer. Move all of the folders that are in the OMPM\ACTIONLOGS\OMPMImported folder up one level to the OMPM\ACTIONLOGS folder, or to another folder if you prefer.

  4. At a command prompt, navigate to the OMPM\Database folder, and then type:

    ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

    For example, if the computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and the log files are stored in C:\OMPM\SCANDATA, type the following at the command prompt:

    ImportScans.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\SCANDATA
    
  5. At a command prompt, navigate to the OMPM\Database folder, and then type:

    ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

    For example, if the computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and the log files are stored in C:\OMPM\ACTIONLOGS, type the following at the command prompt:

    ImportActions.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\ACTIONLOGS
    

Delete an OMPM database

Use DeleteDB.bat to delete an existing OMPM database. All data stored in the database will be lost. To use DeleteDB.bat, type the following at the command prompt: DeleteDB.bat <Computer/SQLServerName> <DatabaseName>.