Skip to content Skip to sidebar Skip to footer

Backup And Restore Filtered Data From Sql Server Database Using C#

I wish to implement backup and restore feature for my application. Here I want to backup filtered data(not the whole database). Like Select * from Sales where CompanyI

Solution 1:

There is no native way in which you are going to achieve this backup, but there are some awkward workarounds you can do to try to get this functionality.

If every table includes the CompanyId field, you could create a partition schema / function based on the company Id, and specifically place each partition of the schema on to a separate file group. This has then split the data for each CompanyId onto a different file group, which is the key since there is the functionality to perform a file / file group level backup in SQL instead of the entire database.

I wouldn't do this unless it was the last option, I think I would work out exactly what the backup / restore requirements are, and check whether there are better options / choices.

Post a Comment for "Backup And Restore Filtered Data From Sql Server Database Using C#"