点睛图 > OSYNC > 产品特性

OSYNC产品特性

支持本地落地文件

OSYNC导出时可以选择落地或不落地的方式:
  • 落地方式会尽快地导出成本地压缩文件,以尽可能地避免ORA-1555情况的发生,压缩率大概在20%左右。
  • 不落地的方式会直接导出、导入到目标端,本地磁盘无足够空间时可以选择不落地方式。
示例如下:

1. 不落地方式


1) 更改配置参数为不落地方式
#sync method
#1 DIRPATH_DB: [DIRPATH unload]-> [DIRPATH load]
#2 DIRPATH_FILE_DB: [DIRPATH unload]-> [File]-> [DIRPATH load]
#3 BULK_DB: [BULK unload]-> [DIRPATH load]
#4 BULK_FILE_DB: [BULK unload]-> [File]-> [DIRPATH load]
sync_method=1

2)启动复制
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...
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 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)

2. 落地方式


1) 更改配置参数为落地方式
#sync method
#1 DIRPATH_DB: [DIRPATH unload]-> [DIRPATH load]
#2 DIRPATH_FILE_DB: [DIRPATH unload]-> [File]-> [DIRPATH load]
#3 BULK_DB: [BULK unload]-> [DIRPATH load]
#4 BULK_FILE_DB: [BULK unload]-> [File]-> [DIRPATH load]
sync_method=2

2)启动复制
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...
3) 导入结束。
可以看到,落地方式分导出、导入两类线程,单张表先导出、结束后再导入。
OSYNC> status
Sync Table Statistics (Total: 1, Init: 0, Exported: 0, Imported: 1, Error: 0)

Export Threads (Table exported 1, exporting 0, error 0, remain 0)
Thread# 0: (Table exported 0, error 0, elapsed 0.00 secs, db read/file write: 0.00/0.00 secs)
Current table:[ ], status:[Unknown] (exported: 0.00 MB 0 rows 0.00 secs)
Thread# 1: (Table exported 0, error 0, elapsed 0.00 secs, db read/file write: 0.00/0.00 secs)
Current table:[ ], status:[Unknown] (exported: 0.00 MB 0 rows 0.00 secs)
Thread# 2: (Table exported 1, error 0, elapsed 9.18 secs, db read/file write: 8.15/1.03 secs)
Current table:[ANDY.T_BIG_TABLE], status:[Finish] (exported: 714.49 MB 8099838 rows 9.18 secs)
Thread# 3: (Table exported 0, error 0, elapsed 0.00 secs, db read/file write: 0.00/0.00 secs)
Current table:[ ], status:[Unknown] (exported: 0.00 MB 0 rows 0.00 secs)
Thread# 4: (Table exported 0, error 0, elapsed 0.00 secs, db read/file write: 0.00/0.00 secs)
Current table:[ ], status:[Unknown] (exported: 0.00 MB 0 rows 0.00 secs)

Import Threads (Table imported 1, importing 0, error 0, remain 0)
Thread# 0: (Table imported 0, error 0, elapsed 0.00 secs, file read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (imported: 0.00 MB 0 rows 0.00 secs)
Thread# 1: (Table imported 0, error 0, elapsed 0.00 secs, file read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (imported: 0.00 MB 0 rows 0.00 secs)
Thread# 2: (Table imported 0, error 0, elapsed 0.00 secs, file read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (imported: 0.00 MB 0 rows 0.00 secs)
Thread# 3: (Table imported 0, error 0, elapsed 0.00 secs, file read/db write: 0.00/0.00 secs)
Current Table:[ ], status:[Unknown] (imported: 0.00 MB 0 rows 0.00 secs)
Thread# 4: (Table imported 1, error 0, elapsed 19.27 secs, file read/db write: 0.92/18.34 secs)
Current Table:[ANDY.T_BIG_TABLE], status:[Finish] (imported: 714.49 MB 8099838 rows 19.27 secs)