SQL Server 2012 – Moving FILESTREAM to Another Database

filestreamsql-server-2012

Our development organization has created an application employing FILESTREAM, which through the pilot has been incorporated into a schema within our Data Warehouse Staging database. Going to production, the development and BI teams have determined that they want it separated out into a separate database, and they'd like to separate it in the current pilot environment (DEV).

How can I best move (or at least copy) the existing FILESTREAM data from the current database into a new one?

To clarify: I'm not looking to move the database, but to pull the FILESTREAM (and the entire schema) out of one database and put it into another.

Best Answer

The easiest method would be to move it by restoring the database, and then just clean out the filestream table in the original.

If you really need to move it, then it would be treated like any other situation where you want to move one table to another database. The additional steps involved would be repeating how you setup filestream on the original database.