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
分享到:
相关推荐
Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结Oracle到Mysql数据库迁移总结
ORACLE数据库迁移方案,单机迁移到rac
windows环境下, db_name和instance_name都不相同的情况下的数据库迁移. 通过镜像文件实现.
IBM Portal7.0数据库迁移oracle教程完全版
使用DM迁移工具,把oracle数据库迁移到DM数据库中的过程
用java实现从SQLSERVER到ORACLE的数据库迁移
本文主要结合之前一次oracle迁移达梦的项目,将碰到的问题以及一系列踩过的坑列举出来供大家参考,数据库版本是达梦7。(本文中涉及到的部分对象名已用sch1,tab1等方式替换) 1、整体情况 迁移过程中失败任务数低于5%...
Oracle到MySQL转换器是将数据库从Oracle迁移到MySQL服务器的工具。由于直接连接到源数据库和目标数据库,该程序保证了转换过程的高性能。它不使用ODBC或任何其他中间件组件。不需要安装Oracle组件。安装包包括产品到...
国产化改造,如何将Oracle数据完整迁移到DM数据库。
通过拷贝数据库文件的方式完成ORACLE11g数据库的迁移,内容图文并茂方式的介绍,照做一定能学会。
Oracle数据库升级和迁移 Oracle数据库升级和迁移 ......................
用C# 实现将 oracle数据库的视图从一个数据库迁移到另一个数据库。
从Oracle迁移到MySQL经典实战,省钱公司必备
利用RMAN Convert database特性,将WINDOWS平台上的oracle数据库跨平台迁移到LINUX平台,当前LINUX平台只装数据库软件,不建库
今天需要把access数据库的内容迁移到oracle数据库,本来想每个表都做一个导入按钮的,后来想想这个办法太死板,经过一个白天的努力,写成这个可以快速迁移数据的软件,因为只是满足自己需要,所以很多方面没有完善,...
Oracle数据库迁移从Windows到Linux Oracle数据库迁移从Windows到Linux 18小时停机时间完成230TB数据从AIX到Linux的迁移 数据库-Oracle11gR2-RAC-with-ASM存储迁移 PDB迁移和克隆 【深度好文】ORACLE 11.2.0.4到...
Oracle数据库迁移操作指南
linux下的ORACLE 数据库迁移,新人适用。
现需要开发一套程序用来快速迁移数据库,要求如下: 1.使用人员可以指定迁移数据库类型 如:(orcal,sqlServer,csv 迁移至mysql) 2.在迁移数据库时,可以只迁移指定字段. 3.开发多任务的平台,按权重去执行任务,如:...
ORACLE数据库ORACLE数据库ORACLE数据库ORACLE数据库ORACLE数据库ORACLE数据库ORACLE数据库ORACLE数据库