将SQL Server连接到Windows共享文件夹
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将SQL Server连接到Windows共享文件夹相关的知识,希望对你有一定的参考价值。
This is how you can connect SQL Server to a Share folder for your backups. After running this, you will see the letter T: in the GUI. Each line must be run seperatly.
EXEC xp_cmdshell 'NET USE'-- to list the mapped drives EXEC xp_cmdshell 'NET USE T: \10.106.74.20share /user:10.106.74.20pollusb password' --to connect EXEC xp_cmdshell 'DIR T: /b' EXEC xp_cmdshell 'NET USE T: /D' -- to remove the share -- Note : you can also make the connection permanent by using /PERSISTENT:YES -- More info on NET USE /? on CMD
以上是关于将SQL Server连接到Windows共享文件夹的主要内容,如果未能解决你的问题,请参考以下文章