将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.
  1. EXEC xp_cmdshell 'NET USE'-- to list the mapped drives
  2. EXEC xp_cmdshell 'NET USE T: \10.106.74.20share /user:10.106.74.20pollusb password' --to connect
  3. EXEC xp_cmdshell 'DIR T: /b'
  4. EXEC xp_cmdshell 'NET USE T: /D' -- to remove the share
  5. -- Note : you can also make the connection permanent by using /PERSISTENT:YES
  6. -- More info on NET USE /? on CMD

以上是关于将SQL Server连接到Windows共享文件夹的主要内容,如果未能解决你的问题,请参考以下文章

从Windows XP Mode到Windows 7 SQL Server的SSPI

使用 Windows 身份验证将我的 Sql Server 2008 数据库连接到我的 Java 项目

无法连接到 Windows 共享

无法连接到 windows mobile 6.5.3 设备上的 sql server management studio 中的 sdf 文件

java模拟使用windows身份验证连接到sql server

运行应用程序通过 Windows 来宾用户帐户连接到 SQL Server