Previous Topic: import method—Import MDB ObjectsNext Topic: view method—View Properties of an Exported MDB Object


compare method—Compare MDB Objects in Source and Target MDBs

The compare method compares MDB Objects in the source and target MDBs. It reads objects from source and target databases and creates corresponding xml files in the work folder. Each supported MDB object type has specific rules that determine when the objects are considered equal. For a list of these rules, see the "Rules for MDB Object Comparison" appendix.

Note: The source and target MDBs must have the same database credentials.

This command has the following format:

mdbac.bat -compare MDB_Object_Type -name Object_Name - work work_folder -source Connection_Name -target Connection_Name {-user User_Name -pwd Password | -wallet wallet_file_name}
MDB_Object_Type

Specifies the MDB object type that you want to compare. This parameter accepts only a single object type. If you include multiple object types, the command returns invalid results.

Note: For a list of supported MDB object types, see the "Supported MDB Object Types" appendix.

Object_Name

Specifies the object name in the given object type that you want to compare. You can use wildcard characters to match a pattern. For example, you can specify "Asset%" to process all the objects that start with the name "Asset" in the given object type.

Example: Compare MDB Objects in Source and Target MDBs

This example command compares the queries that start with "Asset is a Virtual Machine" in test and production databases:

mdbac.bat -compare BoQueryDef -name "Asset is a Virtual Machines" -work C:\TEMP\work -source mssql-test - target mssql-production -user ca_itrm -pwd password123

Note: For more details about why the compare command failed, you can view the diff.log file. The diff.log is available under the folder given in the -work parameter of the compare command.