如何应对数据库备份 [英] How Can tack Database Back Up
本文介绍了如何应对数据库备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友
我有一个使用本地数据库的项目
ConnectionString就是这个数据源= | DataDirectory | \ Database.sdf"
我想知道如何使用C#代码添加此文件,然后再次将备份文件还原到Windows应用程序中.
请帮帮我.
谢谢
Hello friends
i have a project where i used a local database
the ConnectionString is this "Data Source=|DataDirectory|\Database.sdf"
i want to know how can a tack back of this file using c# code and also again restore the back up file in to the windows application .
please help me.
Thanks
推荐答案
使用SDF文件,最简单的方法就是复制它-SDF文件是自包含的,只需使用File.Copy或文件系统就可以了.只要确保您当时不使用它即可! :laugh:
With an SDF file, the easiest way is just to copy it - an SDF file is self contained, and just taking a copy using either File.Copy or the file system will be fine. Just make sure you aren''t using it at the time! :laugh:
单击下面的链接,逐步清晰地显示了使用SQL Server Management Studio进行数据库完整备份的屏幕截图.
http://www.mytechmantra.com/LearnSQLServer/How-to- Backup-Database-SQL-Server-P1.html [ ^ ]
这是一种好又快的方法,基本上不需要任何其他方式,这是我个人的建议!!!
[edit]不必要的代码块已删除,可点击链接[/edit]
Click this below link its clearly show step by step with screen shot for Take Full Backup of a Database Using SQL Server Management Studio
http://www.mytechmantra.com/LearnSQLServer/How-to-Backup-Database-SQL-Server-P1.html[^]
This is good and quick one mostly no need for any other way its my personal advise!!!
[edit]unnecessary code block removed and clickable link[/edit]
这篇关于如何应对数据库备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文