Wednesday, March 7, 2012

Connecting to a local database

Hi,
My problem is I have an app that uses MSDE 2000. After the install, it
asks for the name of the local database instance where you would like to
install the app. It only gives me one option, 'localhost'. I can use an
OLEDB provider to specify the actual server name but I cannot connect using
localhost. Why is this happening? I am unable to install the app using the
server name.
Thanks in advance.
JHi
In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'localhost' is a TCP/IP alias for 127.0.0.1
Regards
Mike
"JD" wrote:

> Hi,
> My problem is I have an app that uses MSDE 2000. After the install, it
> asks for the name of the local database instance where you would like to
> install the app. It only gives me one option, 'localhost'. I can use an
> OLEDB provider to specify the actual server name but I cannot connect usin
g
> localhost. Why is this happening? I am unable to install the app using the
> server name.
> Thanks in advance.
> J
>
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:39B7B3AA-68F6-4465-8EAE-F366069A427C@.microsoft.com...
> Hi
> In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'(local)' is valid, 'local' would only be valid is if it was created as an
alias for a valid name, using CLICONFG.EXE, or the system name happened to
be 'local'.

> 'localhost' is a TCP/IP alias for 127.0.0.1
Oddly enough, if TCP/IP is a configured protocol for the installation, SQL
Server listens to the loopback, so 'localhost' is every bit as valid as an
IP, or any other DNS name that resolves to the box in question...
However... none of it will be valid if it's a named instance, in which case
you must use the server\instance notation, as either the server name or in
an alias definition.
So if the app is hardcoded to use the servername 'localhost' (which would be
terrible design, btw) you can use CLICONFG.EXE to define 'localhost' as an
alias for server\instance... and it might even work. :-)
-Mark
[vbcol=seagreen]
> Regards
> Mike
> "JD" wrote:
>

No comments:

Post a Comment