Skip to main content
Skip table of contents

mMC CLI

The migVisor Metadata Collector Command Line Interface (mMC CLI) is a standalone command-line application for scanning relational and NoSQL databases alongside Java and C# applications. To scan sources, mMC CLI takes the input configuration files and accesses the sources by their parameters. For more details about the configuration file format, see [mMC CLI] Configuration File Format. Additionally, mMC CLI can scan single data sources using parameters set in a command.

Use mMC CLI directly from the command line shell or terminal. To run mMC CLI, unpack the archive and execute the BAT or SH file.

CLI Command-Language Syntax

After downloading the mMC CLI archive, unpack and run the executable.

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source <source type> [source-specific arguments]

mMC can scan either single databases and applications or multiple databases and applications set in a configuration file or files.

Command Constructor

To write a command:

  1. Provide the scanning options. The scanning options are common and can be used for any source.

  2. Enter the source keyword.

  3. Specify a source type:

    • database for database(s).

    • application for application(s).

  4. If a single database is being scanned, provide its DB engine:

    • db2luw for scanning a single DB2 LUW data source.

    • hbase for scanning a single HBase cluster.

    • mongodb for scanning a single MongoDB cluster.

    • mysql for scanning a single MySQL data source.

    • oracle for scanning a single Oracle data source.

    • postgresql for scanning a single PostgreSQL data source.

    • sqlserver for scanning a single SQL Server data source.

  5. If a single application is being scanned, provide the main project language:

    • java for scanning a single Java application.

    • csharp for scanning a single C# application.

  6. If multiple databases or applications are being scanned, after specifying the database or application source type, provide the conf keyword.

  7. Provide source-specific arguments.

For example:

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database oracle [oracle-specific arguments]

For more details, see Command Constructor.

To print a listing of options and arguments available in mMC CLI, run the following command:

CODE
mmc-cli.sh/mmc-cli.bat -h

To print help for a specific option or argument, add the -h or --help option after the positional argument.

For example, mmc-cli.sh source database conf -h or mmc-cli.sh source application java --help.

Arguments and Options

Scanning options

-q, --query-file PATH

Explicit query definition file(s) path.

By default, query definition files are unpacked in the same folder as mmc-cli.jar. After providing valid migVisor credentials, mMC automatically updates query definition files, if their versions were upgraded.

File names follow the template query_<DB_ENGINE>.dat. Available DB engine-specific types are:

  • query_oracle.dat

  • query_mysql.dat

  • query_postgresql.dat

  • query_sqlserver.dat

  • query_mongodb.dat

  • query_db2_luw.dat

The argument is optional. If it is not provided, mMC uses query definition files stored in the mMC working directory. If the argument is provided, then, paths must be provided for all DB engines of the scanned databases. Multiple query file names must be separated by space character.

-t, --threads THREADS

Maximum number of threads used for parallel execution of queries.

The default maximum number of threads is 4.

--qt, --query-timeout MINUTES

Number of minutes set for query timeout.

If an individual query exceeds the timeout value it is stopped, and the next query will be executed.

The default query timeout is 4 minutes.

-u, --username USERNAME

Required. migVisor account username.

mMC CLI displays a silent password prompt after its start.

-l, --local

Run mMC CLI in offline mode and save scan results to an encrypted file.

By default, mMC runs in online mode. In online mode, mMC uploads scan results directly to mConsole.

Both online and offline modes require valid migVisor credentials for internal validation.

Scanning with Configuration Files

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database/application conf PATH(S) [-d/--delimiter DELIMITER]

PATH(S)

Required. Configuration file path(s), delimited by the space character.

The only officially supported file format is CSV.

Each file must adhere to the [mMC CLI] Configuration File Format.

Configuration files may contain both database and application data source configurations. If a configuration file contains both databases and applications, mMC scans only data sources that correspond with the database or application keyword in the command.

-d, --delimiter DELIMITER

Custom delimiter used to separate values in configuration file(s) set by PATH(S). Can contain any number of characters.

By default, mMC attempts to detect a delimiter automatically. The auto-detected delimiters are comma, space, colon, semicolon, and tab.

Scanning Single Application

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source application LANGUAGE PATH DIALECT

Required arguments:

LANGUAGE

Application primary language. Available values: java and csharp.

PATH

Application root folder path.

DIALECT

Primary dialect. Available values: Oracle, SQLServer, PostgreSQL, MySQL, DB2LUW, and HBase.

Scanning Single DB2 LUW Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database db2luw HOST PORT --db-user USERNAME database NAME [--tags TAGS] [-h/--help]

HOST

Required. Database hostname or IP address.

PORT

Required. TCP port.

--db-user USERNAME

Required. Database user name.

--ssl

SSL/TLS protocols flag.

--ca-cert PATH

Required, if --ssl is in use. Certification Authority (CA) root certificate path.

--database NAME

Required. Database name.

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

Scanning Single HBase Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database hbase QUORUM [--zp PORT] [--mp PORT] [--hbase_config FILE] [--keytab FILE] [--krb5 FILE] [--principal NAME] [--tags TAGS] [-h/--help]

QUORUM

Required, if --hbase_config is not set. ZooKeeper host(s) separated by space character.

--zp PORT

ZooKeeper port. By default, 2181.

--mp PORT

HBase master port. By default, 16000.

--krb5 PATH

Kerberos configuration file path.

--hbase_config PATH

Required, if QUORUM is not set and --krb5 is in use. hbase-site.xml file path.

--keytab PATH

Required, if QUORUM is not set and --krb5 is in use. Local keytab Kerberos authentication file path.

--principal NAME

Required, if QUORUM is not set and --krb5 is in use. Kerberos principal name.

--tags <TAG(S)>

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

Scanning Single MongoDB Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database mongodb HOST PORT [--cluster-name NAME] [--db-user USERNAME] [--auth-type TYPE] [--ssl] [--ca-cert PATH] [--secret PATH] [--public-key PATH] [--tags TAGS] [-h/--help]

HOST

Database hostname or IP address.

PORT

TCP port.

--cluster-name NAME

User-defined cluster name.

--db-user USERNAME

Cluster user name.

--auth-type TYPE

Authentication type. Available values: none, basic (default), ldap, x509.

--ssl

SSL/TLS protocols flag

--ca-cert PATH

Required, if --ssl is in use. Certification Authority (CA) root certificate path.

--secret PATH

Required, if --ssl is in use or if --auth-type is set to x509. CA secret path.

--public-key PATH

Required, if --ssl is in use or if --auth-type is set to x509. CA public key certificate path.

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

Scanning Single MySQL Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database mysql HOST PORT --db-user USERNAME --database NAME [--extended-scan] [--scan-duration DURATION] [--sample-interval INTERVAL] [--tags TAGS] [-h/--help]

HOST

Required. Database hostname or IP address.

PORT

Required. TCP port.

--db-user USERNAME

Required. Database user name.

--database NAME

Required. Database name.

--extended-scan

Extended Scan mode flag. This option triggers execution of the extended queries set that run on a source for a definite time and collect specific workload-related data.

--scan-duration SECONDS

Required, if --extended-scan is in use. Total number of seconds for query execution in Extended Scan mode. Must be a positive integer from 1800 to 86400 inclusive.

--sample-interval SECONDS

Required, if --extended-scan is in use. Single interval length within the total duration for query execution in Extended Scan mode. Must be a positive integer from 600 to 1800 inclusive (in seconds).

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

--all-instance-dbs

Optional. Scans all databases in the instance.

Scanning Single Oracle Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database oracle HOST PORT --db-user USERNAME [--workload] [--service NAME] [--sid SID] [--cdb] [--cdb-user USERNAME] [--cdb-sid SID] [--tags TAGS] [-h/--help]

HOST

Required. Database hostname or IP address.

PORT

Required. TCP port.

--db-user USERNAME

Required. Database user name.

--service NAME

Required, if SID is not set. Database service name.

--sid SID

Required, if service name is not set. Database SID.

--workload-repository REPOSITORY

Workload repository. REPOSITORY Options: dynamic-views, awr.

If not set, the default option dynamic-views is used.

Dynamic Views

Oracle's Dynamic Views primarily contain aggregated information collected since the last instance startup. Although it is readily available and free for immediate use without the need for additional licensing or configurations, data acquired through this method may lack the granularity needed to assess system load over time, and therefore, choosing this option will result in an inadequate representation and analysis of workload and target sizing information.

AWR

Utilizing Oracle's Automatic Workload Repository (AWR) can offer a comprehensive workload analysis including deep insights and requires a paid license. Confirm that AWR data retention and proper licensing is in place before proceeding with this option. To allow for comprehensive analysis, when selecting a custom collection period, make sure to select a time range that encompasses relevant workload trends and peaks.

--cdb

Oracle Container Database (CDB) flag.

If this argument is provided, provide CDB credentials using the --cdb-user and --cdb-sid options.

--cdb-user USERNAME

Required, if --cdb is in use. CDB common user name.

--cdb-sid SID

Required, if --cdb is in use. CDB Service ID.

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

Analyze Workload Selection

Workload analysis collects workload statistics available from Oracle’s AWR.

Before selecting this option, ensure that:

  • The data retention rules are configured.

  • The license includes this feature.

Primary and Standby Sources Scanning

To get more accurate scanning results, perform scanning of primary Oracle sources. In the case of scanning a standby source instead of a primary one, certain metrics and features may show different results on mConsole.

Metrics

View the list of vulnerable metrics and the mConsoleSource Details sections these metrics belong to (for details, see Source Analysis):

Metric

Section

Server RAM, Hostname
CPU Count, Server Architecture
SGA Size
PGA Size
Instance Name

Source Details - Overview

Max Sessions, Max Active Sessions
Schema IO Counters
Buffer Cache Hit Ratio

Target Sizing

OCI Applications, Non OCI Applications

Detailed Technical Dashboard

Number of unique queries
Number of index access queries per schema
Number of analytic queries per schema
Average query complexity

Workload

Database Uptime

Source Details - Overview

SGA Utilization
PGA Utilization

Migration Insights

Features

The following features may contain wrong data if collected from a standby source scanning:

Feature’s name

Description

Goldengate

Identifies processes of goldengate replication.

FINER_GRANULARITY_SUP_LOGGING

Indicates whether the database is enabled for subset database replication.

Database Corrupted Blocks

Indicates if database has corrupted data blocks.

ASM Diskgroups

Indicates if database uses ASM storage.

Platform

Indicates Oracle database platform.

Unified Auditing

Indicates whether 'Unified Auditing' feature is enabled in the database.

Results Cache

Indicates whether 'Results Cache' feature used in the database.

Resource Manager

Indicates whether database utilizes Resource Manager plans other than default one.

RMAN

Identifies RMAN backup usage.

Real Application Clusters

Indicates whether database is Real Application Cluster database.

Multitenant

Indicates where database uses multitenant containers.

Large SGA

Identifies if database has more than 300 GB configured for SGA memory.

High CPU Count

Identifies if database server has more than 96 CPU.

DataGuard

Identifies if dataguard feature is in use.

DBVault

Indicates whether 'Oracle Database Vault' feature is enabled in the database.

Scanning Single PostgreSQL Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database postgresql HOST PORT --db-user USERNAME database NAME [--extended-scan] [--scan-duration DURATION] [--sample-interval INTERVAL] [--tags TAGS] [-h/--help]

HOST

Required. Database hostname or IP address.

PORT

Required. TCP port.

--db-user USERNAME

Required. Database user name.

--database NAME

Required. Database name.

--extended-scan

Extended Scan mode flag. This option triggers execution of the extended queries set that run on a source for a definite time and collect specific workload-related data.

--scan-duration SECONDS

Required if --extended-scan is in use. Total number of seconds for query execution in Extended Scan mode. Must be a positive integer from 1800 to 86400 inclusive.

--sample-interval SECONDS

Required if --extended-scan is in use. Single interval length within the total duration for query execution in Extended Scan mode. Must be a positive integer from 600 to 1800 inclusive (in seconds).

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

--all-instance-dbs

Optional. Scans all databases in the instance.

Scanning Single SQL Server Database

Usage

CODE
mmc-cli.sh/mmc-cli.bat [scanning options] source database sqlserver HOST PORT --db-user USERNAME --database NAME [--win-auth] [--tags TAGS] [-h/--help]

HOST

Required. Database hostname or IP address.

PORT

Required. TCP port.

--db-user USERNAME

Required. Database user name.

--database NAME

Required. Database name.

--win-auth

Windows Authentication flag.

--tags TAG(S)

Tag(s) to assign to the data source.

The maximum tag length is 32 characters.

--all-instance-dbs

Optional. Scans all databases in the instance.

Diagnostic Options

Diagnostic options show information about the mMC application itself and do not connect to any databases.

-h, --help

Print a listing of options and arguments available in mMC CLI.

To print help for a specific option or argument (currently supports only source type options), add the -h or --help option after a positional argument.

For example, mmc-cli.sh source database -h or mmc-cli.sh source application java --help.

-v, --version

Print the version of mMC.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.