Use SQLDMO backup and restore Microsoft SQL Server database in C #, SQLDMO (SQL Distributed Management Objects, SQL Distributed Management)
Encapsulated objects in the Microsoft SQL Server database, SQLDMO is the application interface used by the Enterprise Manager in Microsoft SQL Server,
So it can perform a lot of functions, which of course also include backup and recovery of the database, SQLDMO is provided by Microsoft SQL Server SqldMo.dll,
Since SqldMo.dll is a COM object, everyone must add a reference to it in the .NET project before use.
Below is the code written in the Microsoft SQL Server database backup and recovery with C # language: