ora2pgpro comes with a script ora2pgpro_scanner
that can be used when you have a huge number of instances and schema to scan for migration assessment.
ora2pgpro_scanner -l CSVFILE [-o OUTDIR] -b | --binpath DIR: full path to directory where the ora2pgpro binary stays. Might be useful only on Windows OS. -c | --config FILE: set custom configuration file to use otherwise ora2pgpro will use the default: /etc/ora2pgpro/ora2pgpro.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 ora2pgpro.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, Ora2PgPro 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 schema in the XE instance. Note that in this case the SCHEMA directive in ora2pgpro.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 before 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 ora2pgpro_scanner
stays, otherwise the ora2pgpro command calls will fail.
In the migration assessment details about functions ora2pgpro always includes per default 2 migration units for TEST and 1 unit for SIZE per 1000 characters in the code. This mean that by default it will add 15 minutes in the migration assessment per function. Obviously, if you have unitary tests or very simple functions, this will not represent the real migration time.