sybase rebuild index
用isql登入資料庫,檢視一下object_id:1792006384是哪張表,這張表的哪個索引壞了?
透過select object_name(1792006384)查詢出來表名為:js_keys
查詢表js_keys內資料的時候,報索引損壞的錯誤:
1> select count(*) from js_keys
2> go
Index id 2 on table id 1792006384 cannot be used in the optimization of a query
as it is SUSPECT. Please have the SA run DBCC REINDEX on the specified table.
-----------
5
(1 row affected)
透過上面給出的提示資訊,可以看出表js_keys的indid=2的索引壞了。需要重建該表的索引。
使用reindex命令來修復表js_keys的損壞的索引:
dbcc traceon(3604)
go
dbcc reindex(js_keys)
go
反饋資訊為:
1> dbcc traceon(3604)
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
1> dbcc reindex(js_keys)
2> go
Checking table 'js_keys' (object ID 1792006384): Logical page size is 4096
bytes.
Checking partition 'js_keys_1792006384' (partition ID 1792006384) of table
'js_keys'. The logical page size of this table is 4096 bytes.
The sortorder and character set ID's for index 2 on this table were 50:1 in
sysindexes. They have been corrected to 101:190.
The indexes for 'js_keys' are already correct. They will not be rebuilt.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
用checktable命令檢查一下表js_keys
1> dbcc checktable(js_keys)
2> go
Checking table 'js_keys' (object ID 1792006384): Logical page size is 4096
bytes.
Checking partition 'js_keys_1792006384' (partition ID 1792006384) of table
'js_keys'. The logical page size of this table is 4096 bytes.
The total number of data pages in partition 'js_keys_1792006384' (partition ID
1792006384) is 1.
Partition 'js_keys_1792006384' (partition ID 1792006384) has 5 data rows.
The total number of empty pages (with all deleted rows) in partition
'js_keys_1792006384' (partition ID 1792006384) is 0.
The total number of pages in partition 'js_keys_1792006384' (partition ID
1792006384) which could be garbage collected to free up some space is 0.
The total number of deleted rows in partition 'js_keys_1792006384' (partition ID
1792006384) is 0.
The total number of pages in partition 'js_keys_1792006384' (partition ID
1792006384) with more than 50 percent garbage is 0.
The total number of pages in partition 'js_keys_1792006384' (partition ID
1792006384) with more than 50 percent insert free space is 1.
The total number of data pages in this table is 1.
The total number of pages with more than 50 percent insert free space is 1.
Table has 5 data rows.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
1>
至此,表js_keys索引已修復完成,一致性檢查沒有問題了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21416913/viewspace-743318/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rebuild indexRebuildIndex
- index rebuildIndexRebuild
- rebuild index 排序RebuildIndex排序
- Index rebuild --case 1IndexRebuild
- alter index rebuild 與 rebuild onlineIndexRebuild
- alter index rebuild與index_statsIndexRebuild
- ORACLE中index的rebuildOracleIndexRebuild
- Index Online RebuildIndexRebuild
- 【羅玄】從鎖的角度看rebuild index online和rebuild indexRebuildIndex
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- 聊聊索引Index Rebuild和Rebuild Online(上)索引IndexRebuild
- alter index ind1 rebuild 和alter index ind1 rebuild onlineIndexRebuild
- Oracle alter index rebuild 說明OracleIndexRebuild
- alter index rebuild和rebuild online的區別IndexRebuild
- rebuild index 和 recreate index (重新建立index) 的區別RebuildIndex
- create index , rebuild index troubleshooting 索引故障解決IndexRebuild索引
- create index online 與rebuild index onlineIndexRebuild
- create index online 與rebuild index onlineIndexRebuild
- index rebuild online的問題IndexRebuild
- 大資料量rebuild index的經歷大資料RebuildIndex
- Oracle效能優化之“少做事”(rebuild index)Oracle優化RebuildIndex
- Oracle什麼情況下需要rebuild indexOracleRebuildIndex
- 加快create / rebuild index的3個點(zt)RebuildIndex
- Default behavior of create & rebuild index in 10G (zt)RebuildIndex
- 加快建立索引(create / rebuild index) 的幾點索引RebuildIndex
- 關於rebuild index online 及drop index後重建問題RebuildIndex
- 重建索引index rebuild online vs offline vs index coalesce vs index shrik space索引IndexRebuild
- alter index rebuild online引發的血案IndexRebuild
- 測試index online rebuild故障記錄IndexRebuild
- alter index ... rebuild online的機制(zt)IndexRebuild
- “rebuild index online hang住" 問題解析RebuildIndex
- INDEX REBUILD和INDEX REORGANIZE和UPDATE STATISTICS是否涉及Sch-M的案例分析IndexRebuild
- rebuild index online的鎖機制淺析RebuildIndex
- Online rebuild index遭遇ORA-08104RebuildIndex
- 【MOS】Index Rebuild Is Hanging Or Taking Too Long (文件 ID 272762.1)IndexRebuild
- 關於move table和rebuild index批量操作的記錄RebuildIndex
- 一次大資料量rebuild index的經歷大資料RebuildIndex
- Oracle create/rebuild index開並行時要記得noparallel哦~OracleRebuildIndex並行Parallel