Monday, February 13, 2012

Arghhhh Alias (local)\FOOBAR -> TCP/IP,ditto

I've just spent days trying to get no-network protocol access to a local
(MSDE )database working. Everything I tried failed, all hints from the
documentation failed.
Eventually...I found cliconfg.exe and found out about Aliases and found the
stupid alias I referred to in the subject line, i.e.
(local)\FOOBAR -> DBMSSOCN,(local)\FOOBAR
No wonder things didn't work when I removed TCP/IP from the server's
protocol set!
So:
1. Why do none of the utilities report the existense of this Alias. Not
osql when I connect, no "using alias" line.
I would like it to say "Using Alias" if it was, e.g.
C:\>osql -S (local)\FOOBAR -U sa
Password:
Using Alias.
[TCP/IP Sockets]Specified SQL server not found.
[TCP/IP Sockets]ConnectionOpen (Connect()).
C:\>
Not from "osql -L", though perhaps the existence of multiple lines of output
was a hint.
Nor when using odbcad32. It does not show that Aliases exist at all; it
does not show the Alias panel. In its "Client Configuration" window, it
uses the term "Server alias", but that's not the same thing I think...it's
just a hold-over from that dialog's use in cliconfg.exe? It certainly does
not show cliconfg.exe's Aliases panel and no alias is created when I try
putting things in there now.
2. Why does none of the documentation mention anything about this?
There's very little mention of aliases at all.
In troubleshooting sections, there's no mention of the possibility of an
alias making the system lie to you.
There's little mention of the client network configuration utility. And
particularly no mention of where it is located and what it is called. I
don't know where I found out is was called cliconfg.exe and it was in
system32. I don't know where I found this, maybe I even in the end
did a search for "cli" on my hard-disk.
3. How did that alias get created?
Was it created by the people who provided the installer for the database'
If so, they better beware. Was it created by some automatic step in using
the database' I certainly didn't create it intentionally and no-one else
has access to my machine.
So just a long complaint really. But hopefully of use to someone. Maybe
even the docuemntation could be improved based on it... :-)
BTW. I'm never really sure of what Power Users can and cannot do, but...
The registry permissions allow a Power User to change aliases. Can power
users normally make such globally significant changes?
--
Alan J. McFarlane
http://homepage.ntlworld.com/alanjmcf/
Please follow-up in the newsgroup for the benefit of all.The client network utilities and other GUI utilities don't ship with MSDE.
Client aliases have been around since SQL 4.2.
SQLDiag.exe will report that aliases are configured on the server as well.
aliases are stored in the registry on the client machine.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\Client\ConnectTo
Q. Why does none of the documentation mention anything about this?
Answer:
See: Books Online: Configuring Client Net-Libraries
There are lots of articles that discuss the use of aliases to connect.
328383 INF: SQL Server Clients May Change Protocols When They Try to Connect
http://support.microsoft.com/?id=328383
265808 INF: How to Connect to an SQL Server 2000 Named Instance with the
http://support.microsoft.com/?id=265808
Q. How did that alias get created?
Answer: SQL setup and MDAC setup don't create any aliases. They are
created by the user. Either using SQL Client network Utility, or creating
a ODBC DSN and using the Client Configuration Button.
With MSDE, you also have the option of having it only listen on Shared
Memory. This would only allow local connections to succeed.
This is documented in the sp3 readme as well as the following article.
814130 INF: How to Secure Network Connectivity for SQL Server 2000 Local
http://support.microsoft.com/?id=814130
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

No comments:

Post a Comment