gpt4 book ai didi

sql-server-2008 - 在本地计算机上创建Sql Server备份

转载 作者:行者123 更新时间:2023-12-04 03:00:01 25 4
gpt4 key购买 nike

我正在使用在本地计算机上运行的SQL Server Management Studio。

我可以登录到远程盒(数据库引擎)并使用
Studio创建数据库备份,该数据库备份保存到远程机器上的驱动器中。

如何获得将备份保存到本地计算机上的驱动器的信息?

最佳答案

有关备份到网络共享的部分,请参见this MSDN article,例如:

BACKUP DATABASE YourDatabase
TO DISK = '\\SomeMachine\Backups\YourDatabase.Bak';

Backing Up to a File on a Network
Share For SQL Server to access a remote disk file, the SQL Server service account must have access to the network share. This includes having the permissions needed for backup operations to write to the network share and for restore operations to read from it. The availability of network drives and permissions depends on the context is which SQL Server service is running:

  • To back up to a network drive when SQL Server is running in a domain user account, the shared drive must be mapped as a network drive in the session where SQL Server is running. If you start Sqlservr.exe from command line, SQL Server sees any network drives you have mapped in your login session.
  • When you run Sqlservr.exe as a service, SQL Server runs in a separate session that has no relation to your login session. The session in which a service runs can have its own mapped drives, although it usually does not.
  • You can connect with the network service account by using the computer account instead of a domain user. To enable backups from specific computers to a shared drive, grant access to the computer accounts. As long as the Sqlservr.exe process that is writing the backup has access, it is irrelevant whether the user sending the BACKUP command has access.

关于sql-server-2008 - 在本地计算机上创建Sql Server备份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2130944/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com