点睛图 > OSYNC > 产品特性

OSYNC产品特性

灵活、易用

OSYNC和expdp/impdp相比,更加灵活和易用:
  • 可以运行在任何一台电脑上,比如本地笔记本电脑。
  • 支持Oracle 10g 和12c版本间跨平台、跨版本相互复制。
  • 配置文件中可以指定闪回SCN#, 连接字符串等,方便使用。
以下示例把ANDY用户下的表t_big_table从Linux ORACLE 10g导出,然后导入到Windows ORACLE 12c:

1. osync.ini文件中配置连接字符串


#source connect str>
source=andy/andy@192.168.1.100:1521/db10205

#target connect str>
target=andy/andy@192.168.1.200:1521/db11203

2. table.list文件中配置要导出、导入的表


# < owner.table > <owner.table >
andy.t_big_table andy.t_big_table

3. 从Linux ORACLE 10g导入到Windows ORACLE 12c


OSYNC> init sync 验证导出表、并置初始复制状态为未复制。
OSYNC> start sync
DB information:
  --------------------------------------------------------------------------------------------------
  |             |Machine             |DB                  |Instance            |Version             |
  --------------------------------------------------------------------------------------------------
  |From(Source) |shareplex           |DB10205             |db10205             |10.2.0.5.0          |
  --------------------------------------------------------------------------------------------------
  |  To(Target) |ANDY-PC             |TEST121             |test121             |12.1.0.1.0          |
  ------------------- ------------------------------------------------------------------------------
Are you sure to start sync? (N) y
Starting sync...

4. 导入完成


可以看到,800万行,700MB(纯数据)的表,通过百兆网络带宽传输,在2分钟之内便完成导出、导入。
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 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# 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 1, error 0, elapsed 114.55 secs, db read/db write: 10.23/104.32 secs)
Current Table:[ANDY.T_BIG_TABLE], status:[Finish] (synced: 714.49 MB 8099838 rows 114.55 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)