Tuesday, February 14, 2012

Connect via workgroup

I am trying to connect to an SQL Server using a vb.net program. It works if
I put it on the SQL Server computer, but will not connect over my local
network that is set up as a workgroup. I get the following message:
Login failed for user 'DELL4100\Guest'
DELL4100 is the computer name where the sql server is on.
The connection string is:
Data Source=dell4100;Database=dbname;User ID=dbn;Password=password;
I have also tried Integrated Security=SSPI; instead of the User ID &
Password.
I do not know why it is using Guest instead of the User ID that I specified.
So, I created a Login name in the SQL Server called Guest with no password.
I also activated the Guest account in XP for both machines. Still the same
message.
I created accounts for dbn on both computers and gave them the same
password. I logged in under dsn and ran the program, but I still get the
same error.
I turned off the Windows firewall on both computers. I can share files and
printers between computers, just not access the SQL Server.
Can anyone help?
Thanks
Tim
You don't mention the editions of the operating systems
involved. With XP home, authentication is done using the
guest account as simple file sharing is always enabled on XP
Home. You could hit the issue with XP Pro if simple file
sharing is used. How you address the issue depends somewhat
on what specific operating systems are involved. Refer to
the following for more info:
SQL Server clients are authenticated as guests if Simple
File Sharing is enabled
http://support.microsoft.com/?id=831133
That's one of the issues...
For a connection string, you supply the user and password if
you are using SQL authentication. You use Integrated
Security=SSPI if you want to connect using Windows
Authentication. That's the purpose of switching those
around.
Then...if you want to use Windows Authentication, you aren't
in a domain so credentials aren't passed. You need to have
the same windows accounts with the same passwords on both
boxes.
-Sue
On Fri, 3 Nov 2006 13:16:38 -0700, ".netnew"
<vbopen@.yahoo.com> wrote:

>I am trying to connect to an SQL Server using a vb.net program. It works if
>I put it on the SQL Server computer, but will not connect over my local
>network that is set up as a workgroup. I get the following message:
>Login failed for user 'DELL4100\Guest'
>DELL4100 is the computer name where the sql server is on.
>The connection string is:
>Data Source=dell4100;Database=dbname;User ID=dbn;Password=password;
>I have also tried Integrated Security=SSPI; instead of the User ID &
>Password.
>I do not know why it is using Guest instead of the User ID that I specified.
>So, I created a Login name in the SQL Server called Guest with no password.
>I also activated the Guest account in XP for both machines. Still the same
>message.
>I created accounts for dbn on both computers and gave them the same
>password. I logged in under dsn and ran the program, but I still get the
>same error.
>I turned off the Windows firewall on both computers. I can share files and
>printers between computers, just not access the SQL Server.
>Can anyone help?
>Thanks
>Tim
>
>
>
|||Thanks for the reply.
The SQL Server is on XP pro and the workstation is XP Home. Reading the link
you provided, it seems my problem is related to the Simple File Sharing only
being able to log in as Guest. While this article describes the problem and
causes, it doesn't say if there is a solution.
Is there a way for XP Home to access SQL Server databases?
Tim
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:089ok2tpemql016he2abrvgatopltrij76@.4ax.com...
> You don't mention the editions of the operating systems
> involved. With XP home, authentication is done using the
> guest account as simple file sharing is always enabled on XP
> Home. You could hit the issue with XP Pro if simple file
> sharing is used. How you address the issue depends somewhat
> on what specific operating systems are involved. Refer to
> the following for more info:
> SQL Server clients are authenticated as guests if Simple
> File Sharing is enabled
> http://support.microsoft.com/?id=831133
> That's one of the issues...
> For a connection string, you supply the user and password if
> you are using SQL authentication. You use Integrated
> Security=SSPI if you want to connect using Windows
> Authentication. That's the purpose of switching those
> around.
> Then...if you want to use Windows Authentication, you aren't
> in a domain so credentials aren't passed. You need to have
> the same windows accounts with the same passwords on both
> boxes.
> -Sue
> On Fri, 3 Nov 2006 13:16:38 -0700, ".netnew"
> <vbopen@.yahoo.com> wrote:
>
|||Try using SQL authentication instead. Otherwise you need to
enable the guest account which isn't a good idea.
-Sue
On Sun, 5 Nov 2006 15:36:20 -0700, ".netnew"
<vbopen@.yahoo.com> wrote:

>Thanks for the reply.
>The SQL Server is on XP pro and the workstation is XP Home. Reading the link
>you provided, it seems my problem is related to the Simple File Sharing only
>being able to log in as Guest. While this article describes the problem and
>causes, it doesn't say if there is a solution.
>Is there a way for XP Home to access SQL Server databases?
>Tim
>
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
>news:089ok2tpemql016he2abrvgatopltrij76@.4ax.com.. .
>

No comments:

Post a Comment