ããPPASæ两个è¿ç§»å·¥å
·ï¼ä¸ä¸ªå¾å½¢çé¢çï¼ä¸ä¸ªå½ä»¤è¡çï¼ä¸é¢ä»¥å¾å½¢çé¢ä¸ºä¾ã
ãã1
ããé¦å
éè¦å¨ç®æ æ°æ®åºç³»ç»PPASä¸å»ºç«åæºåºå¯¹åºçç¨æ·å对ççæéï¼å建ç«ç®æ æ°æ®åºã
ããcreate user " USERNAMEXXX " withsuperuser password 'xxxxxx';
ããcreate database DatabaseNameowner="TYTUTOR" encoding='utf8';
ãã2
ããæ ¹æ®jreçæ¬(å½åç¯å¢æ¯1.4ç)æOracleæ°æ®åºç驱å¨ç¨åºæ·è´å°å¦ä¸ç®å½
ãã/opt/PostgresPlus/9.2AS/jre/lib/ext/ojdbc14.jar
ãã3
ããè¿è¡PPASè¿ç§»å·¥å
·
ãã4
ãã5
ããå¨serversä¸å³é®ç¹å»å¢å è¿ç§»çæºåç®æ æ°æ®åº
ãã6
ãã7
ããå¨å·¦ä¾§oracleæºæ°æ®åºä¸å³é®ç¹å»è¦è¿ç§»çschemaï¼ç°å¨å¨çº¿è¿ç§»
ãã8
ããéæ©ç®æ æ°æ®åºï¼schemaï¼ç¹å»run
ããOkäºï¼å¼å§è¿ç§»äºï¼å¯ä»¥çè¿ç¨ä¸çä¿¡æ¯æ示æè¿ç§»æ¥å¿æ件ï¼oracleè¿ç§»å°pgå¯è½æå¾å¤pl/sqlçæ°æ®åºå¯¹è±¡é½ä¼å¤±è´¥ï¼è¦è¿å°ppas就好å¤äºï¼å 为ppasæoracleå
¼å®¹å¼æã
ããé½æå®åå°±å¯ä»¥è¿ç§»åºç¨ç¨åºäºï¼è¿åæ¯ä¸å äºã
ããPPASè¿æ个å½ä»¤è¡çè¿ç§»å·¥å
·ï¼æ¯å¾å½¢çé¢å¯ä»¥æ对è¿ç§»è¿ç¨ææ´å¤æ§å¶ï¼å
·ä½è§ä¸é¢å
¶å¯å¸¦çåæ°ï¼
ãã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, 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,enterprisedb. db_type is case-insensitive. By default, db_type is enterprisedb.
ãã-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 should 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<CHAR> 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 inEnterpriseDB. 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 EnterpriseDB.
ãã-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 performedby MTK to migrate objects that failed due to cross-schema dependencies. TheVALUE parameter should 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 Postgres or Postgres Plus Advanced Server database. The VACUUMreclaims dead tuple storage whereas ANALYZE collects statistics for themigrated tables that are utilized for efficient query plans.
ãã-loaderCountVALUE Specify the number of jobs (threads)to perform data load in parallel. The VALUE parameter should 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.
温馨提示:答案为网友推荐,仅供参考