SQL Server “.” Alias Not Working

2020-06-09 03:26发布

I've added an alias of "." which should point to my local (named) instance, ".\SQL2008". But when I try to connect to ".", it times out.

Am I missing something or is this not allowed?

"." Alias Not Working

Timeout

Aliases I've tried which do not work:

(Set for both 32 and 64-bit, I've also tried leaving the port blank.)

Aliases which do not work.

7条回答
男人必须洒脱
2楼-- · 2020-06-09 04:07

you need to run "cliconfg" and setup the alias on your local machine as well. If you have SSMS installed, create the alias in SQL Config Mgr, as this take precedance over the ones set in cliconfg. Remember, SSMS uses 32bit connection to SQL Server, even if is 64bit. If you don't set them locally, how does your PC know where to go for the alias. You could create DNS entries as an alternative.

查看更多
混吃等死
3楼-- · 2020-06-09 04:08

It was not working for me after applied all the options mentioned here. For me, port number to TCP/IP protocol was not assign.

enter image description here

After assigning (highlighted in yellow color) it started working for me.

查看更多
Explosion°爆炸
4楼-- · 2020-06-09 04:16

I have a similar issue ,however on SQL server I did create alias on 32bit and 64 bit.I did the same thing on Sharepoint server using CliConfg. In short, for 64 bits Windows operating systems run: C:\windows\syswow64\cliconfg.exe For 32 bits Windows operating systems run: C:\windows\system32\cliconfg.exe on all server which you need to access to your database. Please see great article below. https://knowledge.zomers.eu/SharePoint/Pages/How-to-create-a-SQL-Alias-to-use-with-SharePoint.aspx

查看更多
Evening l夕情丶
5楼-- · 2020-06-09 04:19

There is no limitation preventing that alias name. At leas it works on my machine ;)

However, when setting up the alias make sure you create it in the 32 as well as the 64 bit area:

enter image description here

I did also spell out localhost instead of just using the .:

enter image description here

Also, a SQL Server Alias always uses TCP/IP as connection protocol, which is not enabled by default. Under SQL Server Network Configuration (see above screen shot) check that TCP/IP is enabled for your instance.

查看更多
看我几分像从前
6楼-- · 2020-06-09 04:21

Also make sure the selected protocol for alias (e.g. TCP/IP) is enabled under SQL Server Network Configuration / Protocols for YOUR SERVER NAME

This was the issue in my case.

查看更多
一纸荒年 Trace。
7楼-- · 2020-06-09 04:25

In your Alias definition remove the .\ from the Server box leaving just your instance name, that works on my machine. So in your case the dialog should look like this:

enter image description here

查看更多
登录 后发表回答