Command Line for Business Importer

These options are available when the Business Importer is run from the command line.

Syntax

InstallationPath\MGSBI.exe /SwitchName[=Value] [/SwitchName[=Value] ...]
In normal use, exactly one of the following switches must be specified:
  • /Import
  • /Query
  • /Simulate.
However, the /Test switch may be used alone, without requiring any of the above. The full set of switches is shown below.

Examples

In this example, the Business Importer is run in connected mode on the central application server of an on-premises installation. The adapter file is in the current directory. Logging details are specified in the adapter file. (Text is wrapped for documentation, and should be entered on a single line.)

"C:\Program Files\Flexera Software\Inventory Beacon\
DotNet\bin\MGSBI.exe" 
     /ConfigFile="My Adapter.xml" /Import=Purchases

This example shows the Business Importer running on an inventory beacon in disconnected mode. The adapter file under test is in a subdirectory below the executable, and the output is redirected to an intermediate file for review.

cd C:\Program Files\Flexera Software\Inventory Beacon\
DotNet\bin\MGSBI.exe 
     /ConfigFile=adapters\productionImports.xml 
     /Import=EnterpGroups /Write="C:\temp\DataReview.xml"
Note: This output file is not in a format suitable for upload directly to the central server in a cloud implementation. The upload format requires:
  • An upload manifest
  • A copy of the adapter XML file
  • This data file.
All must be zipped into a single archive for automatic upload, and this is not possible using the Business Importer alone. However, after reviewing the adapter's output with the command-line shown here, you could save the adapter XML file, and schedule its execution through the inventory beacon interface. The inventory beacon automatically provides the additional data and archiving for upload.

Options

The supported set of parameters and switches (in alphabetical order) is as follows.
Tip: Parameter/switch names are case insensitive.
Parameter/Switch Switch Values Details
/? or /Help   Displays a list of available parameters and related material.
/ConfigFile= AdapterXMLFile Specifies the path and file name of the adapter XML file that defines connection details and column mapping for the particular import. If the file path or file name contain any spaces, enclose the entire value in double quotation marks. If this switch is omitted, the Business Importer searches for a file called MGSBI.XML, in the same folder from which the Business Importer is executing. If a file name is defined without a path, the Business Importer looks in its execution folder; and relative paths are also relative to the execution folder. Where neither the switch nor the default file is present, or when the specified file cannot be found, execution terminates with an error.
/Encrypt  

Encrypt all database connection strings found in the AdapterXMLFile, rewriting the XML file with the new values replacing the originals. This applies not only to the central compliance connection, but also to all other data source (Import) connections. This protects the connection information in case the adapter XML file is accessed by a hostile entity.

Connection strings, once encrypted, cannot be decrypted for display in the XML file as plain text. If you need to update an encrypted connection string in the XML file, remove the encrypted content, and restore a plain text version of the connection string. Running the Business Importer again with this switch will re-encrypt the plain text connection strings in the XML file.

Encryption uses AES cryptography, and the encryption key is specific to the computer on which the encryption is run.
Important: Adapter XML files containing encrypted connection strings cannot be used on any other computer except the one on which encryption is performed. Adapters must be encrypted separately on each computer on which they are used by the Business Importer.
/Import= or /Import ImportName Collect data from the data source specified in ImportName within the AdapterXMLFile, and load it into the database for which (in connected mode) the connection string is also specified in the AdapterXMLFile. The import name is case-sensitive. The second form (/Import), without the equals sign or a name of an import, may only be used when there is a single import in the AdapterXMLFile. If this empty switch is used when the AdapterXMLFile specifies multiple imports, the import fails with an error.
Tip: Only a single import may be run from each command-line invocation.
/Log= One of: Silent, Critical, Errors, Warnings, Information, Debug, Default
Select the kind of logging that should be output to the console.
  • With Silent, no log file is written for this pass (even if a log file has been specified).
  • Critical, Errors, Warnings, Information, and Debug filter the logging so that nothing less severe is displayed. Listed here from highest to lowest priority, any setting lists entries of that level and higher priority. For example, if you set /Log="Errors, the log includes errors and critical messages.
  • Default (which is also the behavior when this switch is not specified) sets the level to Information, meaning that it displays Information and higher messages.
Note that either the /LogFile= switch for the Business Importer must be specified, or the ImportName defined in the AdapterXMLFile must specify a log file, for a log file to be written.
/LogFile= LogFile
Path and file name where an additional log file may be written. Alternatively, the <log/> element may be specified in the AdapterXMLFile. If both are omitted, no log file is written (there is no default). If different values are given in the command line and the AdapterXMLFile, both files are written.
Tip: This log file does not respect the setting in the /Log= command-line switch, and always logs Information and higher messages.
/OperatorLogin= AccountName

Used by FlexNet Manager Suite to create history records showing which operator made changes to which database elements.

/Query= ImportName Run the query specified in the import definition (in the AdapterXMLFile) against the data source and list the individual records on the console in CSV format. The case-sensitive import name is mandatory when this switch is used.
/Read= DataFilePathAndName Over-rides the connection details specified in the ImportName within the AdapterXMLFile, and instead the adapter reads data from the intermediate data file specified. This intermediate file format reflects the data structure defined in the import element ImportName in the AdapterXMLFile. This switch is for internal use in disconnected mode, where the Business Importer has written the data to the intermediate file on an inventory beacon, the intermediate file has been automatically uploaded to the central server, and now the Business Importer resumes the process by reading from the intermediate data file and continuing the import process.
/Simulate= ImportName

Runs a full import (similar to the /Import switch), within a single database transaction. Afterwards, the transaction is rolled back so that nothing from the import persists. It outputs to the console a list of any data information messages, warnings, and errors, together with a summary count (per object type) of records matched, create, updated, deleted, and rejected. The case-sensitive import name is mandatory when this switch is used.

/Test ImportName

Test the downstream connection to the data source. The case-sensitive ImportName is mandatory when this switch is used, and identifies which connection within the AdapterXMLFile is tested.

Use the special case of /Test=ManageSoft to test the upstream connection to the FlexNet Manager Suite compliance database.
Important: This special case is available only for on-premises implementations.
/Write= DataFilePathAndName Over-rides any upstream connection details specified in the AdapterXMLFile for the central compliance database, and instead the adapter writes collected data to the intermediate data file specified. This intermediate file format reflects the data structure defined in the import element ImportName in the AdapterXMLFile. This switch can be used either for testing, to inspect the data written; or on-premises implementations, it can be used in disconnected mode. The output file may be manually transferred to your central application server, and used with a command-line import there.

Obsolete switches

The following switches are now obsolete, and must not be used:
  • Turbo=[true|false]
  • NewMode=[true|false]
  • Boost=[true|false].
These switches were previously used to put legacy versions of the Business Importer into turbo mode. This is the only mode in which the Business Importer now operates, making the switches redundant, and they have been obsoleted. Ensure that, if you are migrating legacy adapters to a current version of the Business Importer, any of these switches are removed from command-line scripts and the like. Attempting to set any of these switches to false now produces an error similar to the following:
ERROR: The legacy import mode (switchName=false) is no longer supported

2022 R1