您好,我在附加数据库时遇到fg错误,指导我解决 [英] Hello I got the fg error while attaching the db guide me to solve

查看:121
本文介绍了您好,我在附加数据库时遇到fg错误,指导我解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误9003:LSN(371:4902:1)通过了SQL 2000中的数据库扫描日志

ERROR 9003: THE LSN (371:4902:1) PASSED TO LOG SCAN IN DATABASE IN SQL 2000

推荐答案

似乎您的数据库正在使用没有日志维护例程的完整恢复模型.将例程放在适当的位置,或者将数据库切换到简单的恢复模型,然后截断和收缩日志.

缩小日志:
带有truncate_only
的备份日志数据库名称 dbcc收缩文件(logdevicename,NewSizeInMB)
即dbcc收缩文件(securitymaster_log,2048)

您可以通过从当前数据库的sysfiles中的选择名称或通过企业管理器来获取日志文件名.

如果不需要在上次完整备份之外进行恢复,或者将作业放置到定期备份数据库日志的位置,则将数据库切换为简单恢复模型.
It seems your db is using the full recovery model with no log maintenance routines in place. Either put the routines in place, or switch your db to the simple recovery model and truncate and shrink your log.

To Shrink Log:
backup log databasename with truncate_only
dbcc shrinkfile(logdevicename, NewSizeInMB)
ie dbcc shrinkfile(securitymaster_log, 2048)

you can obtain the log file name via select name from sysfiles for the current database, or via Enterprise Manager.

switch your db to simple recovery model if you do not need recovery outside of the last full backup, or put jobs in place to backup the database log periodically.


更好的解决方案...




根据MS文档,9003错误应该意味着您的mdf和ldf文件不在syn中.解决方案通常是使用sp_attach_db或sp_attach_single_file_db Sps附加单个文件,以使SQL Server为您创建一个新的日志文件.但是您已经说过,它没有用.如果无法将db置于紧急模式,我想数据文件头中的某处有损坏(仅我的看法),您只剩下两个选择:返回上一次的良好备份或尝试联系MS支持,结果不确定.
mojza

只是为了完整起见,如果您运行dbcc dbrecover("your_db")
命令,其结果可能与服务器启动期间的结果相同?
much better Solution...




According to MS documentation, 9003 error should mean that your mdf and ldf files are out of syn. And the solution is usually attaching single file using sp_attach_db or sp_attach_single_file_db Sps to let SQL Server create a new log file for you. But you''ve said it didn''t work. If it''s not possible to put db into emergency mode, I guess there''s corruption somewhere in data file header (just my opinion) and you have only two options left: go back to your last good backups or try to contact MS Support with uncertain results.
mojza

just for the sake of completness if you run dbcc dbrecover (''your_db'')
command, the result is probably the same as during server startup?


从来没有这个问题,但似乎其他人也遇到了:当我在"ERROR 9003"上进行搜索时,谷歌已经很满了. br/> 看来这是一个损坏的数据库,磁盘空间问题或类似的情况-请看一下此博客,它要求将一个固定的DB附加到该博客上,这可能会有所帮助. http://www.sqlskills.com/blogs/paul/post/TechEd-Demo-Creating-detaching-re-attaching-and-fixing-a-suspect-database.aspx [
Never had this problem, but it seems others have: google was pretty full when I did a search on "ERROR 9003"
It looks like it is a corrupt DB, or a disk space problem, or similar - have a look at this blog which forces a currup DB to attach, it may help. http://www.sqlskills.com/blogs/paul/post/TechEd-Demo-Creating-detaching-re-attaching-and-fixing-a-suspect-database.aspx[^]

A thought does occur though - SQL 2000 is pretty old. Does it support the version of the DB you are trying to attach?


这篇关于您好,我在附加数据库时遇到fg错误,指导我解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆