server| Backup | recovery | data | Database using SQLDMO in C # Backup and restore Microsoft SQL Server database
SQLDMO (SQL distributed Management objects,sql Distributed Management Objects) encapsulates objects in a Microsoft SQL Server database. SQLDMO is the application interface used by Enterprise Manager in Microsoft SQL Server, so it can perform many functions, including, of course, backup and recovery of the database.
SQLDMO is provided by Microsoft SQL Server SQLDMO.dll, and since SQLDMO.dll is a COM object, you must add a reference to it in the. NET project before you use it, as shown in the following illustration:
The following is a class written in the C # language for backup and recovery of Microsoft SQL Server databases:
Using System;
Namespace Dbservice
{
<summary>
Dboper class, which primarily applies sqldmo to backup and restore Microsoft SQL Server databases
</summary>
public sealed class Dboper
{
<summary>
Constructors for Dboper classes
</summary>
Private Dboper ()
{
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.