免费注册 查看新帖 |

Chinaunix

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

各位老大,问个问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-22 12:18 |只看该作者 |倒序浏览
Msg 9996, Level 16, State 1:
Line 1:
Keys of index id 3 for table 'LSHSPZ' in index page not in proper order. Drop
and recreate the index. (index page 13712)
Msg 806, Level 16, State 1:
Line 1:
Could not find virtual page for logical page 14499072  in database 'cwbase1'.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.

怎么解决,谢谢

论坛徽章:
4
2015年亚洲杯之阿联酋
日期:2015-03-10 10:32:022015年亚洲杯之阿曼
日期:2015-03-10 14:53:222015亚冠之水原三星
日期:2015-07-18 15:40:262015亚冠之塔什干棉农
日期:2015-07-27 20:52:05
2 [报告]
发表于 2005-07-22 12:37 |只看该作者

各位老大,问个问题

数据一致性问题

论坛徽章:
0
3 [报告]
发表于 2005-07-22 12:43 |只看该作者

各位老大,问个问题

我对删除索引和重建索引不熟

论坛徽章:
0
4 [报告]
发表于 2005-07-22 20:49 |只看该作者

各位老大,问个问题

对数据库做DBCC,检查一下数据库

论坛徽章:
0
5 [报告]
发表于 2005-07-23 12:22 |只看该作者

各位老大,问个问题

故障:无法保存银行凭证
显示:
     fatal error  806
测试查找原因
1、        数据库核查
    use master
go
sp_dboption cwbase1,"single user",true
go
use cwbase1
go
checkpoint
go
dbcc checkdb(cwbase1)
go
dbcc checkalloc(cwbase1,fix)
go
dbcc checkcatalog(cwbase1)
go
use master
go
sp_dboption cwbase1,"single user",false
go
use cwbase1
go
checkpoint
go
quit
go

显示
  Database option 'single user' turned ON for database 'cwbase1'.
Run the CHECKPOINT command in the database that was changed.
(return status = 0)
Checking cwbase1
Checking sysobjects
…………………………….
……………………………
virtual start addr      size      segments
--------------------    ------    --------------------------
67108864                       1024000
                               0
                               1
83886080                       256000
                                    2
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
Database option 'single user' turned OFF for database 'cwbase1'.
Run the CHECKPOINT command in the database that was changed.
(return status = 0)
  如111out

2、        表检查
  use cwbase1
go
dbcc checktable(LSHSPZ)
go
dbcc tablealloc(LSHSPZ)
GO
显示:
   Checking LSHSPZ
The total number of data pages in this table is 1149.
The total number of pages which could be garbage collected to free up some space
is 207.
Table has 8326 data rows.
Msg 9996, Level 16, State 1:
Line 1:
Keys of index id 3 for table 'LSHSPZ' in index page not in proper order. Drop
and recreate the index. (index page 13712)
Msg 806, Level 16, State 1:
Line 1:
Could not find virtual page for logical page 14499072  in database 'cwbase1'.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.
The default report option of OPTIMIZED is used for this run.
The default fix option of FIX   is used for this run.
***************************************************************
TABLE: LSHSPZ                OBJID = 1457440266
INDID=0         FIRST=11201         ROOT=11201         SORT=0
        Data level: 0.  1149 Data pages allocated and 149 Extents allocated.
INDID=2         FIRST=11249         ROOT=11248         SORT=1
        Indid          : 2.  75 Index pages allocated and 10 Extents allocated.
INDID=3         FIRST=13713         ROOT=13712         SORT=1
        Indid          : 3.  62 Index pages allocated and 9 Extents allocated.
INDID=4         FIRST=13729         ROOT=13728         SORT=1
        Indid          : 4.  49 Index pages allocated and 7 Extents allocated.
INDID=5         FIRST=11233         ROOT=11232         SORT=0
        Indid          : 5.  262 Index pages allocated and 35 Extents allocated.
TOTAL # of extents = 210
Alloc page 11008 (# of extent=1 used pages=8 ref pages=
Alloc page 41472 (# of extent=1 used pages=8 ref pages=
Alloc page 41728 (# of extent=5 used pages=40 ref pages=40)
Alloc page 42240 (# of extent=1 used pages=8 ref pages=
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
Alloc page 49664 (# of extent=2 used pages=16 ref pages=16)
Alloc page 58368 (# of extent=1 used pages=8 ref pages=
Alloc page 59904 (# of extent=1 used pages=3 ref pages=3)
Alloc page 60160 (# of extent=1 used pages=2 ref pages=2)
Total (# of extent=210 used pages=1611 ref pages=1611) in this database
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.

3、        解决故障
1>;        sp_helpindex LSHSPZ
2>;        go
3>;        drop index LSHSPZ.LSHSPZ1
4>;        go
5>;        CREATE nonclustered INDEX LSHSPZ1 ON LSHSPZ(F_DATE)
6>;        go
7>;        drop index LSHSPZ.LSHSPZ2
8>;        go
9>;        CREATE nonclustered INDEX LSHSPZ2 ON LSHSPZ(F_PZBH)
10>;        Go
11>;        drop index LSHSPZ.LSHSPZ3
12>;        go
13>;        CREATE nonclustered INDEX LSHSPZ3 ON LSHSPZ(F_KMBH)
14>;        Go
15>;        drop index LSHSPZ.LSHSPZ
16>;        go
17>;        CREATE unique clustered INDEX LSHSPZ ON LSHSPZ(F_DATE, F_PZBH, F_FLBH, F_FZBH, F_HSBH)
18>;        Go

论坛徽章:
0
6 [报告]
发表于 2005-07-23 19:24 |只看该作者

各位老大,问个问题

写的不错,很完整一个流程

论坛徽章:
0
7 [报告]
发表于 2005-07-24 20:20 |只看该作者

各位老大,问个问题

哈哈,重建一个索引要这么复杂的过程吗?不过楼主的严谨做法确实令人敬佩,也值得学习和提倡
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP