且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Server Management Studio 2008 通过 VPN 在不同域上运行用户

更新时间:2023-02-07 17:21:34

试试这个:

NET USE \DBSERVER /USER:DOMAINUSERNAME

系统将提示您输入密码.这将与数据库服务器建立 NetBIOS 会话.完成此操作后,您应该能够看到数据库服务器上的共享文件夹和共享打印机.

You will be prompted for your password. This establishes a NetBIOS session with the database server. You should be able to see the shared folders and shared printers on the database server once you have done that.

如果可行,您应该能够像自己一样使用 SSMS 进行连接.您可能必须指定命名管道"作为要使用的网络协议,如果它不适用于 TCP(但我认为它会).

If that works you should be able to connect using SSMS as yourself. You may have to specify "named pipes" as the network protocol to usem, if it doesn't work with TCP (but I think it will).

  • 菜单->文件->连接对象资源管理器...
  • 选项->连接属性->网络协议
  • 指定命名管道"

Named Pipes 继承了您现有的 NetBIOS 会话,因此只要您可以列出您可能很乐意使用的共享.

Named Pipes inherits your existing NetBIOS session, so provided you can list the shares you are probably good to go.

更新:在某些配置中,这似乎不适用于 TCP 连接(可能是由于某些安全更新).在这些情况下,您应该启用命名管道,并在连接字符串中设置命名管道.

Update: It looks like in some configurations this does not work with TCP connections, (possibly due to some security update). In these cases you should enable Named Pipes, and set named pipes in your connection string.