https://vandijk.cloud/restore-sql-backup-from-a-network-share/
EXEC sp_configure 'show advanced options', 1;
EXEC sp_configure 'xp_cmdshell',1
EXEC XP_CMDSHELL 'net use H: \\RemoteServerName\ShareName'
If the specific share has authentication enabled you might have the change the last command to:
EXEC XP_CMDSHELL 'net use H: \\RemoteServerName\ShareName' /user:domain\username ThePassword
No comments:
Post a Comment