I've been sent this database by someone as raw files (that I tricked SQL Server into attaching as it wouldn't attach it normally) because they had no backup available. I'm using SQL Server version 10.50.4000.0 (SQL Server 2008 R2) and the files come
from the same version. I can't seem to be able to get my FILESTREAM table working properly. I ran DBCC CHECKDB with no errors reported. Then I ran DBCC CHECKTABLE ("Images"), also with no errors reported.
When I run the following query:
SELECT [ID] ,[ID_Adjacency] ,[Image] ,[_Timestamp] ,[_Guid] FROM [MyDatabase].[dbo].[Images]
I get:
Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
Looking at the logs, it seems this query is causing an access violation:
2013-12-06 13:58:22.89 Server Error: 17310, Severity: 20, State: 1.
2013-12-06 13:58:22.89 Server A user request from the session with SPID 52 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
2013-12-06 13:58:23.83 spid52 Starting up database 'ManageTTX'.
2013-12-06 13:59:25.07 spid52 Using 'dbghelp.dll' version '4.0.5'
2013-12-06 13:59:25.07 spid52 ***Stack Dump being sent to C:\Data\MSSQL10.MyServer\MSSQL\LOG\SQLDump0006.txt
2013-12-06 13:59:25.07 spid52 SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2013-12-06 13:59:25.07 spid52 * *******************************************************************************
When I run this query, all is fine:
SELECT [ID] ,[ID_Adjacency] ,[_Timestamp] ,[_Guid] FROM [MyDatabase].[dbo].[Images]
, i.e. excluding the Image field (which is a filestream blob). So it seems my filestream data is somehow corrupt, but after spending all afternoon googling I can't seem to find a way to resolve this, find where the errors are and fix them.
Can anybody assist me here please?