备份 SQL Server 数据库到本地映射网络驱动器
来源:靑龍一笑的博客 作者:靑龍一笑 发布时间:2016-08-07 17:42:25 点击量:756 评论:0
首先,需要开启 xp_cmdshell 服务:
新建查询,输入如下语句并执行:
exec sp_configure 'show advanced options', 1
go
reconfigure
go
exec sp_configure 'xp_cmdshell', 1
go
reconfigure
go
go
reconfigure
go
exec sp_configure 'xp_cmdshell', 1
go
reconfigure
go
接着,添加信任链接:
新建查询,输入如下语句并执行:
exec xp_cmdshell 映射驱动器盘符 共享路径
例如:
exec xp_cmdshell 'net use Z: \\192.168.186.130\d$ "lucky2012" /user:192.168.186.130\administrator'
版权所有 © 2005-2023 靑龍一笑的博客 Powered by C.S.Ricen
Copyright © 2005-2023 by www.ricensoftwares.com.cn All Rights Reserved.
Copyright © 2005-2023 by www.ricensoftwares.com.cn All Rights Reserved.