关于进行数据库备份 [英] about taking database backup

查看:69
本文介绍了关于进行数据库备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个基于Windows的软件
最初是通过以下方式从c#前端调用以下查询来提供对硬盘驱动器进行数据库备份的条款:

将数据库hm备份到磁盘=''C:\\ hm.bak

但是现在我必须将系统部署到客户端,并且没有数据库,因为连接字符串指向数据库的.mdf文件.实际的SQL Server不存在
所以我应该如何进行数据库备份

I have developed one windows based software
initially in that there was a provision for taking database backup on hard disk drive by calling following query from c# front end like this

backup database hm to disk = ''C:\\hm.bak

But now i have to deploy system to client side and there is no database as connection string is pointing to the .mdf file of database. actual sql server is not there
so how should i take database backup

推荐答案

您可以尝试
You could try the File.Copy[^] method? (Use it before you open the database or it will likely fail)


这篇关于关于进行数据库备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆