点睛图 > OSYNC > 产品特性

OSYNC产品特性

ORACLE数据库间高速的导出、导入

直接路径导出、导入的优点如下:
  • 直接路径操作的性能极高,导出/导入速度和expdp/impdp相当。
  • 导出、导入时跳过了SQL层,避免了对SGA造成影响。
  • Nologging方式加载,避免了导入时生成大量的UNDO/REDO。

可以看到,以下导出、导入800万行、700MB(纯数据)的表,仅花费23秒左右便完成导出、导入。

1. 表结构


SQL> desc andy2.t_big_table
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 OWNER                                                          VARCHAR2(30)
 OBJECT_NAME                                                    VARCHAR2(128)
 SUBOBJECT_NAME                                                 VARCHAR2(30)
 OBJECT_ID                                                      NUMBER
 DATA_OBJECT_ID                                                 NUMBER
 OBJECT_TYPE                                                    VARCHAR2(19)
 CREATED                                                        DATE
 LAST_DDL_TIME                                                  DATE
 TIMESTAMP                                                      VARCHAR2(19)
 STATUS                                                         VARCHAR2(7)
 TEMPORARY                                                      VARCHAR2(1)
 GENERATED                                                      VARCHAR2(1)
 SECONDARY                                                      VARCHAR2(1)
 NAMESPACE                                                      NUMBER
 EDITION_NAME                                                   VARCHAR2(30)
SQL> select count(*) from andy2.t_big_table;
COUNT(*)
----------
8099838

2. 启动同步


OSYNC> start sync
  DB information:
  -------------------------------------------------------------------------------------------------- 
  |             |Machine             |DB                  |Instance            |Version             |
  -------------------------------------------------------------------------------------------------- 
  |From(Source) |shareplex           |DB10205             |db10205             |10.2.0.5.0          |
  -------------------------------------------------------------------------------------------------- 
  |  To(Target) |shareplex           |DB11203             |db11203             |11.2.0.3.0          | 
  ------------------- ------------------------------------------------------------------------------ 
Are you sure to start sync? (N) y
Starting sync...

3. 导入结束。


OSYNC> status
Sync Table Statistics (Total: 1, Init: 0, Exported: 0, Imported: 1, Error: 0)
Sync Threads (Table synced 1, syncing 0, error 0, remain 0)
Thread# 0: (Table synced 1, error 0, elapsed 23.81 secs, db read/db write: 14.07/9.74 secs)
Current Table:[ANDY.T_BIG_TABLE], status:[Finish] (synced: 714.49 MB 8099838 rows 23.81 secs)
Thread# 1: (Table synced 0, error 0, elapsed 0.00 secs, db read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (synced: 0.00 MB 0 rows 0.00 secs)
Thread# 2: (Table synced 0, error 0, elapsed 0.00 secs, db read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (synced: 0.00 MB 0 rows 0.00 secs)
Thread# 3: (Table synced 0, error 0, elapsed 0.00 secs, db read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (synced: 0.00 MB 0 rows 0.00 secs)
Thread# 4: (Table synced 0, error 0, elapsed 0.00 secs, db read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (synced: 0.00 MB 0 rows 0.00 secs)