数据库为什么会置疑?有什么条件会产生这个原因?

数据库为什么会置疑?有什么条件会产生这个原因?,第1张

1 SQL Server所在分区空间是否够?数据库文件大小是否达到最大文件限制?

2 数据库文件损坏或被非正常删除时出现这种情况

3 病毒防火墙的扫描也会引起数据库置疑

INF: Consideration for a virus scanner on a computer that is running SQL Server 2000

http://support.microsoft.com/default.aspx?scid=kben-us309422

If the virus sweep has opened a database file and still has it open when SQL Server tries to open the database (such as when SQL Server starts or when SQL Server opens a database that AutoClose has closed), the database to which the file belongs might be marked suspect. The SQL Server database files typically have the .mdf, .ldf, and .ndf file suffixes.

4 当SQL Server启动时,将会尝试获得对数据库文件的排他访问权,如果此时该文件被其他程序占用,或者遗失,数据库将会被标记为置疑。

PRB: Missing device causes database to be marked suspect

http://support.microsoft.com/kb/180500/EN-US/

数据库置疑一般是由于SQL被重装,但是数据目录被设置在另外一个盘并且没有被删除,而导致的,或者是由于数据库的.log文件不存在了,这时你可以使用以下的方法来取消置疑!USE MASTER GO SP_CONFIGURE \'ALLOW UPDATES\',1 RECONFIGURE WITH OVERRIDE GO UPDATE SYSDATABASES SET STATUS =32768 WHERE NAME=\'置疑的数据库名\' Go sp_dboption \'置疑的数据库名\', \'single user\', \'true\' Go DBCC CHECKDB(\'置疑的数据库名\') Go update sysdatabases set status =28 where name=\'置疑的数据库名\' Go sp_configure \'allow updates\', 0 reconfigure with override Go sp_dboption \'置疑的数据库名\', \'single user\', \'false\' Go


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/9946563.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-03
下一篇 2023-05-03

发表评论

登录后才能评论

评论列表(0条)

保存