【问】统计2015年12月1日到12月14日的收银日报,系统死机,但统计11月1日到12月14日可以统计,12月4日到12月14日可以统计 | ||
【适用版本】烘焙之星8 | 【模块】基础业务 | 【点击数】16 |
【知识编号】Z2016012500013 | ||
【问题描述】统计2015年12月1日到12月14日的收银日报,系统死机,但统计11月1日到12月14日可以统计,12月4日到12月14日可以统计 |
2、建议升级至新版本
3、备份数据库后执行以下语句后查询核实效果
—修复索引
use issbakev8–数据库名请根据修复的数据库进行更换。
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from sysobjects
where type =’U’
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC DBREINDEX(@tablename)
fetch test_cur into @tablename
end
close test_cur
deallocate test_cur
go
–修复主键
use issbakev8
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from syscolumns
where status=128
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC CHECKIDENT (@tablename, RESEED)
fetch test_cur into @tablename
end
close test_cur
deallocate test_cur
go