6

There is an application used in a production site that uses SQL Server 2008 as its DBMS.

The database schema uses Filestream Varbinary to save binary data on the filesystem instead of directly into the DB tables.

The point is that now and then it would be useful to copy the production database on development machines, mostly for doing troubleshooting. The database is too big for comfortably moving it around, but it would be ok if it could be moved leaving out the filestream varbinary fields.

In other words, I am trying to make an "imperfect" copy of a database: i.e., on the destination database, it is ok to have NULL values instead of the varbinary. Is this possible? I tried looking for the feature on the SQL Server Management studio and did a backup that excludes the filegroup containing the filestream varbinary, but I cannot restore: MSSMS complains that the restore cannot be done because the backup is incomplete (of course).

Is it possible to achieve what I am trying to do in some way?

fdierre
  • 161
  • 4

1 Answers1

1

You can perform a piecemeal restore. I'm not sure if SSMS supports it - perhaps that's why you've been unable to click your way through.

Note, however, that in case of piecemeal restore, the data residing in the not-yet-restored filegroups (filestream in your case) will be simply unavailable (as opposed to being replaced with NULLs).

Pawel Marciniak
  • 205
  • 1
  • 4