Showing posts with label workgroup. Show all posts
Showing posts with label workgroup. Show all posts

Monday, March 19, 2012

Connecting to MDF file over Workgroup

Hi

I've build a client management (Windows) application in VS2005 which works fine on the local development machine but falls over when trying to connect to the SQL Server Express file located on a second machine on the same Workgroup. Several of the apllications will connect to the database file from networked computers.

The error I get when testing the connection or trying to connect via the App is:

-------------------
The file "Z:\BushBreaks.MDF" is on a network path that is not supported for database files.
An attempt to attach and auto-named database for file z:\bushbreaks.mdf failed. A database with the same name exists, or specified file cannot be opened or it is on a UNC share.
-------------------

How can I configure this database and/or connection to be able to allow connections to the MDF file? Please note that security is not an issue if that is at all relevant.

Many Thanks
John

Current you can't use remote database file in your SQL connection. Here is a instruction about AttachDBFileName property in connection string from MSDN:

The name of the primary database file, including the full path name of an attachable database. The path may be absolute or relative by using the DataDirectory substitution string. If DataDirectory is used, the database file must exist within a subdirectory of the directory pointed to by the substitution string.

Note:

Remote server, HTTP, and UNC path names are not supported.

For more information, you can refer to:

http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

Thursday, March 8, 2012

Connecting to an SQL Server using a workgroup

I am trying to 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
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

TimSomehow my message got mangled. I was editing the message and the time limit expired.

I wanted to add that the SQL Server is on an XP pro sp2 machine and that tcp/ip and Names Pipes are enabled and that it is listening on port 1433.|||I have the same issue, is there already an solution ?|||Try to create DSN to the server on your computer. If it doesn't work then it is not your code is a problem.
It is my only guess your SQL drivers are corrupt.|||I have the same question too. I just had to reinstall SQL server on a lab server that crashed, used to have a 'domain' windows 2003 setup but for some reason was set up as a peer-to-peer workgroup. Old way was to create sqlserver logins like: Workstation1\JoeDoe... now it says that is not a legal login, and I can;t 'find' anything but the server name? (I can otherwise access shared files between machines, etc.) . Is there some sql server issue with peer-to-peer networks?

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.. .
>

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
TimYou 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 lin
k
>you provided, it seems my problem is related to the Simple File Sharing onl
y
>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...
>

Sunday, February 12, 2012

Connect to SQL Server from Workgroup Computer

I have been using Windows XP SP 2 and SQL Server 2000 Developer's edition on
one computer and it has worked fine. For testing, I've installed Query
Analyzer on a 2nd, workgroup computer. I know the network itself is
working. Files and printers are shared and working.
The problem is that ODBC and Query Analyzer on computer 2 cannot connect to
the SQL Server on computer 1.
The message returned is "SQL Server does not exist or access denied".
I suspect SQL Server is not hearing the connection request.
The user name I am using (Windows authentication) is MST, and this name has
a login ( COMP!\MST). When I try to login from computer2, I suppose the
login is COMP2\MST ? At any rate, I cannot add this login to SQL server.
Using SQL authentication, I can log in on computer 1 via Query Analyzer with
a different user name and password, but I receive the message above when I
try to log in via QA from computer 2.
Can anyone point me in the right direction to solving this?
Thanks
Mike Thomas
Solved this one myself, but it does not make much sense.
On the client computer, I opened Client Network Utility and in the Alias >
Edit tab changed the name of the 'Server Alias' to something different from
the 'Server Name'. Now, I can at least connect using SQL Authetication.
Next hurdle is Windows authentication.
Mike Thomas
"Mike Thomas" <mike@.ease.com> wrote in message
news:%23JP%23NjbFFHA.2052@.TK2MSFTNGP09.phx.gbl...
>I have been using Windows XP SP 2 and SQL Server 2000 Developer's edition
>on one computer and it has worked fine. For testing, I've installed Query
>Analyzer on a 2nd, workgroup computer. I know the network itself is
>working. Files and printers are shared and working.
> The problem is that ODBC and Query Analyzer on computer 2 cannot connect
> to the SQL Server on computer 1.
> The message returned is "SQL Server does not exist or access denied".
> I suspect SQL Server is not hearing the connection request.
> The user name I am using (Windows authentication) is MST, and this name
> has a login ( COMP!\MST). When I try to login from computer2, I suppose
> the login is COMP2\MST ? At any rate, I cannot add this login to SQL
> server.
> Using SQL authentication, I can log in on computer 1 via Query Analyzer
> with a different user name and password, but I receive the message above
> when I try to log in via QA from computer 2.
> Can anyone point me in the right direction to solving this?
> Thanks
> Mike Thomas
>

Connect to SQL Server from Workgroup Computer

I have been using Windows XP SP 2 and SQL Server 2000 Developer's edition on
one computer and it has worked fine. For testing, I've installed Query
Analyzer on a 2nd, workgroup computer. I know the network itself is
working. Files and printers are shared and working.
The problem is that ODBC and Query Analyzer on computer 2 cannot connect to
the SQL Server on computer 1.
The message returned is "SQL Server does not exist or access denied".
I suspect SQL Server is not hearing the connection request.
The user name I am using (Windows authentication) is MST, and this name has
a login ( COMP!\MST). When I try to login from computer2, I suppose the
login is COMP2\MST ? At any rate, I cannot add this login to SQL server.
Using SQL authentication, I can log in on computer 1 via Query Analyzer with
a different user name and password, but I receive the message above when I
try to log in via QA from computer 2.
Can anyone point me in the right direction to solving this?
Thanks
Mike ThomasSolved this one myself, but it does not make much sense.
On the client computer, I opened Client Network Utility and in the Alias >
Edit tab changed the name of the 'Server Alias' to something different from
the 'Server Name'. Now, I can at least connect using SQL Authetication.
Next hurdle is Windows authentication.
Mike Thomas
"Mike Thomas" <mike@.ease.com> wrote in message
news:%23JP%23NjbFFHA.2052@.TK2MSFTNGP09.phx.gbl...
>I have been using Windows XP SP 2 and SQL Server 2000 Developer's edition
>on one computer and it has worked fine. For testing, I've installed Query
>Analyzer on a 2nd, workgroup computer. I know the network itself is
>working. Files and printers are shared and working.
> The problem is that ODBC and Query Analyzer on computer 2 cannot connect
> to the SQL Server on computer 1.
> The message returned is "SQL Server does not exist or access denied".
> I suspect SQL Server is not hearing the connection request.
> The user name I am using (Windows authentication) is MST, and this name
> has a login ( COMP!\MST). When I try to login from computer2, I suppose
> the login is COMP2\MST ? At any rate, I cannot add this login to SQL
> server.
> Using SQL authentication, I can log in on computer 1 via Query Analyzer
> with a different user name and password, but I receive the message above
> when I try to log in via QA from computer 2.
> Can anyone point me in the right direction to solving this?
> Thanks
> Mike Thomas
>

Connect to SQL Server from Client Using Windows Authentication

On a newly installed workgroup computer, the client, I've been able to
establish connections to the SQL Server on a different computer using SQL
authentication via ODBC and Query Analyzer.
Now I am trying to figure out how to connect with WIndows authentication.
On the client computer (PCMAX04), when I try to login to SQL Server via QA,
the error reads "Login failed for user DELLJAN2005\Guest" even though I am
logged in to the client computer as MST.
DELLJAN2005 is the name of the SQL Server and the computer on which it is
installed.
In SQL Server, there is a login named "DELLJAN2005\MST".
How can it arrange it so that when I log on from the client computer using
Windows authentication, SQL Server interprets the login as being for "MST"?
Many thanks,
Mike Thomas
You don't mention the specific 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. It's optional but is the default with XP Pro. 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
-Sue
On Fri, 18 Feb 2005 09:38:43 -0500, "Mike Thomas"
<mike@.ease.com> wrote:

>On a newly installed workgroup computer, the client, I've been able to
>establish connections to the SQL Server on a different computer using SQL
>authentication via ODBC and Query Analyzer.
>Now I am trying to figure out how to connect with WIndows authentication.
>On the client computer (PCMAX04), when I try to login to SQL Server via QA,
>the error reads "Login failed for user DELLJAN2005\Guest" even though I am
>logged in to the client computer as MST.
>DELLJAN2005 is the name of the SQL Server and the computer on which it is
>installed.
>In SQL Server, there is a login named "DELLJAN2005\MST".
>How can it arrange it so that when I log on from the client computer using
>Windows authentication, SQL Server interprets the login as being for "MST"?
>Many thanks,
>Mike Thomas
>
>
>
>

Connect to SQL Server from Client Using Windows Authentication

On a newly installed workgroup computer, the client, I've been able to
establish connections to the SQL Server on a different computer using SQL
authentication via ODBC and Query Analyzer.
Now I am trying to figure out how to connect with WIndows authentication.
On the client computer (PCMAX04), when I try to login to SQL Server via QA,
the error reads "Login failed for user DELLJAN2005\Guest" even though I am
logged in to the client computer as MST.
DELLJAN2005 is the name of the SQL Server and the computer on which it is
installed.
In SQL Server, there is a login named "DELLJAN2005\MST".
How can it arrange it so that when I log on from the client computer using
Windows authentication, SQL Server interprets the login as being for "MST"?
Many thanks,
Mike ThomasYou don't mention the specific 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. It's optional but is the default with XP Pro. 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
-Sue
On Fri, 18 Feb 2005 09:38:43 -0500, "Mike Thomas"
<mike@.ease.com> wrote:

>On a newly installed workgroup computer, the client, I've been able to
>establish connections to the SQL Server on a different computer using SQL
>authentication via ODBC and Query Analyzer.
>Now I am trying to figure out how to connect with WIndows authentication.
>On the client computer (PCMAX04), when I try to login to SQL Server via QA,
>the error reads "Login failed for user DELLJAN2005\Guest" even though I am
>logged in to the client computer as MST.
>DELLJAN2005 is the name of the SQL Server and the computer on which it is
>installed.
>In SQL Server, there is a login named "DELLJAN2005\MST".
>How can it arrange it so that when I log on from the client computer using
>Windows authentication, SQL Server interprets the login as being for "MST"?
>Many thanks,
>Mike Thomas
>
>
>
>