5

We have a SQL Server 2005 SP2 machine running a large number of databases, all of which contain full-text catalogs. Whenever we try to drop one of these databases or rebuild a full-text index, the drop or rebuild process hangs indefinitely with a MSSEARCH wait type. The process can’t be killed, and a server reboot is required to get things running again. Based on a Microsoft forums post1, it appears that the problem might be an improperly removed full-text catalog. Can anyone recommend a way to determine which catalog is causing the problem, without having to remove all of them?

1 [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2681739&SiteID=1] “Yes we did have full text catalogues in the database, but since I had disabled full text search for the database, and disabled msftesql, I didn't suspect them. I got however an article from Microsoft support, showing me how I could test for catalogues not properly removed. So I discovered that there still existed an old catalogue, which I ,after and only after re-enabling full text search, were able to delete, since then my backup has worked”</p>

4

3 回答 3

2

这是一个建议。我没有任何损坏的数据库,但你可以试试这个:

declare @t table (name nvarchar(128))
insert into @t select name from sys.databases --where is_fulltext_enabled 

while exists(SELECT * FROM @t)
begin
    declare @name nvarchar(128)
    select @name = name from @t
    declare @SQL nvarchar(4000)
    set @SQL = 'IF EXISTS(SELECT * FROM '+@name+'.sys.fulltext_catalogs) AND NOT EXISTS(SELECT * FROM sys.databases where is_fulltext_enabled=1 AND name='''+@name+''') PRINT ''' +@Name + ' Could be the culprit'''
    print @sql
    exec sp_sqlexec @SQL
    delete from @t where name = @name
end

如果它不起作用,请删除过滤器检查sys.databases

于 2008-10-03T19:32:41.160 回答
1

我对无效的全文目录位置有类似的问题。服务器不会在启动时使所有数据库联机。它将以 dbid 顺序处理数据库,并在中途停止。只有较旧的数据库联机,其余的无法访问。查看 sysprocesses 发现有十几个或更多进程的 waittype = 0x00CC ,lastwaittype = MSSEARCH。无法停止 MSSEARCH。问题是由于我们重新定位全文目录但在运行 alter database ... modifyfile 命令时为其中一个目录输入了错误的路径而引起的。解决方案是禁用 MSSEARCH,重新启动服务器以允许所有数据库联机,找到有问题的数据库,使其脱机,使用 alter database 命令更正文件路径,然后使数据库联机。然后启动 MSSEARCH 并设置为自动启动。

于 2010-03-23T00:47:01.640 回答
1

您是否尝试过运行进程监视器以​​及它何时挂起并查看潜在错误是什么?使用进程监视器,您应该能够告诉whick文件/资源​​它正在等待/出错。

于 2008-09-08T02:50:44.327 回答