如何将数据库备份放入Sql Server 2008中的另一台PC? [英] How to take database backup into another PC in Sql Server 2008?

查看:266
本文介绍了如何将数据库备份放入Sql Server 2008中的另一台PC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为数据库配置了自动备份选项,该选项使数据库定期进行备份。备份文件保存在同一台服务器PC硬盘上(在另一个分区中),从那里我将其传输(复制-粘贴)到同一网络中的另一台PC(例如备份PC)上。是否有任何选项/方式配置自动备份选项,以便它将备份文件保存到该备份PC中?我正在使用SQL Server2008。

I have configured an Auto Backup option for my database, which makes database backups in regular intervals. This backup file is saved on the same Server PCs HDD (in another partition), from where I transfer (copy - paste) it into another PC (let's say, Backup PC) in the same network. Is there any option/way to configure the Auto Backup option such that it will save the Backup file into that Backup PC? I am using SQL Server 2008.

编辑:

我试图创建一个备份计划并执行它,但是低于错误(提供了实际错误消息)。


I tried to create a backup plan and execute it, but getting below error (actual error message provided).

BACKUP DATABASE [CheckMateDB] TO  DISK = N''\\192.168.44.17\IIML4_MiniRaps_DB_Backup\CheckMateDB_backup_2014_01_27_132201_3595000.bak'' WITH NOFORMAT, NOINIT,  NAME = N''CheckMateDB_backup_2014_01_27_132201_3595000'', SKIP, REWIND, NOUNLOAD,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''CheckMateDB'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''CheckMateDB'' )
if @backupSetId is null begin raiserror(N''Verify failed. Backup information for database ''''CheckMateDB'''' not found.'', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N''\\192.168.44.17\IIML4_MiniRaps_DB_Backup\CheckMateDB_backup_2014_01_27_132201_3595000.bak'' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND

GO

但是,我用于创建此计划的用户ID具有对其他PC共享文件夹的管理特权嗯例如,我可以使用开始>运行>备份PC的IP中的用户ID从服务器PC中找到备份PC的共享文件夹,并可以在该文件夹中创建/读取/删除文件。

However, the user id I have used to create this plan, has admin privileges to the other PCs share folder. For example, I can locate the share folder of the Backup PC from Server PC using the user id from Start>Run>Backup PC's IP and can create/read/delete file to that folder.

推荐答案

您需要通过网络共享将目标系统与系统映射

You need to map your target sytem with your system by network share

您可以通过使用SQL

You can by using SQL

BACKUP DATABASE Foo TO DISK = '\\myserver\myshare\foo.bak' WITH INIT

请确保用于sql服务的帐户具有足够的权限来写入另一台计算机。

Make sure the account used for the sql services has enough rights to write to the other pc.

由于未显示映射的网络驱动器,因此使用了您的用户帐户。这与在另一个用户帐户下运行的Sql Server 服务有关,该帐户是您用来映射驱动器的帐户。

For the reason the mapped network drives don't show up made with your user account. This has to do with the Sql Server service running under another user account then the one you've used for mapping the drive.

这篇关于如何将数据库备份放入Sql Server 2008中的另一台PC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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