`

把数据库从oracle迁移到PPAS

阅读更多

 

PPAS 有两个迁移工具,一个图形界面的,一个命令行的,下面以图形界面为例。

 

1

首先需要在目标数据库系统 PPAS 上建立和源库对应的用户和对等的权限,再建立目标数据库。

create user " USERNAMEXXX " with superuser password 'xxxxxx';

create database DatabaseName owner="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

 

EnterpriseDB Migration Toolkit (Build 46)

 

Usage: runMTK [-options] SCHEMA

 

If no option is specified, the complete schema will be imported.

 

where options include:

-help        Display the application command-line usage.

-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 -tables is in place, it imports data only for the selected tables. Note: If there are any FK constraints defined on target tables, use -truncLoad option along with this option.

 

-sourcedbtype db_type The -sourcedbtype option specifies the source database type. db_type may be one of the following values: mysql, oracle, sqlserver, sybase, postgresql, enterprisedb. db_type is case-insensitive. By default, db_type is oracle.

-targetdbtype db_type The -targetdbtype option specifies the target database type. db_type may 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 stored procedures.

-allFuncs  Import all functions.

-funcs LIST    Import comma-separated list of functions.

-allPackages    Import all packages.

-packages LIST Import comma-separated list of packages.

-allSequences  Import all sequences.

-sequences LIST Import comma-separated list of sequences.

-targetSchema NAME Name of the target schema (default: target schema is named after source schema).

-allDBLinks    Import all Database Links.

-allSynonyms  It enables the migration of all public and private synonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name already exists in the target database, the existing synonym will be replaced with the migrated version.

-allPublicSynonyms      It enables the migration of all public synonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name already exists in the target database, the existing synonym will be replaced with the migrated version.

-allPrivateSynonyms    It enables the migration of all private synonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name already exists in the target database, the existing synonym will be replaced with the migrated version.

 

-dropSchema [true|false] Drop the schema if it already exists in the target database (default: false).

-truncLoad     It disables any constraints on target table and truncates the data from the table before importing new data. This option can only be used with -dataOnly.

-safeMode      Transfer data in safe mode using plain SQL statements.

-copyDelimiter      Specify a single character to be used as delimiter in copy command when loading table data. Default is \t

-batchSize       Specify the Batch Size to be used by the bulk 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 in the Copy Command. Valid value is > 0, default batch size is 8 MB

-fetchSize       Specify fetch size in terms of number of rows should be fetched in result set at a time. This option can be used when tables contain millions of rows and you want to avoid out of memory errors.

-filterProp       The properties file that contains table where clause.

-skipFKConst Skip migration of FK constraints.

-skipCKConst       Skip migration of Check constraints.

-ignoreCheckConstFilter     By default MTK does not migrate Check constraints and Default clauses from Sybase, use this option to turn off this filter.

-fastCopy       Bypass WAL logging to perform the COPY operation in an optimized way, default disabled.

-customColTypeMapping LIST Use custom type mapping represented by a semi-colon separated list, where each entry is specified using COL_NAME_REG_EXPR=TYPE pair. e.g. .*ID=INTEGER

-customColTypeMappingFile PROP_FILE    The custom type mapping represented by a properties file, where each entry is specified using COL_NAME_REG_EXPR=TYPE pair. e.g. .*ID=INTEGER

-offlineMigration [PATH] This performs offline migration and saves the DDL/DML scripts in files for a later execution. By default the script files will be saved under user home folder, if required follow -offlineMigration option with a custom path.

-logDir LOG_PATH Specify a custom path to save the log file. By default, on Linux the logs will be saved under folder $HOME/.enterprisedb/migration-toolkit/logs. In case of Windows logs will be saved under folder %HOMEDRIVE%%HOMEPATH%\.enterprisedb\migration-toolkit\logs.

-copyViaDBLinkOra This option can be used to copy data using dblink_ora COPY commad. This option can only be used in Oracle to EnterpriseDB migration mode.

-singleDataFile      Use single SQL file for offline data storage for all tables. This option cannot be used in COPY format.

-allUsers Import all users and roles from the source database.

-users LIST Import the selected users/roles from the source database. LIST is a comma-separated list of user/role names e.g. -users MTK,SAMPLE

-allRules Import all rules from the source database.

-rules LIST Import the selected rules from the source database. LIST is a comma-separated list of rule names e.g. -rules high_sal_emp,low_sal_emp

-allGroups Import all groups from the source database.

-groups LIST Import the selected groups from the source database. LIST is a comma-separated list of group names e.g. -groups acct_emp,mkt_emp

-allDomains Import all domain, enumeration and composite types from the source database.

-domains LIST Import the selected domain, enumeration and composite types from the source database. LIST is a comma-separated list of domain names e.g. -domains d_email,d_dob, mood

-objecttypes    Import the user-defined object types.

-replaceNullChar <CHAR> If null character is part of a column value, the data migration fails over JDBC protocol. This option can be used to replace null character with a user-specified character.

-importPartitionAsTable [LIST] Use this option to import Oracle Partitioned table as a normal table in EnterpriseDB. To apply the rule on a selected set of tables, follow the option by a comma-separated list of table names.

-enableConstBeforeDataLoad Use this option to re-enable constraints (and triggers) before data load. This is useful in the scenario when the migrated table is mapped to a partition table in EnterpriseDB.

-checkFunctionBodies [true|false] When set to false, it disables validation of the function body during function creation, this is to avoid errors if function contains forward references. Applicable when target database is Postgres/EnterpriseDB, default is true.

-retryCount VALUE    Specify the number of re-attempts performed by MTK to migrate objects that failed due to cross-schema dependencies. The VALUE parameter should be greater than 0, default is 2.

-analyze It invokes ANALYZE operation against a target Postgres or Postgres Plus Advanced Server database. The ANALYZE collects statistics for the migrated tables that are utilized for efficient query plans.

-vacuumAnalyze It invokes VACUUM and ANALYZE operations against a target Postgres or Postgres Plus Advanced Server database. The VACUUM reclaims dead tuple storage whereas ANALYZE collects statistics for the migrated tables that are utilized for efficient query plans.

-loaderCount VALUE Specify the number of jobs (threads) to perform data load in parallel. The VALUE parameter should be greater than 0, default is 1.

 

Database Connection Information:

The application will read the connectivity information for the source and target database servers from toolkit.properties file.

Refer to MTK readme document for more information.



 

  • 大小: 5.5 KB
  • 大小: 30.3 KB
  • 大小: 56.6 KB
  • 大小: 64.5 KB
  • 大小: 64.2 KB
  • 大小: 38.1 KB
0
0
分享到:
评论

相关推荐

    Oracle到Mysql数据库迁移总结

    Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结

    oracle数据库迁移实例01

    ### Oracle数据库迁移实例01:Windows环境下通过镜像文件实现db_name与instance_name不一致的迁移 #### 环境概述 本案例介绍了一个特定场景下的Oracle数据库迁移过程,涉及的环境包括: - **源数据库**:Oracle 9.2...

    oracle向达梦数据库迁移

    Oracle12C 向达梦8(DM8)迁移是一个涉及多个步骤的技术过程,主要目的是将现有...这个迁移过程涉及到数据库管理、数据处理、编程等多个领域,需要对Oracle和DM8都有深入的理解,才能确保迁移的成功和系统的稳定运行。

    数据库迁移oracle到DM.docx

    ### 数据库迁移:Oracle到DM #### 一、概述 随着信息技术的发展,企业对数据库的需求日益增长,同时也会出现从一种数据库系统向另一种数据库系统的迁移需求。本文将详细介绍如何使用达梦数据库(简称DM)提供的...

    IBM Portal7.0数据库迁移oracle教程完全版

    ### IBM Portal 7.0 数据库迁移至 Oracle 完全教程 #### 一、数据库准备 **1.1 IBM Portal 7.0 兼容的 Oracle 版本及操作系统** IBM Portal 7.0 支持多种 Oracle 数据库版本及操作系统,确保在迁移过程中选择正确...

    migration:瀚高数据库迁移工具,用于多种数据库类型(mysql、oracle等)迁移到瀚高数据库

    一、数据库迁移——MySQL举例 1、解压 migration-4.1.4-2023-11-23.zip 2、打开 migration 工具 3、点击帮助菜单,可查看使用说明文档,如下图所示 二、迁移步骤: 1、新建组,随便起名。 2、数据库连接,新建 源库 ...

    SQLSERVER到ORACLE的数据库迁移

    ### SQL Server到Oracle数据库迁移详解 #### 一、引言 随着企业的发展和技术的更新换代,企业常常需要对原有的数据库系统进行迁移或升级。本文将详细介绍如何使用Java语言实现从SQL Server到Oracle数据库的数据...

    从informix迁移到oracle

    本文档详细介绍了Oracle数据库迁移工具(OMWB)的使用,为把历史数据从Informix迁移到Oracle的用户提供了少走弯路的途径。通过使用OMWB,可以将数据从Informix迁移到Oracle,整个迁移过程包括了准备迁移计划、获取...

    国产化改造,如何将Oracle数据完整迁移到DM数据库。

    国产化改造,如何将Oracle数据完整迁移到DM数据库。 本文将详细介绍将Oracle数据完整迁移到DM数据库的过程,包括分析待移植系统、数据迁移、PL/SQL移植、移植结果校验、应用系统移植、测试和优化等几个方面的工作。...

    瀚高迁移工具,迁移工具支持源端为Oracle、MySQL、SQL Server、DB2、Kingbase、DM

    迁移工具版本为hgdb-migration-v4.1.4,瀚高数据库迁移工具支持源端为Oracle、MySQL、SQL Server、DB2、KingbaseV7、KingbaseV8、DM7、DM8、HIGHGO数据库,目标端为HIGHGO、PostgreSQL数据库的自动化迁移,为了能更...

    ORACLE数据库跨平台迁移

    ORACLE数据库跨平台迁移是指将WINDOWS平台上的ORACLE数据库迁移到LINUX平台,当前LINUX平台只装数据库软件,不建库。本文将详细介绍如何使用RMAN Convert database特性来实现数据库跨平台迁移。 RMAN Convert ...

    Oracle数据库迁移升级详细步骤.docx

    Oracle数据库迁移升级是指将现有的Oracle数据库从低版本升级到高版本,或者将数据库从一台服务器迁移到另一台服务器,以提高数据库性能、安全性和可扩展性。以下是Oracle数据库迁移升级的详细步骤: 操作系统安装及...

    oracle迁移达梦常见问题汇总

    本文主要结合之前一次oracle迁移达梦的项目,将碰到的问题以及一系列踩过的坑列举出来供大家参考,数据库版本是达梦7。(本文中涉及到的部分对象名已用sch1,tab1等方式替换) 1、整体情况 迁移过程中失败任务数低于5%...

    从Oracle迁移到MySQL经典实战

    《从Oracle迁移到MySQL经典实战》是一本针对企业节省成本、优化数据库架构的重要指南。Oracle数据库系统以其强大的功能和稳定性在企业级应用中占据主导地位,然而,随着MySQL的不断发展和成熟,其开源、免费的特性使...

    HIS数据库从Window迁移到Linux平台的解决方案.pdf

    【HIS数据库从Window迁移到Linux平台的解决方案】 在医疗行业中,医院信息系统(HIS)是关键基础设施,负责处理大量的患者数据。随着业务量的增长,原有的HIS数据库服务器可能面临性能瓶颈,尤其当运行在Windows...

    快速实现Oracle数据库大数据迁移方案

    4. 了解 Oracle 数据库迁移方案:本教程中提供了一种快速稳定的数据库迁移方案,使用 Oracle 数据泵来实现快速加载和卸eload 数据。 5. 了解目录对象的创建:在 Oracle 数据库迁移中,需要创建目录对象来存储导入...

    oracle项目--DataBase Migration(数据库迁移)PPT

    Oracle数据库迁移项目是IT行业中常见的任务,涉及到将数据和结构从一个数据库系统迁移到另一个,例如从SQL Server迁移到Oracle。以下是对四种数据库迁移方案的详细说明: **方案一**: 此方案主要依赖于手动操作和...

    【TTS】AIX平台数据库迁移到Linux环境(真实环境).pdf

    综上所述,本文提供了一个全面的指南,针对AIX平台上的Oracle数据库迁移至Linux环境的整个过程,提供了详实的步骤和技巧。这个过程涵盖了从前期规划、收集必要信息、使用特定工具进行数据迁移,到后期的验证和优化的...

    C# 实现oracle数据库视图的迁移

    在IT行业中,数据库的迁移是一项常见的任务,尤其是在企业级应用中,为了数据安全、系统升级或者业务需求,可能需要将数据库对象从一个环境移动到另一个环境。本篇将详细讲解如何利用C#编程语言实现Oracle数据库视图...

Global site tag (gtag.js) - Google Analytics