We recently upgraded a server from 2014 to 2017. Since down time was a concern, we migrated some DB’s a couple days before.
Migration complete Sunday afternoon, we’ve now come to find out the Filestream DB was used between restore and cutover. So we have a datagap to mitigate. I restored the old DB to a backup server, and did a basic ‘not in’ to find 12 documents in the old DB.
Finally, the question: how do we get those 12 documents into the current DB? Is it as simple as an insert from old to new?
If it helps, this query is what shows the 12 record gap:
SELECT * INTO #tmpFileStore FROM OPENQUERY (OldDBSever_LinkedServer, 'SELECT * FROM [FSDB].[dbo].[DocumentFileStore]'); SELECT stream_id FROM #tmpFileStore WHERE stream_id not in (Select [stream_id] FROM [dbo].[DocumentFileStore]) GO