使用Windows身份验证模式连接到VM上的SQL Server实例

时间:2022-06-25 02:46:23

I've got a small program I'm writing that I need to be able to point at a SQL Server instance that is on a virtualbox VM's (not Azure). Unfortunately when these VM's are created the SQL Server instances are installed with Windows only authentication. We use the same credentials for each VM, however they are not on our domain (where the program would be running)

我有一个小程序,我正在编写,我需要能够指向虚拟机VM(不是Azure)上的SQL Server实例。不幸的是,当创建这些VM时,SQL Server实例安装时只使用Windows身份验证。我们为每个VM使用相同的凭据,但它们不在我们的域中(程序将在其中运行)

I know that the typical connection string for windows authentication has Integrated Security=SSPI in it but is it possible to specify the windows credentials for the VM you're connecting to in the connection string?

我知道Windows身份验证的典型连接字符串中包含Integrated Security = SSPI,但是是否可以在连接字符串中为要连接的VM指定Windows凭据?

Is there anyway around this? Setting up SQL authentication is not really an option. Any ideas would be appreciated.

有没有办法解决?设置SQL身份验证不是一个真正的选择。任何想法,将不胜感激。

1 个解决方案

#1