Updated: 2009-09-17

The import tool automates the process of importing the XML log file data or CAB files directly into a database server. You can begin importing as soon as you have XML 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.

NoteNote:

Before you run the import tool, note the following database requirements:

  • Microsoft SQL Server includes several command line utilities, such as Sqlcmd.exe and Bcp.exe. These utilities must be available on the client computer from which the provisioning and import tools are run.

  • You must install SQLXML 3.0 Service Pack 3 (SP3) on your computer before you import XML into your database. You can download SQLXML 3.0 SP3 from SQLXML 3.0 Service Pack 3 (SP3) (http://go.microsoft.com/fwlink?linkid=52919).

  • For more information about database requirements, see "Database software" and "Database tools and utilities" in Introduction to Office Migration Planning Manager (OMPM).

Use the following procedure to import log files that contain scan data obtained by the OMPM File Scanner.

Import OMPM File Scanner data files into the database

  1. At a command prompt, navigate to the folder where OMPM is installed, and navigate to the Database folder.

  2. Type:

      CopyCode imageCopy Code
    ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

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.

Import OMPM File Scanner action files into the database

  1. At a command prompt, navigate to the folder where OMPM is installed, and navigate to the Database folder.

  2. Type:

      CopyCode imageCopy Code
    ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

The parameters for ImportScans.bat and ImportActions.bat are as follows.

Parameter Description

ComputerName

The name of the computer that is running SQL Server.

SQLServerName

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

DatabaseName

The name of the SQL Server 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 your computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and your log files are stored in c:\OMPM\SCANDATA, type the following at the command prompt:

  CopyCode imageCopy Code
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.

ImportantImportant:

Do not run more than one import at the same time. Always allow for one import to complete before you start the next import. Running more than one import at the same time could result in data corruption.

Notes:

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

Fixing import failures

If you encounter a fatal error when you import your scan data, the OMPM database might be corrupted or you might be missing one file associated with the first CAB. 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, including 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 your 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.

Delete and restore the OMPM database

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

      CopyCode imageCopy Code
    DeleteDB.bat <ComputerName>\<SQLServerName><DatabaseName>
    

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

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

      CopyCode imageCopy Code
    CreateDB.bat <ComputerName>\<SQLServerName><DatabaseName>
    

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

      CopyCode imageCopy Code
    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 type:

      CopyCode imageCopy Code
    ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

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

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

      CopyCode imageCopy Code
    ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
    

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

      CopyCode imageCopy Code
    ImportActions.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\ACTIONLOGS
    

Download this book

This article is included in the following downloadable book for easier reading and printing:

See the full list of available books at Office Resource Kit information.