Sunday, February 12, 2012

Connect to SQL Server from Application on different domain

I have written a VB .Net 2005 application that connects to SQL Server 2005. When both the application and the SQL Server are on the same domain we can connect fine using the connection string: "Data Source = Server1\sqlexpress;Initial Catalog=DB1;Integrated Security=True"

My question/problem is my client has machines at remote locations that they want to run the application on and connect to the database, what do I need to do?

Thanks
Simmy

Hi,

then you either have to impersonate the user in the remote domain context in your application first or use SQL Server authentication to connect to the server.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi Simmy,

If your intention is to use integrated authentication, then you need to either (1) create a trust relationship between your client machine's domain of the server machine's domain (assuming that your client machine is part of a domain) or (2) you can create the same local user account with identical passwords on both machines. I don't really recommend (2) since it means that you'll be relying upon NTLM authentication whereas with (1), Kerberos authentication is available (see http://blogs.msdn.com/sql_protocols/archive/2005/10/12/479871.aspx for more information).

Thanks,
Il-Sung.

|||thanks for the help!

No comments:

Post a Comment