Connecting to SQL Server on a Workgroup PC, from a Domain PC, using Windows Authentication

I have 3 computers on my home network. All Vista Business PCs. My home network is a Workgroup (no domaincontroler at home).

STAR (Workgroup pc)is my home test server which runs SQLExpress 2005. Thus the SQL named instance is STAR\sqlexpress.

MARY (Workgroup pc) is my home test client machine.

JOE (Domain pc) is my personal laptop which I carry every day from home to Work. At work I plug into a large Domain network where I am a Domain Admin.

I have a simple App that uses an SQL db on STAR. db is AddressBk. I use a connection string of

Data Source=STAR\SQLEXPRESS;Initial Catalog=AddressBk;Integrated Security=True;connection timeout=90

MARY can connect fine. JOE can not connect. It fails when loading the star up form

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.PeopleTableAdapter.Fill(Me.AddressBkDataSet.People)
End Sub

Error is "Cannot Generate SSPI Context. (Microsoft SQL Server)."

If I try to use SQL Server Managment Studio Express (running on JOE)to connect to "STAR\sqlexpress", I get the same error.

To get MARY working I created a local User on STAR with the same User Name and Password that I normally use on Mary's network login. Then I used SQL Server Management Studio (running on STAR) to add STAR\MARY to the SQL Login list. Mary connects to SQL server & usesmy App justfine.

The problem is I can not Add MYDOMAIN\JOE as a local user on STAR because STAR is a WORKGROUP PC.

Is there a work around? How do I get JOE (a domain pc)to run my App which accesses AddressBk db on STAR which is a Workgroup pc?

==========================================

I did the 6 Steps to Troubleshoot SQL connectivity as follows:

Step 1: I canPING -a STAR andPING -a 192.168.0.7 and both return STAR and a correct IP address.

Step 2: I've used SQL Server Configuration Manager to turn on all three protocols Shared Memory, Named Pipes & TCPIP

Step 3: I turned off the firewall on STAR

Step 4:If I try to use SQL Server Managment Studio Express (running on JOE)to connect to "STAR\sqlexpress", I get the error "Cannot Generate SSPI Context. (Microsoft SQL Server)."

Step 5: it's not an Application error since Mary can connect just fine.

Step 6: Authentication and Logon issue. This appears to be the issue... How do I get JOE (a domain pc)to run my App which accesses AddressBk db on STAR which is a Workgroup pc?

==========================================


Thank you for any help.

Joe A.

November 23rd, 2008 7:43pm

Windows authentication across computer is only possible in a domain. A workgroup netwrk cannot guarantee for the identity of the connecting user. You will have to use SQL Server authentication instead.

Jens K. Suessmeyer

Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2008 8:08pm

Jens,

Would it help if I added a Domain Controler to my home network? It would have to be a different Domain from my work laptop. Thus STAR would have a Domain, but it would be a different Domain than JOE.

Does adding a Domain to my home network solve my problem?

Joe

November 23rd, 2008 9:39pm

WHen then you would have to establish a domain trust between the domains, which get the system more complicated. The problem is that when using Windows authentication, SQL Server must ensure that the used login is valid und is guranteed not to be tampered, this is only done through the security ecosystem of a domain.

Jens K. Suessmeyer

Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2008 11:56pm

There are two methods documented here: 

https://www.mssqltips.com/sqlservertip/3250/connect-to-sql-servers-in-another-domain-using-windows-authentication/

August 11th, 2015 12:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics