免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7004 | 回复: 12
打印 上一主题 下一主题

sybase15.0.3从windows x86到solaris跨平台恢复过程 [复制链接]

论坛徽章:
6
水瓶座
日期:2014-06-04 03:34:37水瓶座
日期:2014-06-17 13:20:31数据库技术版块每日发帖之星
日期:2016-07-09 06:20:00数据库技术版块每日发帖之星
日期:2016-07-17 06:20:00数据库技术版块每日发帖之星
日期:2016-08-01 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-12 15:53 |只看该作者 |倒序浏览
本帖最后由 andkylee 于 2010-04-12 16:01 编辑

来自:http://blog.csdn.net/andkylee/archive/2010/04/09/5468056.aspx

演示一次sybase ASE15.0.3跨平台备份恢复的过程。从windowsx86系统将数据库备份后恢复到solaris SPARC平台上面去。
源数据库版本为:
  1. 1> select @@version
  2. 2> go
  3. -----------------------------------------------------------------------------------------
  4. ------------------------------------------------------------------------------------------
  5. ----------------------------------------------------------------------------
  6. Adaptive Server Enterprise/15.0.3/EBF 16738 ESD#2/P/NT (IX86)/Windows 2003/ase1
  7.          503/2708/32-bit/OPT/Mon Jul 27 20:19:56 2009
复制代码
目的数据库版本为:
  1. 1> select @@version
  2. 2> go
  3. -----------------------------------------------------------------------------------------
  4. ------------------------------------------------------------------------------------------
  5. ----------------------------------------------------------------------------
  6. Adaptive Server Enterprise/15.0.3/EBF 16548 ESD#1/P/Sun_svr4/OS 5.8/ase1503/268
  7.          0/64-bit/FBO/Thu Mar  5 09:39:28 2009
复制代码
跨平台恢复的详细过程如下:

(1). 检查欲备份的数据库testdb的完整性,利用checkdb和checkalloc
  1. 1> dbcc traceon(3604)
  2. 2> go
  3. 1> dbcc checkdb(testdb)
  4. 2> go
  5. 1> dbcc checkalloc(testdb)
  6. 2> go
复制代码
(2). 将数据库testdb设置为单用户模式
  1. 1> use master
  2. 2> go
  3. 1> sp_dboption testdb,"single",true
  4. 2> go
复制代码
(3). 清空testdb的日志,并设置检查点
  1. 1> dump tran testdb with no_log
  2. 2> go
  3. 1> checkpoint
  4. 2> go
复制代码
(4). 将属于数据库testdb的脏页写到磁盘上面去,并发出检查点命令。 在发出sp_flushstats系统过程后要等待一段时间,保证数据库有足够的时间把页面信息刷新到磁盘上。
  1. 1> sp_flushstats
  2. 2> go
  3. 1> checkpoint
  4. 2> go
复制代码
(5). 备份数据库testdb
  1. 1> dump database testdb to "d:\testdb-20100409.dmp"
  2. 2> go
复制代码
(6). 利用ftp服务器将备份出来的testdb-20100409.dmp文件拷贝到solaris服务器上。

(7).用isql连接到目的数据库服务器上面,执行恢复命令
  1. 1> load database testdb from "/app/sybdata/testdb-20100409.dmp"
  2. 2> go
复制代码
(. 将目的数据库服务器中的testdb调整成在线。
  1. 1> online database testdb
  2. 2> go
复制代码
(9). 进入testdb,执行sp_post_xpload系统存储过程来重建用户表的索引。
  1. 1> use testdb
  2. 2> go  
  3. 1> sp_post_xpload
  4. 2> go  
复制代码
至此,跨平台备份恢复过程完成!

说明一下:跨平台恢复过程中在发出load database命令后,主要有五个过程:导入数据库页面、转化系统对象、转化用户对象、转化日志记录和后续的恢复日志记录分析等。
跨平台恢复比普通的数据库恢复多出来三个过程:转化系统对象、转化用户对象、转化日志记录。这三个过程中最慢的就是:转化日志记录。 我测试的环境是恢复一个总共400M备份出来350M多的备份文件,转化日志的过程持续了20多分钟。所以,一定要有耐心等下去。还好,这次比较幸运,最后算是恢复成功了。

以下为load database过程显示的所有的反馈信息。

论坛徽章:
6
水瓶座
日期:2014-06-04 03:34:37水瓶座
日期:2014-06-17 13:20:31数据库技术版块每日发帖之星
日期:2016-07-09 06:20:00数据库技术版块每日发帖之星
日期:2016-07-17 06:20:00数据库技术版块每日发帖之星
日期:2016-08-01 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
2 [报告]
发表于 2010-04-12 15:58 |只看该作者
  1. 1> sp_helpdb  testdb
  2. 2> go
  3. name   db_size       owner dbid created      status
  4. ------ ------------- ----- ---- ------------ -------------
  5. testdb     1300.0 MB sa       4 Apr 09, 2010 don't recover
  6. (1 row affected)
  7. device_fragments               size          usage
  8.          created                   free kbytes
  9. ------------------------------ ------------- --------------------
  10.          ------------------------- ----------------
  11. testdb_dat                         1000.0 MB data only
  12.          Apr  9 2010  7:05PM                1016720
  13. testdb_log                          300.0 MB log only
  14.          Apr  9 2010  7:05PM       not applicable
  15. Msg 921, Level 14, State 2:
  16. Server 'SYB_NFJD_TEST', Procedure 'sp_helpdb', Line 588:
  17. Database 'testdb' has not been recovered yet - please wait and try again.
  18. --------------------------------------------------------------
  19. log only free kbytes = 0
  20. (return status = 0)
  21. 1> load database testdb from "/app/sybdata/testdb-20100409.dmp"
  22. 2> go
  23. Backup Server session id is:  19.  Use this value when executing the
  24. 'sp_volchanged' system stored procedure after fulfilling any volume change
  25. request from the Backup Server.
  26. Backup Server: 6.28.1.1: Dumpfile name 'scourt5100990F2E6' section number 1
  27. mounted on disk file '/app/sybdata/testdb-20100409.dmp'
  28. Backup Server: 4.188.1.1: Database testdb: 23940 kilobytes (1%) LOADED.
  29. Backup Server: 4.188.1.1: Database testdb: 58630 kilobytes (4%) LOADED.
  30. Backup Server: 4.188.1.1: Database testdb: 93320 kilobytes (7%) LOADED.
  31. Backup Server: 4.188.1.1: Database testdb: 127118 kilobytes (9%) LOADED.
  32. Backup Server: 4.188.1.1: Database testdb: 151180 kilobytes (11%) LOADED.
  33. Backup Server: 4.188.1.1: Database testdb: 172814 kilobytes (12%) LOADED.
  34. Backup Server: 4.188.1.1: Database testdb: 194448 kilobytes (14%) LOADED.
  35. Backup Server: 4.188.1.1: Database testdb: 216082 kilobytes (16%) LOADED.
  36. Backup Server: 4.188.1.1: Database testdb: 237716 kilobytes (17%) LOADED.
  37. Backup Server: 4.188.1.1: Database testdb: 259350 kilobytes (19%) LOADED.
  38. Backup Server: 4.188.1.1: Database testdb: 280984 kilobytes (21%) LOADED.
  39. Backup Server: 4.188.1.1: Database testdb: 302618 kilobytes (22%) LOADED.
  40. Backup Server: 4.188.1.1: Database testdb: 324252 kilobytes (24%) LOADED.
  41. Backup Server: 4.188.1.1: Database testdb: 345886 kilobytes (25%) LOADED.
  42. Backup Server: 4.188.1.1: Database testdb: 367520 kilobytes (27%) LOADED.
  43. Backup Server: 4.188.1.1: Database testdb: 389154 kilobytes (29%) LOADED.
  44. Backup Server: 4.188.1.1: Database testdb: 409636 kilobytes (30%) LOADED.
  45. Backup Server: 4.188.1.1: Database testdb: 409646 kilobytes (100%) LOADED.
  46. Backup Server: 3.42.1.1: LOAD is complete (database testdb).
  47. Started cross-platform conversion for database testdb.
  48. Started cross-platform conversion for system objects.
  49. Cross-platform conversion for database testdb: 672 pages completed.
  50. Completed cross-platform conversion for system objects.
  51. Started cross-platform conversion for user objects.
  52. Cross-platform conversion for database testdb: 10073 pages completed.
  53. Cross-platform conversion for database testdb: 20273 pages completed.
  54. Cross-platform conversion for database testdb: 30458 pages completed.
  55. Cross-platform conversion for database testdb: 40604 pages completed.
  56. Cross-platform conversion for database testdb: 50796 pages completed.
  57. Cross-platform conversion for database testdb: 60924 pages completed.
  58. Cross-platform conversion for database testdb: 71117 pages completed.
  59. Cross-platform conversion for database testdb: 81317 pages completed.
  60. Cross-platform conversion for database testdb: 91517 pages completed.
  61. Cross-platform conversion for database testdb: 101717 pages completed.
  62. Completed cross-platform conversion for user objects.
  63. Started cross-platform conversion for log records.
  64. Cross-platform conversion for database testdb: 11119 pages completed.
  65. Completed cross-platform conversion for log records.
  66. Completed cross-platform conversion for database testdb.
  67. Caution:  You have set up this database to include space on disk 5 for both data
  68. and the transaction log.  This can make recovery impossible if that disk fails.
  69. All dumped pages have been loaded. ASE is now clearing pages above page 102400,
  70. which were not present in the database just loaded.
  71. ASE has finished clearing database pages.
  72. Started estimating recovery log boundaries for database 'testdb'.
  73. Database 'testdb', checkpoint=(79128, 0), first=(79128, 0), last=(79128, 0).
  74. Completed estimating recovery log boundaries for database 'testdb'.
  75. Started ANALYSIS pass for database 'testdb'.
  76. Completed ANALYSIS pass for database 'testdb'.
  77. Started REDO pass for database 'testdb'. The total number of log records to
  78. process is 1.
  79. Completed REDO pass for database 'testdb'.
  80. Use the ONLINE DATABASE command to bring this database online; ASE will not
  81. bring it online automatically.
  82. 1> online database testdb
  83. 2> go
  84. Started estimating recovery log boundaries for database 'testdb'.
  85. Database 'testdb', checkpoint=(79128, 0), first=(79128, 0), last=(79128, 0).
  86. Completed estimating recovery log boundaries for database 'testdb'.
  87. Started ANALYSIS pass for database 'testdb'.
  88. Completed ANALYSIS pass for database 'testdb'.
  89. Recovery of database 'testdb' will undo incomplete nested top actions.
  90. Checking table 'sysstatistics' (object ID 24): Logical page size is 4096 bytes.
  91. Checking partition 'sysstatistics_24' (partition ID 24) of table
  92. 'sysstatistics'. The logical page size of this table is 4096 bytes.
  93. The indexes for 'sysstatistics' are already correct.  They will not be rebuilt.
  94. (1 row affected)
  95. (1 row affected)
  96. (485 rows affected)
  97. (1 row affected)
  98. (57 rows affected)
  99. (1 row affected)
  100. (16 rows affected)
  101. (1 row affected)
  102. (3 rows affected)
  103. (1 row affected)
  104. (0 rows affected)
  105. (915 rows affected)
  106. Checking table 'sysobjects' (object ID 1): Logical page size is 4096 bytes.
  107. Checking partition 'sysobjects_1' (partition ID 1) of table 'sysobjects'. The
  108. logical page size of this table is 4096 bytes.
  109. The indexes for 'sysobjects' are already correct.  They will not be rebuilt.
  110. Checking table 'sysindexes' (object ID 2): Logical page size is 4096 bytes.
  111. Checking partition 'sysindexes_2' (partition ID 2) of table 'sysindexes'. The
  112. logical page size of this table is 4096 bytes.
  113. The indexes for 'sysindexes' are already correct.  They will not be rebuilt.
  114. Checking table 'syscolumns' (object ID 3): Logical page size is 4096 bytes.
  115. Checking partition 'syscolumns_3' (partition ID 3) of table 'syscolumns'. The
  116. logical page size of this table is 4096 bytes.
  117. The indexes for 'syscolumns' are already correct.  They will not be rebuilt.
  118. Checking table 'systypes' (object ID 4): Logical page size is 4096 bytes.
  119. Checking partition 'systypes_4' (partition ID 4) of table 'systypes'. The
  120. logical page size of this table is 4096 bytes.
  121. The indexes for 'systypes' are already correct.  They will not be rebuilt.
  122. Checking table 'sysprocedures' (object ID 5): Logical page size is 4096 bytes.
  123. Checking partition 'sysprocedures_5' (partition ID 5) of table 'sysprocedures'.
  124. The logical page size of this table is 4096 bytes.
  125. The indexes for 'sysprocedures' are already correct.  They will not be rebuilt.
  126. Checking table 'syscomments' (object ID 6): Logical page size is 4096 bytes.
  127. Checking partition 'syscomments_6' (partition ID 6) of table 'syscomments'. The
  128. logical page size of this table is 4096 bytes.
  129. The indexes for 'syscomments' are already correct.  They will not be rebuilt.
  130. Checking table 'syssegments' (object ID 7): Logical page size is 4096 bytes.
  131. Checking partition 'syssegments_7' (partition ID 7) of table 'syssegments'. The
  132. logical page size of this table is 4096 bytes.
  133. The table 'syssegments' has no indexes.
  134. Checking table 'syslogs' (object ID 8): Logical page size is 4096 bytes.
  135. Checking partition 'syslogs_8' (partition ID 8) of table 'syslogs'. The logical
  136. page size of this table is 4096 bytes.
  137. *** NOTICE: Space used on the log segment is 101 pages (0.39 MB), 0.39%.
  138. *** NOTICE: Space reserved on the log segment is 0 pages (0.00 MB), 0.00%.
  139. *** NOTICE: Space free on the log segment is 25499 pages (99.61 MB), 99.61%.
  140. The table 'syslogs' has no indexes.
  141. Checking table 'sysprotects' (object ID 9): Logical page size is 4096 bytes.
  142. Checking partition 'sysprotects_9' (partition ID 9) of table 'sysprotects'. The
  143. logical page size of this table is 4096 bytes.
  144. The indexes for 'sysprotects' are already correct.  They will not be rebuilt.
  145. Checking table 'sysusers' (object ID 10): Logical page size is 4096 bytes.
  146. Checking partition 'sysusers_10' (partition ID 10) of table 'sysusers'. The
  147. logical page size of this table is 4096 bytes.
  148. The indexes for 'sysusers' are already correct.  They will not be rebuilt.
  149. Checking table 'sysalternates' (object ID 11): Logical page size is 4096 bytes.
  150. Checking partition 'sysalternates_11' (partition ID 11) of table
  151. 'sysalternates'. The logical page size of this table is 4096 bytes.
  152. The indexes for 'sysalternates' are already correct.  They will not be rebuilt.
  153. Checking table 'sysdepends' (object ID 12): Logical page size is 4096 bytes.
  154. Checking partition 'sysdepends_12' (partition ID 12) of table 'sysdepends'. The
  155. logical page size of this table is 4096 bytes.
  156. The indexes for 'sysdepends' are already correct.  They will not be rebuilt.
  157. Checking table 'syskeys' (object ID 13): Logical page size is 4096 bytes.
  158. Checking partition 'syskeys_13' (partition ID 13) of table 'syskeys'. The
  159. logical page size of this table is 4096 bytes.
  160. The indexes for 'syskeys' are already correct.  They will not be rebuilt.
  161. Checking table 'sysgams' (object ID 14): Logical page size is 4096 bytes.
  162. The total number of data pages in this table is 8.
  163. The indexes for 'sysgams' are already correct.  They will not be rebuilt.
  164. Checking table 'sysusermessages' (object ID 15): Logical page size is 4096
  165. bytes.
  166. Checking partition 'csysusermessages_15' (partition ID 15) of table
  167. 'sysusermessages'. The logical page size of this table is 4096 bytes.
  168. The indexes for 'sysusermessages' are already correct.  They will not be
  169. rebuilt.
  170. Checking table 'sysreferences' (object ID 16): Logical page size is 4096 bytes.
  171. Checking partition 'sysreferences_16' (partition ID 16) of table
  172. 'sysreferences'. The logical page size of this table is 4096 bytes.
  173. The indexes for 'sysreferences' are already correct.  They will not be rebuilt.
  174. Checking table 'sysconstraints' (object ID 17): Logical page size is 4096
  175. bytes.
  176. Checking partition 'sysconstraints_17' (partition ID 17) of table
  177. 'sysconstraints'. The logical page size of this table is 4096 bytes.
  178. The indexes for 'sysconstraints' are already correct.  They will not be
  179. rebuilt.
  180. Checking table 'systhresholds' (object ID 18): Logical page size is 4096 bytes.
  181. Checking partition 'systhresholds_18' (partition ID 18) of table
  182. 'systhresholds'. The logical page size of this table is 4096 bytes.
  183. The table 'systhresholds' has no indexes.
  184. Checking table 'sysroles' (object ID 19): Logical page size is 4096 bytes.
  185. Checking partition 'sysroles_19' (partition ID 19) of table 'sysroles'. The
  186. logical page size of this table is 4096 bytes.
  187. The indexes for 'sysroles' are already correct.  They will not be rebuilt.
  188. Checking table 'sysattributes' (object ID 21): Logical page size is 4096 bytes.
  189. Checking partition 'sysattributes_21' (partition ID 21) of table
  190. 'sysattributes'. The logical page size of this table is 4096 bytes.
  191. The indexes for 'sysattributes' are already correct.  They will not be rebuilt.
  192. Checking table 'sysslices' (object ID 22): Logical page size is 4096 bytes.
  193. Checking partition 'csysslices_22' (partition ID 22) of table 'sysslices'. The
  194. logical page size of this table is 4096 bytes.
  195. The indexes for 'sysslices' are already correct.  They will not be rebuilt.
  196. Checking table 'systabstats' (object ID 23): Logical page size is 4096 bytes.
  197. Checking partition 'systabstats_23' (partition ID 23) of table 'systabstats'.
  198. The logical page size of this table is 4096 bytes.
  199. The indexes for 'systabstats' are already correct.  They will not be rebuilt.
  200. Checking table 'sysstatistics' (object ID 24): Logical page size is 4096 bytes.
  201. Checking partition 'sysstatistics_24' (partition ID 24) of table
  202. 'sysstatistics'. The logical page size of this table is 4096 bytes.
  203. The indexes for 'sysstatistics' are already correct.  They will not be rebuilt.
  204. Checking table 'sysxtypes' (object ID 25): Logical page size is 4096 bytes.
  205. Checking partition 'sysxtypes_25' (partition ID 25) of table 'sysxtypes'. The
  206. logical page size of this table is 4096 bytes.
  207. The indexes for 'sysxtypes' are already correct.  They will not be rebuilt.
  208. Checking table 'sysjars' (object ID 26): Logical page size is 4096 bytes.
  209. Checking partition 'sysjars_26' (partition ID 26) of table 'sysjars'. The
  210. logical page size of this table is 4096 bytes.
  211. The indexes for 'sysjars' are already correct.  They will not be rebuilt.
  212. Checking table 'sysqueryplans' (object ID 27): Logical page size is 4096 bytes.
  213. Checking partition 'sysqueryplans_27' (partition ID 27) of table
  214. 'sysqueryplans'. The logical page size of this table is 4096 bytes.
  215. The indexes for 'sysqueryplans' are already correct.  They will not be rebuilt.
  216. Checking table 'syspartitions' (object ID 28): Logical page size is 4096 bytes.
  217. Checking partition 'syspartitions_28' (partition ID 28) of table
  218. 'syspartitions'. The logical page size of this table is 4096 bytes.
  219. The indexes for 'syspartitions' are already correct.  They will not be rebuilt.
  220. Checking table 'syspartitionkeys' (object ID 29): Logical page size is 4096
  221. bytes.
复制代码

论坛徽章:
6
水瓶座
日期:2014-06-04 03:34:37水瓶座
日期:2014-06-17 13:20:31数据库技术版块每日发帖之星
日期:2016-07-09 06:20:00数据库技术版块每日发帖之星
日期:2016-07-17 06:20:00数据库技术版块每日发帖之星
日期:2016-08-01 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
3 [报告]
发表于 2010-04-12 15:59 |只看该作者

  1. Checking partition 'syspartitionkeys_29' (partition ID 29) of table
  2. 'syspartitionkeys'. The logical page size of this table is 4096 bytes.
  3. The indexes for 'syspartitionkeys' are already correct.  They will not be
  4. rebuilt.
  5. Checking table 'sysencryptkeys' (object ID 98): Logical page size is 4096
  6. bytes.
  7. Checking partition 'sysencryptkeys_98' (partition ID 98) of table
  8. 'sysencryptkeys'. The logical page size of this table is 4096 bytes.
  9. Msg 9989, Level 16, State 1:
  10. Server 'SYB_NFJD_TEST', Line 1:
  11. The number of deleted rows (65535) in the page header of DOL datapage 633,
  12. partition ID 98 is incorrect. This value cannot be negative.
  13. One or more indexes are corrupt.  They will be rebuilt.
  14. There are 0.000000 rows in 1 pages for object 'sysencryptkeys'.
  15. Clustered index 'csysencryptkeys' (ID = 2) successfully restored for object
  16. 'sysencryptkeys' in 'testdb' database.
  17. (50 rows affected)
  18. (0 rows affected)
  19. (0 rows affected)
  20. WARNING: One or more indexes on user tables may have been marked as 'suspect'
  21. making these indexes unusable. Use the sp_post_xpload stored procedure to check
  22. and rebuild these indexes.
  23. Database 'testdb' is now online.
  24. 1> use testdb
  25. 2> go
  26. 1> sp_indsuspect
  27. 2> go
  28. Suspect indexes in database testdb:
  29. Own.Tab.Ind (Obj_ID, Ind_ID)
  30. -----------------------------------------------------------------------------------------
  31. ------------------------------------------------------------------------------------------
  32. ------------------------------------------------------------------------------------------
  33. ------------------------------------------------------------------------------------------
  34. ------------------------------------------------------------------------------------------
  35. ---------------------------------------------------------------
  36. testuser.S_OFFICE.S_OFFICE_IND1_x (395145422, 2)
  37. dbo.office.unique_indx_officeid (439669583, 2)
  38. testuser.S_USER.S_USER_IND1_x (699146505, 2)
  39. testuser.S_USER.S_USER_IND2_x (699146505, 3)
  40. dbo.devices.abc (704002508, 2)
  41. dbo.databases.abc (736002622, 2)
  42. dbo.usages.abcd (768002736, 2)
  43. testuser.LAN_PAGENO_RANGE.aaaaa (788194827, 2)
  44. dbo.pbcattbl.pbcattbl_idx (800002850, 2)
  45. dbo.pbcatcol.pbcatcol_idx (848003021, 2)
  46. dbo.pbcatfmt.pbcatfmt_idx (896003192, 2)
  47. testuser.LAN_SYS_syscolumns.LAN_SYS_syscolumns (1012195625, 2)
  48. testuser.WF_EFORM.PK_WF_EFORM_x (1019147645, 2)
  49. testuser.LAN_SYS_sysobjects.LAN_SYS_sysobjects (1060195796, 2)
  50. testuser.ARCHIVES.PK_ARCHIVES_x (1084527866, 2)

  51. /**************************************************

  52. 省略一部分表的索引............
  53. **************************************************/

  54. testuser.LAN_SYS_sysindexes.LAN_SYS_sysindexes (1108195967, 2)
  55. dbo.PartitionTestTable.idx_PartitionTestTable_id (1223672376, 2)
  56. dbo.PartitionTestTable.idx_PartitionTestTable_name (1223672376, 3)
  57. dbo.test3.idx_test3_id (1351672832, 2)
  58. dbo.test4.idx_test4_id (1399673003, 2)
  59. testuser.LAN_sysdevices.namesss (1828198532, 2)
  60. testuser.LAN_sysusages.pk_lan_sysusages (1892198760, 2)
  61. testuser.LAN_sysdatabases.pk_lan_sysdatabases (1940198931, 2)
  62. dbo.lzftest.idx_lzftest_id (1975675055, 2)
  63. testuser.Usertype_relation.Idx_Usertype_relation (2020199216, 2)
  64. Msg 17870, Level 16, State 1:
  65. Server 'SYB_NFJD_TEST', Procedure 'sp_autoformat', Line 267:
  66. Table '#temp1' does not exist in database 'tempdb'.
  67. (return status = 0)
  68. 1>
  69. 2> sp_post_xpload
  70. 3> go
  71. sp_post_xpload: Processing table AIX_PAGENOS (1/419)
  72. sp_post_xpload: Processing table AIX_PAGENO_RANGE (2/419)
  73. sp_post_xpload: Processing table AIX_SYS_syscolumns (3/419)
  74. sp_post_xpload: Processing table AIX_SYS_sysindexes (4/419)
  75. sp_post_xpload: Processing table AIX_SYS_sysobjects (5/419)
  76. sp_post_xpload: Processing table AJDACG (6/419)
  77. sp_post_xpload: Processing table AJDAJY (7/419)
  78. sp_post_xpload: Processing table AJGDB (8/419)
  79. Checking table 'AJGDB' (object ID 796526840): Logical page size is 4096 bytes.
  80. Checking partition 'AJGDB_796526840' (partition ID 796526840) of table 'AJGDB'.
  81. The logical page size of this table is 4096 bytes.
  82. One or more indexes are corrupt.  They will be rebuilt.
  83. There are 127204.000000 rows in 10481 pages for object 'AJGDB'.
  84. Non-clustered index 'PK_AJGDB_x' (ID = 2) successfully restored for object
  85. 'AJGDB' in 'testdb' database.
  86. There are 127204.000000 rows in 10481 pages for object 'AJGDB'.
  87. Non-clustered index 'INDX_AJGDB_SN_x' (ID = 3) successfully restored for object
  88. 'AJGDB' in 'testdb' database.
  89. There are 127204.000000 rows in 10481 pages for object 'AJGDB'.
  90. Non-clustered index 'PK_AJGDB_SN_x' (ID = 4) successfully restored for object
  91. 'AJGDB' in 'testdb' database.
  92. sp_post_xpload: Processing table ARCHIVES (15/419)
  93. Checking table 'ARCHIVES' (object ID 1084527866): Logical page size is 4096
  94. bytes.
  95. Checking partition 'ARCHIVES_1084527866' (partition ID 1084527866) of table
  96. 'ARCHIVES'. The logical page size of this table is 4096 bytes.
  97. The indexes for 'ARCHIVES' are already correct.  They will not be rebuilt.

  98. sp_post_xpload: Processing table CASES_SXGG (118/419)
  99. sp_post_xpload: Processing table CASES_TB (119/419)
  100. sp_post_xpload: Processing table CASES_TJGL (120/419)
  101. sp_post_xpload: Processing table CASES_WS (121/419)
  102. sp_post_xpload: Processing table CASES_XS1 (122/419)
  103. sp_post_xpload: Processing table CASES_XS2 (123/419)
  104. sp_post_xpload: Processing table CASES_XSBHR (124/419)
  105. sp_post_xpload: Processing table CASES_XSFDMSSSZX (125/419)
  106. sp_post_xpload: Processing table CASES_XZ1 (126/419)
  107. sp_post_xpload: Processing table CASES_XZBG (127/419)
  108. sp_post_xpload: Processing table CASES_YS (128/419)
  109. sp_post_xpload: Processing table CASES_ZBGZB (129/419)
  110. sp_post_xpload: Processing table CASES_ZHENGR (130/419)
  111. sp_post_xpload: Processing table CASES_ZHESJG (131/419)
  112. sp_post_xpload: Processing table CASES_ZHESJGYJ (132/419)
  113. sp_post_xpload: Processing table CASES_ZJ (133/419)
  114. sp_post_xpload: Processing table CASES_ZJLT (134/419)
  115. sp_post_xpload: Processing table CASES_ZX1 (135/419)
  116. Checking table 'DATACODE' (object ID 1189576245): Logical page size is 4096
  117. bytes.
  118. Checking partition 'DATACODE_1189576245' (partition ID 1189576245) of table
  119. 'DATACODE'. The logical page size of this table is 4096 bytes.
  120. The indexes for 'DATACODE' are already correct.  They will not be rebuilt.
  121. sp_post_xpload: Processing table DB_10 (146/419)
  122. sp_post_xpload: Processing table DB_11 (147/419)
  123. sp_post_xpload: Processing table DB_5 (148/419)
  124. sp_post_xpload: Processing table DB_6 (149/419)
  125. sp_post_xpload: Processing table DB_7 (150/419)
  126. sp_post_xpload: Processing table DB_8 (151/419)
  127. sp_post_xpload: Processing table DB_9 (152/419)
  128. sp_post_xpload: Processing table DGKJZMX (153/419)
  129. sp_post_xpload: Processing table DSR (154/419)
  130. .........................
  131. sp_post_xpload: Processing table LAN_PAGENOS (243/419)
  132. sp_post_xpload: Processing table LAN_PAGENOS_DB10 (244/419)
  133. sp_post_xpload: Processing table LAN_PAGENOS_DB11 (245/419)
  134. sp_post_xpload: Processing table LAN_PAGENOS_DB5 (246/419)
  135. sp_post_xpload: Processing table LAN_PAGENOS_DB6 (247/419)
  136. sp_post_xpload: Processing table LAN_PAGENOS_DB7 (248/419)
  137. sp_post_xpload: Processing table LAN_PAGENOS_DB8 (249/419)
  138. sp_post_xpload: Processing table LAN_PAGENOS_DB9 (250/419)
  139. sp_post_xpload: Processing table LAN_PAGENO_RANGE (251/419)
  140. Checking table 'LAN_PAGENO_RANGE' (object ID 788194827): Logical page size is
  141. 4096 bytes.
  142. Checking partition 'LAN_PAGENO_RANGE_788194827' (partition ID 788194827) of
  143. table 'LAN_PAGENO_RANGE'. The logical page size of this table is 4096 bytes.
  144. The indexes for 'LAN_PAGENO_RANGE' are already correct.  They will not be
  145. rebuilt.
  146. sp_post_xpload: Processing table LAN_PAGENO_RANGE2 (252/419)
  147. sp_post_xpload: Processing table LAN_PAGENO_RANGE3 (253/419)
  148. sp_post_xpload: Processing table LAN_SYS_syscolumns (254/419)
  149. Checking table 'LAN_SYS_syscolumns' (object ID 1012195625): Logical page size is
  150. 4096 bytes.
  151. Checking partition 'LAN_SYS_syscolumns_1012195625' (partition ID 1012195625) of
  152. table 'LAN_SYS_syscolumns'. The logical page size of this table is 4096 bytes.
  153. The indexes for 'LAN_SYS_syscolumns' are already correct.  They will not be
  154. rebuilt.
  155. sp_post_xpload: Processing table LAN_SYS_sysindexes (255/419)
  156. Checking table 'LAN_SYS_sysindexes' (object ID 1108195967): Logical page size is
  157. 4096 bytes.
  158. Checking partition 'LAN_SYS_sysindexes_1108195967' (partition ID 1108195967) of
  159. table 'LAN_SYS_sysindexes'. The logical page size of this table is 4096 bytes.
  160. The indexes for 'LAN_SYS_sysindexes' are already correct.  They will not be
  161. rebuilt.
  162. sp_post_xpload: Processing table LAN_SYS_sysobjects (256/419)
  163. Checking table 'LAN_SYS_sysobjects' (object ID 1060195796): Logical page size is
  164. 4096 bytes.
  165. Checking partition 'LAN_SYS_sysobjects_1060195796' (partition ID 1060195796) of
  166. table 'LAN_SYS_sysobjects'. The logical page size of this table is 4096 bytes.
  167. The indexes for 'LAN_SYS_sysobjects' are already correct.  They will not be
  168. rebuilt.
  169. sp_post_xpload: Processing table LAN_sysdatabases (257/419)
  170. Checking table 'LAN_sysdatabases' (object ID 1940198931): Logical page size is
  171. 4096 bytes.
  172. Checking partition 'LAN_sysdatabases_1940198931' (partition ID 1940198931) of
  173. table 'LAN_sysdatabases'. The logical page size of this table is 4096 bytes.
  174. The indexes for 'LAN_sysdatabases' are already correct.  They will not be
  175. rebuilt.
  176. sp_post_xpload: Processing table LAN_sysdevices (258/419)
  177. Checking table 'LAN_sysdevices' (object ID 1828198532): Logical page size is
  178. 4096 bytes.
  179. Checking partition 'LAN_sysdevices_1828198532' (partition ID 1828198532) of
  180. table 'LAN_sysdevices'. The logical page size of this table is 4096 bytes.
  181. The indexes for 'LAN_sysdevices' are already correct.  They will not be
  182. rebuilt.
  183. sp_post_xpload: Processing table LAN_sysusages (259/419)
  184. Checking table 'LAN_sysusages' (object ID 1892198760): Logical page size is 4096
  185. bytes.
  186. Checking partition 'LAN_sysusages_1892198760' (partition ID 1892198760) of table
  187. 'LAN_sysusages'. The logical page size of this table is 4096 bytes.
  188. The indexes for 'LAN_sysusages' are already correct.  They will not be rebuilt.
  189. sp_post_xpload: Processing table PartitionTestTable (271/419)
  190. Checking table 'PartitionTestTable' (object ID 1223672376): Logical page size is
  191. 4096 bytes.
  192. Checking partition 'zhang' (partition ID 1239672433) of table
  193. 'PartitionTestTable'. The logical page size of this table is 4096 bytes.
  194. Checking partition 'liu' (partition ID 1255672490) of table
  195. 'PartitionTestTable'. The logical page size of this table is 4096 bytes.
  196. Checking partition 'wang' (partition ID 1271672547) of table
  197. 'PartitionTestTable'. The logical page size of this table is 4096 bytes.
  198. Checking partition 'li' (partition ID 1287672604) of table 'PartitionTestTable'.
  199. The logical page size of this table is 4096 bytes.
  200. One or more indexes are corrupt.  They will be rebuilt.
  201. There are 262144.000000 rows in 1082 pages for object 'PartitionTestTable'.
  202. Non-clustered index 'idx_PartitionTestTable_id' (ID = 2) successfully restored
  203. for object 'PartitionTestTable' in 'testdb' database.
  204. There are 262144.000000 rows in 1082 pages for object 'PartitionTestTable'.
  205. Non-clustered index 'idx_PartitionTestTable_name' (ID = 3) successfully restored
  206. for object 'PartitionTestTable' in 'testdb' database.
  207. sp_post_xpload: Processing table S_OFFICE (346/419)
  208. Checking table 'S_OFFICE' (object ID 395145422): Logical page size is 4096
  209. bytes.
  210. Checking partition 'PK_S_OFFICE_x_395145422' (partition ID 395145422) of table
  211. 'S_OFFICE'. The logical page size of this table is 4096 bytes.
  212. The indexes for 'S_OFFICE' are already correct.  They will not be rebuilt.
  213. sp_post_xpload: Processing table Usertype_relation (364/419)
  214. Checking table 'Usertype_relation' (object ID 2020199216): Logical page size is
  215. 4096 bytes.
  216. Checking partition 'Usertype_relation_2020199216' (partition ID 2020199216) of
  217. table 'Usertype_relation'. The logical page size of this table is 4096 bytes.
  218. The indexes for 'Usertype_relation' are already correct.  They will not be
  219. rebuilt.
  220. sp_post_xpload: Processing table databases (395/419)
  221. Checking table 'databases' (object ID 736002622): Logical page size is 4096
  222. bytes.
  223. Checking partition 'databases_736002622' (partition ID 736002622) of table
  224. 'databases'. The logical page size of this table is 4096 bytes.
  225. The indexes for 'databases' are already correct.  They will not be rebuilt.
  226. sp_post_xpload: Processing table devices (396/419)
  227. Checking table 'devices' (object ID 704002508): Logical page size is 4096
  228. bytes.
  229. Checking partition 'devices_704002508' (partition ID 704002508) of table
  230. 'devices'. The logical page size of this table is 4096 bytes.
  231. The indexes for 'devices' are already correct.  They will not be rebuilt.
  232. sp_post_xpload: Processing table employee (397/419)
  233. sp_post_xpload: Processing table employee_bak (398/419)
  234. sp_post_xpload: Processing table kqjcb (399/419)
  235. sp_post_xpload: Processing table lzftest (400/419)
  236. Checking table 'lzftest' (object ID 1975675055): Logical page size is 4096
  237. bytes.
  238. /**************************************************

  239. 省略一部分表的索引重建过程............
  240. **************************************************/
  241. Checking partition 'li' (partition ID 1991675112) of table 'lzftest'. The
  242. logical page size of this table is 4096 bytes.
  243. Checking partition 'liu' (partition ID 2007675169) of table 'lzftest'. The
  244. logical page size of this table is 4096 bytes.
  245. Checking partition 'wang' (partition ID 2023675226) of table 'lzftest'. The
  246. logical page size of this table is 4096 bytes.
  247. Checking partition 'zhang' (partition ID 2039675283) of table 'lzftest'. The
  248. logical page size of this table is 4096 bytes.
  249. Checking partition 'zhu' (partition ID 2071675397) of table 'lzftest'. The
  250. logical page size of this table is 4096 bytes.
  251. The indexes for 'lzftest' are already correct.  They will not be rebuilt.
  252. sp_post_xpload: Processing table office (401/419)
  253. Checking table 'office' (object ID 439669583): Logical page size is 4096 bytes.
  254. Checking partition 'office_439669583' (partition ID 439669583) of table
  255. 'office'. The logical page size of this table is 4096 bytes.
  256. The indexes for 'office' are already correct.  They will not be rebuilt.
  257. sp_post_xpload: Processing table office_bak (402/419)
  258. sp_post_xpload: Processing table pbcatcol (403/419)
  259. Checking table 'pbcatcol' (object ID 848003021): Logical page size is 4096
  260. bytes.
  261. Checking partition 'pbcatcol_848003021' (partition ID 848003021) of table
  262. 'pbcatcol'. The logical page size of this table is 4096 bytes.
  263. The indexes for 'pbcatcol' are already correct.  They will not be rebuilt.
  264. sp_post_xpload: Processing table pbcatedt (404/419)
  265. sp_post_xpload: Processing table pbcatfmt (405/419)
  266. Checking table 'pbcatfmt' (object ID 896003192): Logical page size is 4096
  267. bytes.
  268. Checking partition 'pbcatfmt_896003192' (partition ID 896003192) of table
  269. 'pbcatfmt'. The logical page size of this table is 4096 bytes.
  270. The indexes for 'pbcatfmt' are already correct.  They will not be rebuilt.
  271. sp_post_xpload: Processing table pbcattbl (406/419)
  272. Checking table 'pbcattbl' (object ID 800002850): Logical page size is 4096
  273. bytes.
  274. Checking partition 'pbcattbl_800002850' (partition ID 800002850) of table
  275. 'pbcattbl'. The logical page size of this table is 4096 bytes.
  276. The indexes for 'pbcattbl' are already correct.  They will not be rebuilt.
  277. sp_post_xpload: Processing table pbcatvld (407/419)
  278. sp_post_xpload: Processing table syscolumn (408/419)
  279. sp_post_xpload: Processing table sysobjects1 (409/419)
  280. sp_post_xpload: Processing table temp2 (410/419)
  281. sp_post_xpload: Processing table temptbl (411/419)
  282. sp_post_xpload: Processing table test (412/419)
  283. sp_post_xpload: Processing table test (413/419)
  284. sp_post_xpload: Processing table test2 (414/419)
  285. sp_post_xpload: Processing table test3 (415/419)
  286. Checking table 'test3' (object ID 1351672832): Logical page size is 4096 bytes.
  287. Checking partition 'pk_test3_id_1351672832' (partition ID 1351672832) of table
  288. 'test3'. The logical page size of this table is 4096 bytes.
  289. The indexes for 'test3' are already correct.  They will not be rebuilt.
  290. sp_post_xpload: Processing table test4 (416/419)
  291. Checking table 'test4' (object ID 1399673003): Logical page size is 4096 bytes.
  292. Checking partition 'pk_test4_id_1399673003' (partition ID 1399673003) of table
  293. 'test4'. The logical page size of this table is 4096 bytes.
  294. The indexes for 'test4' are already correct.  They will not be rebuilt.
  295. sp_post_xpload: Processing table testtimestamp (417/419)
  296. sp_post_xpload: Processing table testvarchar (418/419)
  297. sp_post_xpload: Processing table usages (419/419)
  298. Checking table 'usages' (object ID 768002736): Logical page size is 4096 bytes.
  299. Checking partition 'usages_768002736' (partition ID 768002736) of table
  300. 'usages'. The logical page size of this table is 4096 bytes.
  301. The indexes for 'usages' are already correct.  They will not be rebuilt.
  302. (return status = 0)
  303. 1> sp_indsuspect
  304. 2> go
  305. There are no suspect indexes in database testdb.
  306. (return status = 0)
  307. 1>
复制代码

论坛徽章:
0
4 [报告]
发表于 2010-04-12 18:58 |只看该作者
重建索引这一步时间比较长。记得当初120多G的数据跨平台恢复后重建索引整整做了两天

论坛徽章:
0
5 [报告]
发表于 2010-06-12 09:27 |只看该作者
和12.5.4的操作是一样的啊。

不过我的xpload后还是报有索引异常,最终我还是手工重建。厂家的工程师也不知道为啥。按理说那个就是重索引的了

论坛徽章:
33
ChinaUnix元老
日期:2018-07-04 15:10:362015年亚洲杯之阿联酋
日期:2015-02-06 17:15:532015亚冠之武里南联
日期:2015-06-06 15:40:252015亚冠之北京国安
日期:2015-06-17 15:42:412022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:322015亚冠之阿尔纳斯尔
日期:2015-09-20 09:42:1215-16赛季CBA联赛之北京
日期:2016-01-15 10:03:5915-16赛季CBA联赛之青岛
日期:2016-04-26 16:44:4915-16赛季CBA联赛之广夏
日期:2018-07-04 15:33:21C
日期:2016-10-25 16:12:142017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之同曦
日期:2017-02-22 22:41:10
6 [报告]
发表于 2010-06-12 11:42 |只看该作者
赞一个!

论坛徽章:
6
水瓶座
日期:2014-06-04 03:34:37水瓶座
日期:2014-06-17 13:20:31数据库技术版块每日发帖之星
日期:2016-07-09 06:20:00数据库技术版块每日发帖之星
日期:2016-07-17 06:20:00数据库技术版块每日发帖之星
日期:2016-08-01 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
7 [报告]
发表于 2010-06-12 15:13 |只看该作者
回复 5# hefan


    索引重建的确很耗时。 我的库不到500m,记得当时等了好一会了。 不过幸运的是没有需要重建索引。

在考虑: 是否索引中含有汉字这种多字节字符导致的索引需要重建? 尤其在big-endian 和 little-endian转化时,sybase不能有效的处理旧索引数据? 

这个的确值得深入分析一下。

论坛徽章:
0
8 [报告]
发表于 2010-06-20 20:48 |只看该作者
昨天刚做了ASE 15.0.3的升级,从ASE 12.5 for linux下dump 的数据库,load 到ASE 15.0.3 for aix中,还是顺利的。

直接load 完,再sp_post_xpload 就OK了。目前准备测试中。

ASE15的新功能还了解的不多,分区的使用还在学习中

论坛徽章:
33
ChinaUnix元老
日期:2018-07-04 15:10:362015年亚洲杯之阿联酋
日期:2015-02-06 17:15:532015亚冠之武里南联
日期:2015-06-06 15:40:252015亚冠之北京国安
日期:2015-06-17 15:42:412022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:322015亚冠之阿尔纳斯尔
日期:2015-09-20 09:42:1215-16赛季CBA联赛之北京
日期:2016-01-15 10:03:5915-16赛季CBA联赛之青岛
日期:2016-04-26 16:44:4915-16赛季CBA联赛之广夏
日期:2018-07-04 15:33:21C
日期:2016-10-25 16:12:142017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之同曦
日期:2017-02-22 22:41:10
9 [报告]
发表于 2010-06-21 14:04 |只看该作者
ASE15好多功能个人也没有用到!摸索中....

论坛徽章:
7
数据库技术版块每日发帖之星
日期:2015-08-09 06:20:00数据库技术版块每日发帖之星
日期:2015-11-03 06:20:00数据库技术版块每日发帖之星
日期:2016-02-20 06:20:00数据库技术版块每日发帖之星
日期:2016-07-13 06:20:00数据库技术版块每日发帖之星
日期:2016-07-31 06:20:00数据库技术版块每日发帖之星
日期:2016-08-01 06:20:00数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
10 [报告]
发表于 2010-06-22 12:59 |只看该作者
那个重建索引和主键其实是跨平台后最麻烦的了,为此,我自己特意写了个程序专门将库内所有index和primary key生成ddl出来。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP