Chinaunix首页 | 论坛 | 博客
  • 博客访问: 936915
  • 博文数量: 185
  • 博客积分: 50
  • 博客等级: 民兵
  • 技术积分: 3934
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-11 13:11
个人简介

iihero@ChinaUnix, ehero.[iihero] 数据库技术的痴迷爱好者. 您可以通过iihero AT qq.com联系到我 以下是我的三本图书: Sybase ASE in Action, Oracle Spatial及OCI高级编程, Java2网络协议内幕

文章分类

全部博文(185)

文章存档

2014年(4)

2013年(181)

分类: Sybase

2013-11-20 23:13:21

SQLAnwhere数据库的unload/reload主要用于数据库的物理重建,有时候能把数据库文件收缩得非常小,同时性能也得到提升。

本文来源于一个实际的生产环境示例。原始的db文件达到6.6G, log文件,达到145G. 经过unload/reload之后,db文件只有79M,而事务log文件只有4.4M.

请看下边的操作步骤:

1. 执行unload并reload, 新建一个数据库文件e:\default.db
E:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64>dbunload -c "uid=dba;pwd=sql;dbf=E:\Sybase\UnwiredPlatform\Data\CDB\default.db" -an e:\default.db


  1. Unloading "DBA"."sup_pdcn"  
  2. Unloading "DBA"."sup_requestor"  
  3. Unloading "DBA"."d1_phx_1_0_asoheader_sk"  
  4. Unloaded 150 tables of 218  
  5. Unloading "DBA"."d1_phx_1_0_asoorderedpa_16449_sk"  
  6. Unloading "DBA"."d1_phx_1_0_asopartner_sk"  
  7. Unloading "DBA"."d1_phx_1_0_asoshippedpa_47173_sk"  
  8. Unloading "DBA"."d1_phx_1_0_asoshippedse_49199_sk"  
  9. Unloading "DBA"."d1_phx_1_0_businesspart_60140_sk"  
  10. Unloading "DBA"."d1_phx_1_0_contactperso_94681_sk"  
  11. Unloading "DBA"."d1_phx_1_0_customerfaci_60060_sk"  
  12. Unloading "DBA"."d1_phx_1_0_equipmentmas_48276_sk"  
  13. Unloading "DBA"."d1_phx_1_0_fse_sk"  
  14. Unloading "DBA"."d1_phx_1_0_fseassignmen_99497_sk"  
  15. Unloading "DBA"."d1_phx_1_0_historyorder_64376_sk"  
  16. Unloading "DBA"."d1_phx_1_0_historyswohe_23872_sk"  
  17. Unloading "DBA"."d1_phx_1_0_historyswoop_44172_sk"  
  18. Unloading "DBA"."d1_phx_1_0_historyusedp_83880_sk"  
  19. Unloading "DBA"."d1_phx_1_0_materialmast_53065_sk"  
  20. Unloading "DBA"."d1_phx_1_0_materialmast_65981_sk"  
  21. Unloading "DBA"."d1_phx_1_0_notification_53622_sk"  
  22. Unloading "DBA"."d1_phx_1_0_notification_96212_sk"  
  23. Unloading "DBA"."d1_phx_1_0_partsmovemen_19757_sk"  
  24. Unloading "DBA"."d1_phx_1_0_swocomponent_sk"  
  25. Unloading "DBA"."d1_phx_1_0_swooperation_sk"  
  26. Unloading "DBA"."d1_phx_1_0_timeconfirma_83198_sk"  
  27. Unloading "DBA"."d1_phx_1_0_swoheader_sk"  
  28. Unloading "DBA"."d1_phx_1_0_keygenerator"  
  29. Unloading "DBA"."d1_phx_1_0_packagebigpr_33993"  
  30. Unloading "DBA"."d1_phx_1_0_packageprope_74499"  
  31. Unloading "DBA"."d1_phx_1_0_operationrep_99182"  
  32. Unloading "DBA"."d1_phx_1_0_logrecordimp_21191"  
  33. Unloading "DBA"."d1_phx_1_0_fse_pull_pq"  
  34. Unloading "DBA"."d1_phx_1_0_fse"  
  35. Unloading "DBA"."d1_phx_1_0_customerfaci_60060"  
  36. Unloading "DBA"."d1_phx_1_0_materialmast_04961"  
  37. Unloading "DBA"."d1_phx_1_0_materialmast_61933"  
  38. Unloading "DBA"."d1_phx_1_0_materialmast_65981"  
  39. Unloading "DBA"."d1_phx_1_0_materialmast_53065"  
  40. Unloading "DBA"."d1_phx_1_0_fseassignmen_38789"  
  41. Unloading "DBA"."d1_phx_1_0_changelogimp_38232"  
  42. Unloading "DBA"."d1_phx_1_0_businesspart_60140"  
  43. Unloading "DBA"."d1_phx_1_0_contactperso_94681"  
  44. Unloading "DBA"."d1_phx_1_0_fseassignmen_99497"  
  45. Unloading "DBA"."d1_phx_1_0_swoheader"  
  46. Unloading "DBA"."d1_phx_1_0_swocomponent"  
  47. Unloading "DBA"."d1_phx_1_0_swooperation"  
  48. Unloading "DBA"."d1_phx_1_0_partsmovemen_19757"  
  49. Unloading "DBA"."d1_phx_1_0_notification_96212"  
  50. Unloading "DBA"."d1_phx_1_0_notification_53622"  
  51. Unloading "DBA"."d1_phx_1_0_equipmentmas_48276"  
  52. Unloading "DBA"."d1_phx_1_0_historyswohe_23872"  
  53. Unloading "DBA"."d1_phx_1_0_historyusedp_83880"  
  54. Unloading "DBA"."d1_phx_1_0_historyswoop_44172"  
  55. Unloaded 200 tables of 218  
  56. Unloading "DBA"."d1_phx_1_0_historyorder_64376"  
  57. Unloading "DBA"."d1_phx_1_0_asoheader"  
  58. Unloading "DBA"."d1_phx_1_0_asoorderedpa_16449"  
  59. Unloading "DBA"."d1_phx_1_0_timeconfirma_83198"  
  60. Unloading "DBA"."d1_phx_1_0_asopartner"  
  61. Unloading "DBA"."d1_phx_1_0_asoshippedpa_47173"  
  62. Unloading "DBA"."d1_phx_1_0_asoshippedse_49199"  
  63. Unloading "DBA"."D1_PHX_1_0__GRAPH_EXPIRATION"  
  64. Unloading "DBA"."D1_PHX_1_0__GRAPH"  
  65. Unloading "DBA"."D1_PHX_1_0__GRAPH_SK"  
  66. Unloading "DBA"."D1_PHX_1_0__CACHE_POLICY"  
  67. Unloading "DBA"."D1_PHX_1_0__CACHE_UPDATE"  
  68. Unloading "DBA"."D1_PHX_1_0__CACHE_STATE"  
  69. Unloading "DBA"."D1_PHX_1_0__PARTITION_REFRESH"  
  70. Unloading "DBA"."D1_PHX_1_0__PARTITION"  
  71. Unloading "DBA"."D1_PHX_1_0__SWOCACHEGROUP_CACHE_LOCK"  
  72. Unloading "DBA"."D1_PHX_1_0__CUSTDOCCACHEGROUP_CACHE_LOCK"  
  73. Unloading "DBA"."D1_PHX_1_0__MMGCACHEGROUP_CACHE_LOCK"  
  74. Creating indexes  
  75. Creating indexes for (1/224) "DBA"."ml_user"  
  76. Creating indexes for (2/224) "DBA"."ml_database"  
  77. Creating indexes for (3/224) "DBA"."ml_subscription"  
  78. Creating indexes for (4/224) "DBA"."ml_table"  
  79. Creating indexes for (5/224) "DBA"."ml_script"  
  80. Creating indexes for (6/224) "DBA"."ml_script_version"  
  81. Creating indexes for (7/224) "DBA"."ml_connection_script"  
  82. Creating indexes for (8/224) "DBA"."ml_table_script"  
  83. Creating indexes for (9/224) "DBA"."ml_property"  
  84. Creating indexes for (10/224) "DBA"."ml_scripts_modified"  
  85. Creating indexes for (11/224) "DBA"."ml_column"  
  86. Creating indexes for (12/224) "DBA"."ml_primary_server"  
  87. Creating indexes for (13/224) "DBA"."ml_passthrough_script"  
  88. Creating indexes for (14/224) "DBA"."ml_passthrough"  
  89. Creating indexes for (15/224) "DBA"."ml_passthrough_status"  
  90. Creating indexes for (16/224) "DBA"."ml_passthrough_repair"  
  91. Creating indexes for (17/224) "DBA"."ml_device"  
  92. Creating indexes for (18/224) "DBA"."ml_device_address"  
  93. Creating indexes for (19/224) "DBA"."ml_listening"  
  94. Creating indexes for (20/224) "DBA"."ml_sis_sync_state"  
  95. Creating indexes for (21/224) "DBA"."ml_qa_repository"  
  96. Creating indexes for (22/224) "DBA"."ml_qa_notifications"  
  97. Creating indexes for (23/224) "DBA"."ml_qa_delivery"  
  98. Creating indexes for (24/224) "DBA"."ml_qa_status_history"  
  99. Creating indexes for (25/224) "DBA"."ml_qa_clients"  
  100. Creating indexes for (26/224) "DBA"."ml_qa_repository_archive"  
  101. Creating indexes for (27/224) "DBA"."ml_qa_delivery_archive"  
  102. Creating indexes for (28/224) "DBA"."ml_qa_status_history_archive"  
  103. Creating indexes for (29/224) "DBA"."ml_qa_repository_props_archive"  
  104. Creating indexes for (30/224) "DBA"."ml_qa_global_props"  
  105. Creating indexes for (31/224) "DBA"."ml_qa_repository_props"  
  106. Creating indexes for (32/224) "DBA"."ml_qa_repository_staging"  
  107. Creating indexes for (33/224) "DBA"."ml_qa_status_staging"  
  108. Creating indexes for (34/224) "DBA"."ml_ra_agent"  
  109. Creating indexes for (35/224) "DBA"."ml_ra_task"  
  110. Creating indexes for (36/224) "DBA"."ml_ra_deployed_task"  
  111. Creating indexes for (37/224) "DBA"."ml_ra_task_command"  
  112. Creating indexes for (38/224) "DBA"."ml_ra_event"  
  113. Creating indexes for (39/224) "DBA"."ml_ra_event_staging"  
  114. Creating indexes for (40/224) "DBA"."ml_ra_notify"  
  115. Creating indexes for (41/224) "DBA"."ml_ra_task_property"  
  116. Creating indexes for (42/224) "DBA"."ml_ra_task_command_property"  
  117. Creating indexes for (43/224) "DBA"."ml_ra_managed_remote"  
  118. Creating indexes for (44/224) "DBA"."ml_ra_schema_name"  
  119. Creating indexes for (45/224) "DBA"."ml_ra_agent_property"  
  120. Creating indexes for (46/224) "DBA"."ml_ra_agent_staging"  
  121. Creating indexes for (47/224) "DBA"."mms_reg_users"  
  122. Creating indexes for (48/224) "DBA"."mms_devices_users_info"  
  123. Creating indexes for (49/224) "DBA"."mms_apps_users_info"  
  124. Creating indexes for (50/224) "DBA"."mms_domain_users_info"  
  125. Creating indexes for (51/224) "DBA"."mms_domain_devices_info"  
  126. Creating indexes for (52/224) "DBA"."mms_reg_users_lock"  
  127. Creating indexes for (53/224) "DBA"."mms_license_table_oper"  
  128. Creating indexes for (54/224) "DBA"."personalization_keys"  
  129. Creating indexes for (55/224) "DBA"."personalization_key_values"  
  130. Creating indexes for (56/224) "DBA"."mms_domain"  
  131. Creating indexes for (57/224) "DBA"."mms_administrators"  
  132. Creating indexes for (58/224) "DBA"."mms_domain_admin"  
  133. Creating indexes for (59/224) "DBA"."mms_domain_package"  
  134. Creating indexes for (60/224) "DBA"."mms_domain_security"  
  135. Creating indexes for (61/224) "DBA"."mms_licensed_device"  
  136. Creating indexes for (62/224) "DBA"."mms_application_info"  
  137. Creating indexes for (63/224) "DBA"."mms_application_package_info"  
  138. Creating indexes for (64/224) "DBA"."mms_application_domain_info"  
  139. Creating indexes for (65/224) "DBA"."mms_application_users_info"  
  140. Creating indexes for (66/224) "DBA"."mms_application_connection_info"  
  141. Creating indexes for (67/224) "DBA"."mms_metadata_container"  
  142. Creating indexes for (68/224) "DBA"."mms_assigned_widget_info"  
  143. Creating indexes for (69/224) "DBA"."mms_playback_history"  
  144. Creating indexes for (70/224) "DBA"."mms_domain_logging_configuration"  
  145. Creating indexes for (71/224) "DBA"."mms_domain_logging_filter"  
  146. Creating indexes for (72/224) "DBA"."sup_sis_subscription"  
  147. Creating indexes for (73/224) "DBA"."sup_sis_notification"  
  148. Creating indexes for (74/224) "DBA"."sup_sis_mbo_change_detection"  
  149. Creating indexes for (75/224) "DBA"."mms_rbs_subscription"  
  150. Creating indexes for (76/224) "DBA"."mms_upgrade_bookkeeping_info"  
  151. Creating indexes for (77/224) "DBA"."sup_ss"  
  152. Creating indexes for (78/224) "DBA"."#should_delete_sk"  
  153. Creating indexes for (79/224) "DBA"."#should_have_sk"  
  154. Creating indexes for (80/224) "DBA"."mms_lock"  
  155. Creating indexes for (81/224) "DBA"."sup_ps"  
  156. Creating indexes for (82/224) "DBA"."AMP_MODULES"  
  157. Creating indexes for (83/224) "DBA"."AMP_MODULE_VERSIONS"  
  158. Creating indexes for (84/224) "DBA"."AMP_CONTEXT_VARIABLES"  
  159. Creating indexes for (85/224) "DBA"."DEVICES"  
  160. Creating indexes for (86/224) "DBA"."AMP_DEVICE_MODULE_ASSIGNMENT"  
  161. Creating indexes for (87/224) "DBA"."AMP_ERRORS"  
  162. Creating indexes for (88/224) "DBA"."AMP_MATCH_RULES"  
  163. Creating indexes for (89/224) "DBA"."AMP_MODULE_DEPLOYMENT"  
  164. Creating indexes for (90/224) "DBA"."AMP_PROCESSED_IDS"  
  165. Creating indexes for (91/224) "DBA"."AMP_RESPONSE_QUEUE"  
  166. Creating indexes for (92/224) "DBA"."AMP_SERVER_PLUGINS"  
  167. Creating indexes for (93/224) "DBA"."AMP_TRANSFORM_QUEUE"  
  168. Creating indexes for (94/224) "DBA"."USERS"  
  169. Creating indexes for (95/224) "DBA"."USER_DEVICE"  
  170. Creating indexes for (96/224) "DBA"."DEVICE_CONNECTIONS"  
  171. Creating indexes for (97/224) "DBA"."AWAITING_CLIENTS"  
  172. Creating indexes for (98/224) "DBA"."CFG_TEMPLATES"  
  173. Creating indexes for (99/224) "DBA"."CFG_IDS"  
  174. Creating indexes for (100/224) "DBA"."CFG_PROP_VALIDATION"  
  175. Creating indexes for (101/224) "DBA"."CFG_PROP_DEFS"  
  176. Creating indexes for (102/224) "DBA"."CFG_PROP_VALUES"  
  177. Creating indexes for (103/224) "DBA"."CFG_SUBFOLDER_PROP_VALUES"  
  178. Creating indexes for (104/224) "DBA"."CFG_SYS_PROP_VALUES"  
  179. Creating indexes for (105/224) "DBA"."CFG_TRACE"  
  180. Creating indexes for (106/224) "DBA"."CFG_TRACE_VERSION"  
  181. Creating indexes for (107/224) "DBA"."EXCH_MAILBOX_INFO"  
  182. Creating indexes for (108/224) "DBA"."EXCH_FOLDER_INFO"  
  183. Creating indexes for (109/224) "DBA"."EXCH_IMO_RECORD_WRITES"  
  184. Creating indexes for (110/224) "DBA"."EXCH_RECORD_QUEUE"  
  185. Creating indexes for (111/224) "DBA"."FT_CAB_VERSIONS"  
  186. Creating indexes for (112/224) "DBA"."IMAP_IDS"  
  187. Creating indexes for (113/224) "DBA"."IMP_CONFIG"  
  188. Creating indexes for (114/224) "DBA"."IMP_CONFIG_RULE"  
  189. Creating indexes for (115/224) "DBA"."IMP_PROCESSED_EMAILS"  
  190. Creating indexes for (116/224) "DBA"."INJECTION_OUTBOX"  
  191. Creating indexes for (117/224) "DBA"."IPHONE_PUSH_COUNT"  
  192. Creating indexes for (118/224) "DBA"."LB_NODES"  
  193. Creating indexes for (119/224) "DBA"."LOCK_USER_DEVICE"  
  194. Creating indexes for (120/224) "DBA"."MOMS_ROLE"  
  195. Creating indexes for (121/224) "DBA"."MOMS_DEVICE_ROLE"  
  196. Creating indexes for (122/224) "DBA"."MOMS_FUNCTIONAL_AREA"  
  197. Creating indexes for (123/224) "DBA"."MOMS_FUNCTIONAL_AREA_METHOD"  
  198. Creating indexes for (124/224) "DBA"."MOMS_ROLE_FUNCTIONAL_AREA"  
  199. Creating indexes for (125/224) "DBA"."QUEUED_MESSAGES"  
  200. Creating indexes for (126/224) "DBA"."MO_BINARY_STREAM"  
  201. Creating indexes for (127/224) "DBA"."MO_BINARY_STREAM_DATA"  
  202. Creating indexes for (128/224) "DBA"."MO_D2S_STREAM_DATA"  
  203. Creating indexes for (129/224) "DBA"."NL_USER_DS"  
  204. Creating indexes for (130/224) "DBA"."NOTES_LB_SYNC"  
  205. Creating indexes for (131/224) "DBA"."NOTIFICATION_BATCHING"  
  206. Creating indexes for (132/224) "DBA"."NOTIFICATION_QUEUE"  
  207. Creating indexes for (133/224) "DBA"."ONLINE_HISTORY"  
  208. Creating indexes for (134/224) "DBA"."POP_IDS"  
  209. Creating indexes for (135/224) "DBA"."PUBLISHED_CLIENTS"  
  210. Creating indexes for (136/224) "DBA"."STORED_RESPONSES"  
  211. Creating indexes for (137/224) "DBA"."SYNCHRONOUS_RESPONSES"  
  212. Creating indexes for (138/224) "DBA"."SYNC_ID_MAP"  
  213. Creating indexes for (139/224) "DBA"."SYNC_REPEAT_INFO"  
  214. Creating indexes for (140/224) "DBA"."SYNC_REPEAT_INSTANCE"  
  215. Creating indexes for (141/224) "DBA"."SYNC_REQUESTS"  
  216. Creating indexes for (142/224) "DBA"."TEST_DBLAYER"  
  217. Creating indexes for (143/224) "DBA"."TM_RESPONSE_CONTINUATION"  
  218. Creating indexes for (144/224) "DBA"."UPG_CURRENT_DB_VERSION"  
  219. Creating indexes for (145/224) "DBA"."USER_DEVICE_STATUS"  
  220. Creating indexes for (146/224) "DBA"."AMP_TEMPLATE_MODULE"  
  221. Creating indexes for (147/224) "DBA"."AMP_METADATA"  
  222. Creating indexes for (148/224) "DBA"."jms_qt"  
  223. Creating indexes for (149/224) "DBA"."jms_pm"  
  224. Creating indexes for (150/224) "DBA"."jms_dd"  
  225. Creating indexes for (151/224) "DBA"."sup_pdcn"  
  226. Creating indexes for (152/224) "DBA"."#should_have_parent_sk"  
  227. Creating indexes for (153/224) "DBA"."sup_requestor"  
  228. Creating indexes for (154/224) "DBA"."d1_phx_1_0_asoheader_sk"  
  229. Creating indexes for (155/224) "DBA"."d1_phx_1_0_asoorderedpa_16449_sk"  
  230. Creating indexes for (156/224) "DBA"."d1_phx_1_0_asopartner_sk"  
  231. Creating indexes for (157/224) "DBA"."d1_phx_1_0_asoshippedpa_47173_sk"  
  232. Creating indexes for (158/224) "DBA"."d1_phx_1_0_asoshippedse_49199_sk"  
  233. Creating indexes for (159/224) "DBA"."d1_phx_1_0_businesspart_60140_sk"  
  234. Creating indexes for (160/224) "DBA"."d1_phx_1_0_contactperso_94681_sk"  
  235. Creating indexes for (161/224) "DBA"."d1_phx_1_0_customerfaci_60060_sk"  
  236. Creating indexes for (162/224) "DBA"."d1_phx_1_0_equipmentmas_48276_sk"  
  237. Creating indexes for (163/224) "DBA"."d1_phx_1_0_fse_sk"  
  238. Creating indexes for (164/224) "DBA"."d1_phx_1_0_fseassignmen_99497_sk"  
  239. Creating indexes for (165/224) "DBA"."d1_phx_1_0_historyorder_64376_sk"  
  240. Creating indexes for (166/224) "DBA"."d1_phx_1_0_historyswohe_23872_sk"  
  241. Creating indexes for (167/224) "DBA"."d1_phx_1_0_historyswoop_44172_sk"  
  242. Creating indexes for (168/224) "DBA"."d1_phx_1_0_historyusedp_83880_sk"  
  243. Creating indexes for (169/224) "DBA"."d1_phx_1_0_materialmast_53065_sk"  
  244. Creating indexes for (170/224) "DBA"."d1_phx_1_0_materialmast_65981_sk"  
  245. Creating indexes for (171/224) "DBA"."d1_phx_1_0_notification_53622_sk"  
  246. Creating indexes for (172/224) "DBA"."d1_phx_1_0_notification_96212_sk"  
  247. Creating indexes for (173/224) "DBA"."d1_phx_1_0_partsmovemen_19757_sk"  
  248. Creating indexes for (174/224) "DBA"."d1_phx_1_0_swocomponent_sk"  
  249. Creating indexes for (175/224) "DBA"."d1_phx_1_0_swooperation_sk"  
  250. Creating indexes for (176/224) "DBA"."d1_phx_1_0_timeconfirma_83198_sk"  
  251. Creating indexes for (177/224) "DBA"."d1_phx_1_0_swoheader_sk"  
  252. Creating indexes for (178/224) "DBA"."d1_phx_1_0_keygenerator"  
  253. Creating indexes for (179/224) "DBA"."d1_phx_1_0_packagebigpr_33993"  
  254. Creating indexes for (180/224) "DBA"."d1_phx_1_0_packageprope_74499"  
  255. Creating indexes for (181/224) "DBA"."d1_phx_1_0_operationrep_99182"  
  256. Creating indexes for (182/224) "DBA"."d1_phx_1_0_logrecordimp_21191"  
  257. Creating indexes for (183/224) "DBA"."d1_phx_1_0_fse_pull_pq"  
  258. Creating indexes for (184/224) "DBA"."d1_phx_1_0_fse"  
  259. Creating indexes for (185/224) "DBA"."d1_phx_1_0_customerfaci_60060"  
  260. Creating indexes for (186/224) "DBA"."d1_phx_1_0_materialmast_04961"  
  261. Creating indexes for (187/224) "DBA"."d1_phx_1_0_materialmast_61933"  
  262. Creating indexes for (188/224) "DBA"."d1_phx_1_0_materialmast_65981"  
  263. Creating indexes for (189/224) "DBA"."d1_phx_1_0_materialmast_53065"  
  264. Creating indexes for (190/224) "DBA"."d1_phx_1_0_fseassignmen_38789"  
  265. Creating indexes for (191/224) "DBA"."d1_phx_1_0_changelogimp_38232"  
  266. Creating indexes for (192/224) "DBA"."d1_phx_1_0_businesspart_60140"  
  267. Creating indexes for (193/224) "DBA"."d1_phx_1_0_contactperso_94681"  
  268. Creating indexes for (194/224) "DBA"."d1_phx_1_0_fseassignmen_99497"  
  269. Creating indexes for (195/224) "DBA"."d1_phx_1_0_swoheader"  
  270. Creating indexes for (196/224) "DBA"."d1_phx_1_0_swocomponent"  
  271. Creating indexes for (197/224) "DBA"."d1_phx_1_0_swooperation"  
  272. Creating indexes for (198/224) "DBA"."d1_phx_1_0_partsmovemen_19757"  
  273. Creating indexes for (199/224) "DBA"."d1_phx_1_0_notification_96212"  
  274. Creating indexes for (200/224) "DBA"."d1_phx_1_0_notification_53622"  
  275. Creating indexes for (201/224) "DBA"."d1_phx_1_0_equipmentmas_48276"  
  276. Creating indexes for (202/224) "DBA"."d1_phx_1_0_historyswohe_23872"  
  277. Creating indexes for (203/224) "DBA"."d1_phx_1_0_historyusedp_83880"  
  278. Creating indexes for (204/224) "DBA"."d1_phx_1_0_historyswoop_44172"  
  279. Creating indexes for (205/224) "DBA"."d1_phx_1_0_historyorder_64376"  
  280. Creating indexes for (206/224) "DBA"."d1_phx_1_0_asoheader"  
  281. Creating indexes for (207/224) "DBA"."d1_phx_1_0_asoorderedpa_16449"  
  282. Creating indexes for (208/224) "DBA"."d1_phx_1_0_timeconfirma_83198"  
  283. Creating indexes for (209/224) "DBA"."d1_phx_1_0_asopartner"  
  284. Creating indexes for (210/224) "DBA"."d1_phx_1_0_asoshippedpa_47173"  
  285. Creating indexes for (211/224) "DBA"."d1_phx_1_0_asoshippedse_49199"  
  286. Creating indexes for (212/224) "DBA"."D1_PHX_1_0__GRAPH_EXPIRATION"  
  287. Creating indexes for (213/224) "DBA"."D1_PHX_1_0__GRAPH"  
  288. Creating indexes for (214/224) "DBA"."D1_PHX_1_0__GRAPH_LOCK"  
  289. Creating indexes for (215/224) "DBA"."D1_PHX_1_0__GRAPH_SK"  
  290. Creating indexes for (216/224) "DBA"."D1_PHX_1_0__CACHE_POLICY"  
  291. Creating indexes for (217/224) "DBA"."D1_PHX_1_0__CACHE_UPDATE"  
  292. Creating indexes for (218/224) "DBA"."D1_PHX_1_0__CACHE_STATE"  
  293. Creating indexes for (219/224) "DBA"."D1_PHX_1_0__PARTITION_REFRESH"  
  294. Creating indexes for (220/224) "DBA"."D1_PHX_1_0__PARTITION_LOCK"  
  295. Creating indexes for (221/224) "DBA"."D1_PHX_1_0__PARTITION"  
  296. Creating indexes for (222/224) "DBA"."D1_PHX_1_0__SWOCACHEGROUP_CACHE_LOCK"  
  297. Creating indexes for (223/224) "DBA"."D1_PHX_1_0__CUSTDOCCACHEGROUP_CACHE_LOCK"  
  298. Creating indexes for (224/224) "DBA"."D1_PHX_1_0__MMGCACHEGROUP_CACHE_LOCK"  



2. 重新指定log位置,(因为原来的log就在 d:\DbTxLogs\default.log下边),而unload/reload操作只会把log文件放到db的当前目录下边
E:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64>dblog -t d:\DbTxLogs\default.log e:\default.db

SQL Anywhere Transaction Log Utility Version 12.0.1.3769
"e:\default.db" was using log file "default.log"
"e:\default.db" is using no log mirror file
"e:\default.db" is now using log file "d:\DbTxLogs\default.log"
Transaction log starting offset is 0000548524
Transaction log current relative offset is 0002443703

3. copy default.db and default.log to the original location.恢复到原来位置

4. 看看对应的文件的大小: 
E:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64>dir E:\Sybase\UnwiredPlatf

orm\Data\CDB\default.*
 Volume in drive E is Local Disk
 Volume Serial Number is FE06-8788

 Directory of E:\Sybase\UnwiredPlatform\Data\CDB

01/15/2013  11:10 PM        79,192,064 default.db (新生成的)
01/15/2013  11:02 PM     6,684,798,976 default.db.old (老的)

               2 File(s)  6,763,991,040 bytes
               0 Dir(s)  91,734,462,464 bytes free
               
E:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64>dir D:\DbTxLogs\default.*
 Volume in drive D is Local Disk
 Volume Serial Number is E2FD-6D0E

 Directory of D:\DbTxLogs

01/15/2013  11:10 PM         4,456,448 default.log (新生成的)
01/15/2013  11:02 PM   145,142,382,592 default.log.old (老的)

               2 File(s) 145,146,839,040 bytes
               0 Dir(s)       1,814,528 bytes free          

对于生产环境,除了定期备份,定期进行unload/reload也是很有意义的。ASA其实也可以用于中等规模的系统应用当中。操作非常方便。在移动应用中更是大显身手。
阅读(3016) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~