+ -
当前位置:首页 → 问答吧 → sybase 日志删除问题!!

sybase 日志删除问题!!

时间:2010-11-30

来源:互联网

在生产的数据库发现,库的日志,只增不减,通过对库的日志备份也不起作用!
在库时执行
1> select * from master..syslogshold
2> go
dbid   reserved    spid   page        xactid         masterxactid
         starttime
         name
------ ----------- ------ ----------- -------------- --------------
         --------------------------
         --------------------------------------------------------------
      7           0      0      639479 0x000000000000 0x000000000000
                Jan  1 1900 12:00AM
         $replication_truncation_point

(1 row affected)
1>
出现这样的提示,应该是我之前对这个数据库进行了复制服务主库的配置,后来
没有同步成功就删掉了。。。,当时,备份库和复制服务是在另一台主机上!

请都各位,如何对这个只增不减的日志进行处理呢?谢谢!

作者: youwei   发布时间: 2010-11-30

对库执行以下命令进行修复:
dbcc tablealloc(syslogs,full,fix)
go
以下的报告,可以说明什么问题呢,请指教!
The 'fix' option has been ignored for this command. To use the 'fix' option with system tables, run the command from the database where the table is located. The database must be in single user mode.
***************************************************************
TABLE: syslogs                OBJID = 8
INDID=0         FIRST=2232         ROOT=3411         SORT=0
        Data level: 0.  1175 Data pages allocated and 147 Extents allocated.
TOTAL # of extents = 147
Alloc page 2048 (# of extent=9 used pages=72 ref pages=72)
Alloc page 2304 (# of extent=32 used pages=256 ref pages=256)
Alloc page 2560 (# of extent=32 used pages=256 ref pages=256)
Alloc page 2816 (# of extent=32 used pages=256 ref pages=256)
Alloc page 3072 (# of extent=32 used pages=256 ref pages=256)
Alloc page 3328 (# of extent=11 used pages=88 ref pages=84)
Total (# of extent=148 used pages=1184 ref pages=1180) in this database
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

作者: youwei   发布时间: 2010-11-30