PPAS has two migration tools, one graphical interface and one command line. The following uses a graphical interface as an example. 1. First, you need to create the user and peer permissions corresponding to the source database on the target database system PPAS, and then create the target database. CreateuserUSERNAMEXXXwithsuperuserpasswordxxxxxx; createdatabaseDatabaseNa
PPAS has two migration tools, one graphical interface and one command line. The following uses a graphical interface as an example. 1. First, you need to create the user and peer permissions corresponding to the source database on the target database system PPAS, and then create the target database. Create user USERNAMEXXX withsuperuser password 'xxxxxx'; create database DatabaseNa
PPAS has two migration tools, one graphical interface and one command line. The following uses a graphical interface as an example.
1
First, you need to create the user and peer permissions corresponding to the source database on the target database system PPAS, and then create the target database.
Create user "USERNAMEXXX" withsuperuser password 'xxxxxx ';
Create database DatabaseNameowner = "TYTUTOR" encoding = 'utf8 ';
2
Copy the oracle database driver to the following directory based on the jre version (the current environment is version 1.4 ):
/Opt/PostgresPlus/9.2AS/jre/lib/ext/ojdbc14.jar
3
Run the PPAS migration tool
4
5
Right-click servers and choose add migration source and target database.
6
7
On the left-side oracle source database, right-click the schema to be migrated, And now online migration
8
Select the target database, schema, and click run
OK. You have started the migration. You can check the information prompts during the migration or migrate log files. oracle may fail to migrate many pl/SQL database objects to pg, it is much better to migrate to ppas because ppas has an oracle compatibility engine.
You can migrate the application after you get all done. This is a bunch of things.
PPAS also has a command line migration tool that provides more control over the migration process than the graphical interface. For details, see the following parameters:
Ot @ host1 9.2AS] # jre/bin/java-jar bin/edb-migrationtoolkit.jar-help
EnterpriseDBMigration Toolkit (Build 46)
Usage: runMTK [-options] SCHEMA
If no option isspecified, the complete schema will be imported.
Where optionsinclude:
-Help Display the application command-lineusage.
-Version Display the application version information.
-Verbose [on | off] Display application log messages on standard output (default: on ).
-SchemaOnly Import the schema object definitions only.
-DataOnly Import the table data only. when-tablesis in place, it imports data only for the selected tables. note: If there areany FK constraints defined on target tables, use-truncLoad option along withthis option.
-Sourcedbtypedb_type The-sourcedbtype option specifies the source database type. db_typemay be one of the following values: mysql, oracle, sqlserver, sybase, postgresql, and enterprisedb. db_type is case-insensitive. by default, db_type is oracle.
-Targetdbtypedb_type The-targetdbtype option specifies the target database type. db_typemay be one of the following values: oracle, sqlserver, postgresql, and enterprisedb. db_type is case-insensitive. by default, db_type is already isedb.
-AllTables Import all tables.
-Tables LIST Import comma-separated list of tables.
-Constraints Import the table constraints.
-Indexes Import the table indexes.
-Triggers Import the table triggers.
-AllViews Import all Views.
-Views LIST Import comma-separated list of Views.
-AllProcs Import all stored procedures.
-Procs LIST Import comma-separated list of storedprocedures.
-AllFuncs Import all functions.
-Funcs LIST Import comma-separated list of functions.
-AllPackages Import all packages.
-Packages LISTImport comma-separated list of packages.
-AllSequences Import all sequences.
-Sequences LISTImport comma-separated list of sequences.
-TargetSchemaNAME Name of the target schema (default: target schema is named after sourceschema ).
-AllDBLinks Import all Database Links.
-AllSynonyms It enables the migration of all public andprivate synonyms from an Oracle database to an Advanced Server database. if a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.
-AllPublicSynonyms It enables the migration of all publicsynonyms from an Oracle database to an Advanced Server database. if a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.
-AllPrivateSynonyms It enables the migration of all privatesynonyms from an Oracle database to an Advanced Server database. if a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.
-DropSchema [true | false] Drop the schema if it already exists in the target database (default: false ).
-TruncLoad It disables any constraints on target tableand truncates the data from the table before importing new data. This optioncan only be used with-dataOnly.
-SafeMode Transfer data in safe mode using plain SQLstatements.
-CopyDelimiter Specify a single character to be used asdelimiter in copy command when loading table data. Default is \ t
-BatchSize Specify the Batch Size to be used by thebulk inserts. Valid values are 1-1000, default batch size is 1000, reduce if you run into Out of Memory exception
-CpBatchSize Specify the Batch Size in MB, to be used inthe Copy Command. Valid value is> 0, default batch size is 8 MB
-FetchSize Specify fetch size in terms of number ofrows shocould be fetched in result set at a time. This option can be used whentables contain millions of rows and you want to avoid out of memory errors.
-FilterProp The properties file that contains tablewhere clause.
-SkipFKConst Skip migration of FK constraints.
-SkipCKConst Skip migration of Check constraints.
-IgnoreCheckConstFilter By default MTK does not migrate Checkconstraints and Default clauses from Sybase, use this option to turn off thisfilter.
-FastCopy Bypass WAL logging to perform the COPYoperation in an optimized way, default disabled.
-CustomColTypeMappingLIST Use custom type mapping representedby a semi-colon separated list, where each entry is specified usingCOL_NAME_REG_EXPR = TYPE pair. e.g .. * ID = INTEGER
-CustomColTypeMappingFilePROP_FILE The custom type mappingrepresented by a properties file, where each entry is specified usingCOL_NAME_REG_EXPR = TYPE pair. e.g .. * ID = INTEGER
-OfflineMigration [PATH] This performs offline migration and saves the DDL/DML scripts in filesfor a later execution. by default the script files will be saved under userhome folder, if required follow-offlineMigration option with a custom path.
-LogDir LOG_PATHSpecify a custom path to save the log file. by default, on Linux the logs willbe saved under folder $ HOME /. enterprisedb/migration-toolkit/logs. in case ofWindows logs will be saved under folder % HOMEDRIVE % HOMEPATH % \. enterprisedb \ migration-toolkit \ logs.
-CopyViaDBLinkOraThis option can be used to copy data using dblink_ora COPY commad. This optioncan only be used in Oracle to EnterpriseDB migration mode.
-SingleDataFile Use single SQL file for offline datastorage for all tables. This option cannot be used in COPY format.
-AllUsers Import allusers and roles from the source database.
-Users LISTImport the selected users/roles from the source database. LIST is acomma-separated list of user/role names e.g.-users MTK, SAMPLE
-AllRules Importall rules from the source database.
-Rules LIST Importthe selected rules from the source database. LIST is a comma-separated list ofrule names e.g.-rules high_sal_emp, low_sal_emp
-AllGroups Importall groups from the source database.
-Groups LISTImport the selected groups from the source database. LIST is a comma-separatedlist of group names e.g.-groups acct_emp, mkt_emp
-AllDomainsImport all domain, enumeration and composite types from the source database.
-Domains LISTImport the selected domain, enumeration and composite types from the sourcedatabase. LIST is a comma-separated list of domain names e.g.-domainsd_email, d_dob, mood
-Objecttypes Import the user-defined object types.
-ReplaceNullChar If null character is part of a column value, the data migrationfails over JDBC protocol. This option can be used to replace null characterwith a user-specified character.
-ImportPartitionAsTable [LIST] Use this option to import Oracle Partitioned table as a normal table in1_isedb. to apply the rule on a selected set of tables, follow the optionby a comma-separated list of table names.
-EnableConstBeforeDataLoadUse this option to re-enable constraints (and triggers) before data load. Thisis useful in the scenario when the migrated table is mapped to a partitiontable in specified isedb.
-CheckFunctionBodies [true | false] When set to false, it disables validation of the function bodyduring function creation, this is to avoid errors if function contains forwardreferences. applicable when target database is Postgres/EnterpriseDB, defaultis true.
-RetryCount VALUE Specify the number of re-attempts into medby MTK to migrate objects that failed due to cross-schema dependencies. TheVALUE parameter shoeter be greater than 0, default is 2.
-Analyze It invokes ANALYZE operation against a targetPostgres or Postgres Plus Advanced Server database. The ANALYZE collectsstatistics for the migrated tables that are utilized for efficient query plans.
-VacuumAnalyze It invokes VACUUM and ANALYZE operationsagainst a target region s or milliseconds s Plus Advanced Server database. The specified dead tuple storage whereas ANALYZE collects statistics for each tables that are utilized for efficient query plans.
-LoaderCountVALUE Specify the number of jobs (threads) to perform data load in parallel. The VALUE parameter shocould be greater than 0, default is 1.
DatabaseConnection Information:
The applicationwill read the connectivity information for the source and target databaseservers from toolkit. properties file.
Refer to MTKreadme document for more information.