如何备份和恢复基于服务的数据库,mdf文件 [英] how to backup and Restore a Service based-Database , mdf file
本文介绍了如何备份和恢复基于服务的数据库,mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#中备份和恢复基于服务的数据库mdf文件?
i不能访问Sql Server因为我在Visual Studio安装程序中只使用sql express基础,所以,不要链接我在SqlServer上进行备份和恢复。
解决方案
网络上有很多答案。您有多种方法可供选择:
A)SMO:
SQL Server 2008 - 使用SMO备份和恢复数据库 [ ^ ]
B)SQLDMO:
http://www.csharphelp.com/2006/10 / sql-server-backuprestore-through-sqldmo-and-c / [ ^ ]
C)ADO.NET命令:
http://cavedweller92.wordpress.com/2012/ 12/13 / create-backup-restoring-database-in-mssql-asp-net-c-2 / [ ^ ]
我建议你采取第一种方法。
我在网上找到的最简单的方法是:
如何备份和恢复sql server数据库
http://www.webcodeexpert.com/2013/05/how-to-backup-and-restore-sql-server.html [< a href =http://www.webcodeexpert.com/2013/05/how-to-backup-and-restore-sql-server.htmltarget =_ blanktitle =New Window> ^
how to backup and Restore a Service based-Database mdf file in C#?
i do not access to Sql Server because i use only sql express basic on Ms Visual Studio Installer , so , do not linked me to backup and Restore on SqlServer.
解决方案
The Web is full with answers. You have several approaches to choose from:
A) SMO:
SQL Server 2008 - Backup and Restore Databases using SMO[^]
B) SQLDMO:
http://www.csharphelp.com/2006/10/sql-server-backuprestore-through-sqldmo-and-c/[^]
C) ADO.NET Commands:
http://cavedweller92.wordpress.com/2012/12/13/create-backup-restoring-database-in-mssql-asp-net-c-2/[^]
I suggest you take the first approach.
Easiest way i found on the web is below:
How to Backup and restore sql server database
http://www.webcodeexpert.com/2013/05/how-to-backup-and-restore-sql-server.html[^]
这篇关于如何备份和恢复基于服务的数据库,mdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文