问题描述
嗨我的应用程序使用SQL Server2005.
数据库在服务器上,所有客户端都使用该数据库.如何为我的应用程序添加备份服务? (我想向应用程序添加备份"按钮)以及如何从备份中恢复数据?
HiMy application uses SQL Server 2005.
Database is on server and all of the clients use that. How can add a backup service to my application? (I want to add a "Backup" button to application) And how can I recover data from the backup?
推荐答案
BACKUP DATABASE and BACKUP LOG permissions default to members of the sysadmin fixed server role and the db_owner and db_backupoperator fixed database roles.
因此,发出备份命令的客户端应用程序将需要具有适当的权限
我个人认为这是一种糟糕的备份方法.如果要定期备份数据库,只需安排一个作业每小时执行一次备份即可.
如果您需要从备份中还原数据库,那么在多用户环境中,DBA应该绝对适合这种情况.您不希望您的客户端应用程序能够执行此操作,那样会发疯
So your client application that is issuing the backup command would need to have the appropriate permissions
Personally, I think this is a terrible approach to backups. If you want regular backups of a database, just schedule a job to perform them once per hour or whatever.
If you need to restore a db from backup, this is definitely something that should sit with a DBA in a multi-user environment. You wouldn''t want your client application being able to do this, that way madness lies
这篇关于从SQL Server数据库进行备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!