Global Oracle and MySQL Migration Assessment
Configuration for global Oracle and MySQL migration assessment
Global Oracle and MySQL migration assessment
Ora2Pg comes with a script ora2pg_scanner that can be used when you have a huge number of instances and schemas to scan for migration assessment.
Usage: ora2pg_scanner -l CSVFILE [-o OUTDIR]
-b | --binpath DIR: full path to directory where the ora2pg binary resides.
Might be useful only on Windows OS.
-c | --config FILE: set custom configuration file to use, otherwise ora2pg
will use the default: /etc/ora2pg/ora2pg.conf.
-l | --list FILE : CSV file containing a list of databases to scan with
all required information. The first line of the file
can contain the following header that describes the
format that must be used:
"type","schema/database","dsn","user","password"
-o | --outdir DIR : (optional) by default all reports will be dumped to a
directory named 'output', it will be created automatically.
If you want to change the name of this directory, set the name
at second argument.
-t | --test : just try all connections by retrieving the required schema
or database name. Useful to validate your CSV list file.
-u | --unit MIN : redefine globally the migration cost unit value in minutes.
Default is taken from the ora2pg.conf (default 5 minutes).
Here is a full example of a CSV databases list file:
"type","schema/database","dsn","user","password"
"MYSQL","sakila","dbi:mysql:host=192.168.1.10;database=sakila;port=3306","root","secret"
"ORACLE","HR","dbi:Oracle:host=192.168.1.10;sid=XE;port=1521","system","manager"
"MSSQL","HR","dbi:ODBC:driver=msodbcsql18;server=srv.database.windows.net;database=testdb","system","manager"
The CSV field separator must be a comma.
Note that if you want to scan all schemas from an Oracle instance, you just
have to leave the schema field empty. Ora2Pg will automatically detect all
available schemas and generate a report for each one. Of course, you need to
use a connection user with enough privileges to be able to scan all schemas.
For example:
"ORACLE","","dbi:Oracle:host=192.168.1.10;sid=XE;port=1521","system","manager"
"MSSQL","","dbi:ODBC:driver=msodbcsql18;server=srv.database.windows.net;database=testdb","usrname","passwd"
will generate a report for all schemas in the XE instance. Note that in this
case the SCHEMA directive in ora2pg.conf must not be set.It will generate a CSV file with the assessment result, one line per schema or database and a detailed HTML report for each database scanned.
Hint: Use the -t | --test option beforehand to test all your connections in your CSV file.
For Windows users, you must use the -b command line option to set the directory where ora2pg_scanner resides, otherwise the ora2pg command calls will fail.
In the migration assessment details about functions, Ora2Pg always includes by default 2 migration units for TEST and 1 unit for SIZE per 1000 characters in the code. This means that by default it will add 15 minutes to the migration assessment per function. Obviously, if you have unit tests or very simple functions this will not represent the actual migration time.
