By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

Connection String question

P: n/a
I am using SQL MSDE edition due to financial reasons (it's free). I have a
question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have to
use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue but
it is kind of annoying me and I would like to know why it is.

Thanks
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"William" <no**@none.com> wrote in message
news:3f***********@bignews4.bellsouth.net...
I am using SQL MSDE edition due to financial reasons (it's free). I have a question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have to
use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue but it is kind of annoying me and I would like to know why it is.


You may have network protocols disabled for your MSDE installation (that's
the default). As such, localhost will fail because that will be turned into
an IP address and a TCP/IP connection to MSDE will be attempted. (local), on
the other hand, uses named pipes, I believe.

I could be wrong. You'd probably be better off asking in
microsoft.public.sqlserver.msde.
Nov 20 '05 #2

P: n/a
I think I ran into this issue when I did a clean install of MSDE with SP3a.
SP3a disables some network stuff by default (it does not do this during an
upgrade).

I think this deals with subject from the SP3a readme:

3.7.2 Security Considerations for MSDE 2000 SP3a
The following information applies only to Desktop Engine (MSDE 2000).

The behavior of MSDE 2000 setup has been changed in SP3a so that the default
settings result in a more secure configuration.

Desktop Engine SP3a changes the default behavior of the
DISABLENETWORKPROTOCOLS setup parameter that specifies the configuration of
the network connection support for an instance of MSDE 2000. If no
application running on another computer will connect to your instance of
MSDE 2000, the instance has no need for network support and it is prudent to
turn off a resource that is not being used. SP3a will turn off the network
support by default when installing new instances of MSDE 2000. If you
disable the network support when installing an instance of MSDE 2000 SP3a,
you can later reconfigure the instance to enable the support. For more
information about disabling and restoring network access, see Microsoft
Knowledge Base article 814130.
Not sure how that all relates (if at all), but I now just use (local) and
not localhost for everything. It seems to be less problematic for me.

Greg

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

"William" <no**@none.com> wrote in message
news:3f***********@bignews4.bellsouth.net...
I am using SQL MSDE edition due to financial reasons (it's free). I have
a
question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have
to use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue

but
it is kind of annoying me and I would like to know why it is.


You may have network protocols disabled for your MSDE installation (that's
the default). As such, localhost will fail because that will be turned

into an IP address and a TCP/IP connection to MSDE will be attempted. (local), on the other hand, uses named pipes, I believe.

I could be wrong. You'd probably be better off asking in
microsoft.public.sqlserver.msde.

Nov 20 '05 #3

P: n/a

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I think I ran into this issue when I did a clean install of MSDE with SP3a. SP3a disables some network stuff by default (it does not do this during an
upgrade).


You're right. 99% of the MSDE installs I've done have been clean installs
and SP3a. I forgot that this was not always the behavior.
Nov 20 '05 #4

P: n/a
On Wed, 28 Jul 2004 09:55:05 -0400, "William" <no**@none.com> wrote:

I am using SQL MSDE edition due to financial reasons (it's free). I have a
question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have to
use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue but
it is kind of annoying me and I would like to know why it is.

Never used localhost unless if was for a local web server address. The (local) data source should be
appropriate.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.