Backup SQL Server via C#

后端 未结 6 1799
自闭症患者
自闭症患者 2021-01-03 03:21

How easy is it to backup a SQL Server database via C# code?

I see lots of related questions, but no real answers.

6条回答
  •  粉色の甜心
    2021-01-03 03:56

    If you want to work with the stream of bytes in C#, for instance compressing the stream before writing to disk, you're welcome to look at the code from my project, SQL Server Compressed Backup. It has a small VDI (the SQL Server virtual device API) DLL wrapper written in C++ faithfully exposing each VDI option to .Net, and the rest (the bulk) of the code is written in C#.

提交回复
热议问题