Skip to main content
Skip table of contents

Resources

Specific Instructions *

DB2 LUW

Introduction

migVisor provides basic instructions, which can be used as a base when planning to scan a DB2 LUW source using the mMC.

Running the script on different operation systems

For each of the listed operating systems, follow these steps to create a privileged user specific to the corresponding system:

1. Create User

Windows

As an administrator, create a user named 'mig_user' at the operating system level. If lacking the necessary permissions, contact your DB2 server administrator for assistance. Set the user's password.

CODE
--Windows PowerShell
$password = Read-Host "Enter password for user mig_user" -AsSecureString
New-LocalUser -Name "mig_user" -Password $password -Description "DB2 user for MigVisor application"

Linux

With root authority, create a user 'mig_user' at the operating system level. If lacking root authority, seek assistance from the DB2 server administrator. Set the user's password.

CODE
adduser mig_user
passwd mig_user

Unix

With root authority, create a user 'mig_user' at the operating system level. If lacking root authority, contact your DB2 server administrator for assistance. Set the user's password.

CODE
mkuser mig_user
passwd mig_user

2. DB2 Configuration

Log in as the DB2 admin user and execute:

SQL
db2 update dbm cfg using SYSMON_GROUP mig_user

3. Restart DB2

Forcefully stop and start the DB2 instance:

CODE
db2stop force; db2start

4. Run SQL Script

Execute the provided SQL script in the 'Getting Started Scripts' section.

MongoDB

Introduction

migVisor provides a read-only user creation script, which can be used as a base when planning to scan a MongoDB cluster using the mMC.

Running the script on different topologies

  1. Standalone: run on the instance itself.

  2. Replicaset: run on the PRIMARY instance.

  3. Sharded cluster: run on a "mongos" instance.

Running the script on a sharded cluster topology

In order to scan a sharded cluster, the user connecting to the cluster needs to be created with a proper role on "mongos" and every PRIMARY instance of every shard in the cluster.
Notice: When scanning with the root user and root role, there is no need to use this script.

Prerequisites

  1. User creation script to execute on "mongos": https://storage.googleapis.com/general-migvisor-public/mongodb_readonly_user.js

  2. A user with clusterAdmin access to run the script which can connect to all nodes (all nodes need to be accessible to the client where you run the script).

Instructions

  1. Edit the user creation script as follows:

    1. User information to create for mMC
      USER_NAME default value "migVisor"
      USER_PASSWORD default value "Password123"

    2. Admin user that is running this script - must have privileges to create roles and users and list shards.
      ADMIN_USER default value "root"
      ADMIN_PASSWORD default value "root"

    3. Provide role name for migVisor user
      MIGVISOR_ROLE default value "migVisorRole"

  2. Copy the script to the MongoDB server.

  3. Connect to "mongos" using mongo shell and execute the load command to run the script, e.g.

    CODE
    load("/home/mongousr/create-mmc-mongo-user.js")

    Notice: Requires an absolute path

  4. Verify that the user and user role got created successfully.

JavaScript errors detected

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

If this problem persists, please contact our support.