I have several servers with SQL Server 2008 R2 instances on them, and alias doesn't work on any of them.
我有几个服务器上有SQL Server 2008 R2实例,别名不适用于任何服务器。
Clients connect to these servers using TCP/IP without any problem, telnet works on IP/Port I use for my alias, the firewall exceptions are created, basically everything works fine, except when I create an alias, I can not connect through it to my server using either TCP/IP or named pipes (local or one of other servers).
客户端使用TCP / IP连接到这些服务器没有任何问题,telnet工作在IP /端口我用于我的别名,防火墙异常被创建,基本上一切正常,除非我创建别名,我无法通过它连接到我的服务器使用TCP / IP或命名管道(本地或其他服务器之一)。
I've installed latest cumulative updates, which updates native client too (which I think is the source of problem) and I still have the problem. The stranger part is, if I create an alias on a server with sql server 2005 (native client 9), I can connect to my 2008 r2 instances. Any suggestions?
我已经安装了最新的累积更新,它也更新了本机客户端(我认为这是问题的根源),我仍然有问题。更奇怪的是,如果我在带有sql server 2005(本机客户端9)的服务器上创建别名,我可以连接到我的2008 r2实例。有什么建议么?
9 个解决方案
#1
22
After you are sure, that it's not firewall problem, TCP/IP problem, and you can connect to server regularly without using alias and only have a problem to connect with alias, I have this problem on Vista and Windows 7.
在您确定之后,这不是防火墙问题,TCP / IP问题,并且您可以定期连接到服务器而不使用别名,并且只有连接别名的问题,我在Vista和Windows 7上遇到此问题。
Solution is to set up proper port inside of "SQL Server Network Configuration" inside "SQL Server Configuration Manager".
解决方案是在“SQL Server配置管理器”内的“SQL Server网络配置”中设置适当的端口。
Here are the steps:
以下是步骤:
Go to Computer Management -> Service and Application -> SQL Server Configuration Manager -> SQL Server Network Configuration
转到计算机管理 - >服务和应用程序 - > SQL Server配置管理器 - > SQL Server网络配置
Notice that you can also open directly SQL Server Configuration Manager (not from Computer management)
请注意,您也可以直接打开SQL Server配置管理器(而不是从计算机管理)
Then in SQL Server Network Configuration, if it is not already enabled, enable TCP/IP protocol.
然后在SQL Server网络配置中,如果尚未启用,则启用TCP / IP协议。
Right click to open properties of TCP/IP protocol
右键单击以打开TCP / IP协议的属性
Then on IP Adresses Tab you will have couple of records.
然后在IP地址选项卡上,您将有几个记录。
For every one put TCP Port = 1433
对于每一个放TCP Port = 1433
If you use x64 operating system, you have two "SQL Server Network Configuration" nodes, one for 32bit and the other for 64bit. Be sure that you have checked those port on both of them.
如果使用x64操作系统,则有两个“SQL Server网络配置”节点,一个用于32位,另一个用于64位。确保您已经检查了这两个端口。
Good luck
祝你好运
#2
6
For me it was the sequence of creating the aliases that was important. See this link: W2K8 R2 SQL Alias will not connect I started by deleting everything, CliConfig aliases and Configuration Manager Native Client config aliases. Then re-create, adding the CLICONFG version first.
对我来说,创建重要的别名的顺序。看到这个链接:W2K8 R2 SQL别名将无法连接我开始删除所有内容,CliConfig别名和Configuration Manager Native Client配置别名。然后重新创建,首先添加CLICONFG版本。
-
run CLICONFG - create your TCP alias (will default to the x64 version if you're on a 64-bit O/S)
运行CLICONFG - 创建TCP别名(如果您使用的是64位O / S,则默认为x64版本)
-
From SQL Server Configuration Manager create the alias under "SQL Native Client 10.0 configuration"
从SQL Server配置管理器创建“SQL Native Client 10.0配置”下的别名
Try to connect using SSMS - it worked for me. If it doesn't you could go on to try the 32-bit set-up. I did this anyway as the application I'm developing which uses the alias is x86.
尝试使用SSMS连接 - 它对我有用。如果没有,你可以继续尝试32位设置。无论如何我做了这个,因为我正在开发的使用别名的应用程序是x86。
- %SystemRoot%/SysWow64/CliConfg.exe (32-bit version on 64-bit O/S)
- %SystemRoot%/ SysWow64 / CliConfg.exe(64位O / S上的32位版本)
- "SQL Native Client 10.0 Configuration (32bit)" under the configuration manager tool.
- 配置管理器工具下的“SQL Native Client 10.0配置(32位)”。
#3
6
For me, the answer was to use the 32-bit CLICONFG. Both Management Studio and the application I was trying to install were 32-bit applications on a 64-bit server. Moral of the story is to create both 64-bit and 32-bit aliases.
对我来说,答案是使用32位CLICONFG。 Management Studio和我尝试安装的应用程序都是64位服务器上的32位应用程序。故事的寓意是创建64位和32位别名。
#4
2
Are you using named instances? And if so have you checked that the port is statically assigned?
你在使用命名实例吗?如果是这样,你检查了端口是静态分配的吗?
If you are using default instances are you running on a x64 platform? There are aliases for 32bit and 64bit so SSMS on the same box as the database engine would use the alias under the 32 bit section even though the box is 64bit
如果您使用的是默认实例,那么您是否在x64平台上运行?有32位和64位的别名所以SSMS在同一个盒子上,因为数据库引擎会使用32位部分下的别名,即使该盒子是64位
#5
1
Try it with the IP address, like 127.0.0.1 instead of your machine name, localhost or .(dot).
尝试使用IP地址,如127.0.0.1而不是您的机器名,localhost或。(点)。
#6
0
Did you get any of the problems specified this link? http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/ If so, follow and try to resolve it
您是否收到此链接指定的任何问题? http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of- sql-server /如果有,请按照并尝试解决它
#7
0
Also, check that your alias uses listeners that are enabled (is your alias configured to use TCP while your server is only listening via Shared Memory?)
另外,检查您的别名是否使用了已启用的侦听器(您的别名是否配置为使用TCP,而您的服务器仅通过共享内存进行侦听?)
#8
0
For me this was caused by me creating the alias on a 64 bit machine but the software running as a 32 bit application.
对我来说,这是由于我在64位机器上创建别名但软件作为32位应用程序运行而引起的。
When in Sql Server Configuration Manager ensure the alias is set under both the following sections:
在Sql Server配置管理器中确保在以下两个部分下设置别名:
- SQL Native Client {VersionNo} Configuration
- SQL Native Client {VersionNo}配置
- SQL Native Client {versionNo} Configuration (32bit)
- SQL Native Client {versionNo}配置(32位)
That way it will be available regardless of processor platform. Of course if you only want the alias available for one platform for some reason, set the appropriate one and not the other.
这样,无论处理器平台如何,它都可用。当然,如果您出于某种原因只想为一个平台提供别名,请设置适当的别名,而不是另一个。
#9
0
In my case it only worked when I placed the port on the connection [server]\[instance],[port]. Example: DBSERVER\OPERATIONS,1433
在我的情况下,它只在我将端口放在连接[服务器] \ [实例],[端口]上时才有效。示例:DBSERVER \ OPERATIONS,1433
#1
22
After you are sure, that it's not firewall problem, TCP/IP problem, and you can connect to server regularly without using alias and only have a problem to connect with alias, I have this problem on Vista and Windows 7.
在您确定之后,这不是防火墙问题,TCP / IP问题,并且您可以定期连接到服务器而不使用别名,并且只有连接别名的问题,我在Vista和Windows 7上遇到此问题。
Solution is to set up proper port inside of "SQL Server Network Configuration" inside "SQL Server Configuration Manager".
解决方案是在“SQL Server配置管理器”内的“SQL Server网络配置”中设置适当的端口。
Here are the steps:
以下是步骤:
Go to Computer Management -> Service and Application -> SQL Server Configuration Manager -> SQL Server Network Configuration
转到计算机管理 - >服务和应用程序 - > SQL Server配置管理器 - > SQL Server网络配置
Notice that you can also open directly SQL Server Configuration Manager (not from Computer management)
请注意,您也可以直接打开SQL Server配置管理器(而不是从计算机管理)
Then in SQL Server Network Configuration, if it is not already enabled, enable TCP/IP protocol.
然后在SQL Server网络配置中,如果尚未启用,则启用TCP / IP协议。
Right click to open properties of TCP/IP protocol
右键单击以打开TCP / IP协议的属性
Then on IP Adresses Tab you will have couple of records.
然后在IP地址选项卡上,您将有几个记录。
For every one put TCP Port = 1433
对于每一个放TCP Port = 1433
If you use x64 operating system, you have two "SQL Server Network Configuration" nodes, one for 32bit and the other for 64bit. Be sure that you have checked those port on both of them.
如果使用x64操作系统,则有两个“SQL Server网络配置”节点,一个用于32位,另一个用于64位。确保您已经检查了这两个端口。
Good luck
祝你好运
#2
6
For me it was the sequence of creating the aliases that was important. See this link: W2K8 R2 SQL Alias will not connect I started by deleting everything, CliConfig aliases and Configuration Manager Native Client config aliases. Then re-create, adding the CLICONFG version first.
对我来说,创建重要的别名的顺序。看到这个链接:W2K8 R2 SQL别名将无法连接我开始删除所有内容,CliConfig别名和Configuration Manager Native Client配置别名。然后重新创建,首先添加CLICONFG版本。
-
run CLICONFG - create your TCP alias (will default to the x64 version if you're on a 64-bit O/S)
运行CLICONFG - 创建TCP别名(如果您使用的是64位O / S,则默认为x64版本)
-
From SQL Server Configuration Manager create the alias under "SQL Native Client 10.0 configuration"
从SQL Server配置管理器创建“SQL Native Client 10.0配置”下的别名
Try to connect using SSMS - it worked for me. If it doesn't you could go on to try the 32-bit set-up. I did this anyway as the application I'm developing which uses the alias is x86.
尝试使用SSMS连接 - 它对我有用。如果没有,你可以继续尝试32位设置。无论如何我做了这个,因为我正在开发的使用别名的应用程序是x86。
- %SystemRoot%/SysWow64/CliConfg.exe (32-bit version on 64-bit O/S)
- %SystemRoot%/ SysWow64 / CliConfg.exe(64位O / S上的32位版本)
- "SQL Native Client 10.0 Configuration (32bit)" under the configuration manager tool.
- 配置管理器工具下的“SQL Native Client 10.0配置(32位)”。
#3
6
For me, the answer was to use the 32-bit CLICONFG. Both Management Studio and the application I was trying to install were 32-bit applications on a 64-bit server. Moral of the story is to create both 64-bit and 32-bit aliases.
对我来说,答案是使用32位CLICONFG。 Management Studio和我尝试安装的应用程序都是64位服务器上的32位应用程序。故事的寓意是创建64位和32位别名。
#4
2
Are you using named instances? And if so have you checked that the port is statically assigned?
你在使用命名实例吗?如果是这样,你检查了端口是静态分配的吗?
If you are using default instances are you running on a x64 platform? There are aliases for 32bit and 64bit so SSMS on the same box as the database engine would use the alias under the 32 bit section even though the box is 64bit
如果您使用的是默认实例,那么您是否在x64平台上运行?有32位和64位的别名所以SSMS在同一个盒子上,因为数据库引擎会使用32位部分下的别名,即使该盒子是64位
#5
1
Try it with the IP address, like 127.0.0.1 instead of your machine name, localhost or .(dot).
尝试使用IP地址,如127.0.0.1而不是您的机器名,localhost或。(点)。
#6
0
Did you get any of the problems specified this link? http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/ If so, follow and try to resolve it
您是否收到此链接指定的任何问题? http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of- sql-server /如果有,请按照并尝试解决它
#7
0
Also, check that your alias uses listeners that are enabled (is your alias configured to use TCP while your server is only listening via Shared Memory?)
另外,检查您的别名是否使用了已启用的侦听器(您的别名是否配置为使用TCP,而您的服务器仅通过共享内存进行侦听?)
#8
0
For me this was caused by me creating the alias on a 64 bit machine but the software running as a 32 bit application.
对我来说,这是由于我在64位机器上创建别名但软件作为32位应用程序运行而引起的。
When in Sql Server Configuration Manager ensure the alias is set under both the following sections:
在Sql Server配置管理器中确保在以下两个部分下设置别名:
- SQL Native Client {VersionNo} Configuration
- SQL Native Client {VersionNo}配置
- SQL Native Client {versionNo} Configuration (32bit)
- SQL Native Client {versionNo}配置(32位)
That way it will be available regardless of processor platform. Of course if you only want the alias available for one platform for some reason, set the appropriate one and not the other.
这样,无论处理器平台如何,它都可用。当然,如果您出于某种原因只想为一个平台提供别名,请设置适当的别名,而不是另一个。
#9
0
In my case it only worked when I placed the port on the connection [server]\[instance],[port]. Example: DBSERVER\OPERATIONS,1433
在我的情况下,它只在我将端口放在连接[服务器] \ [实例],[端口]上时才有效。示例:DBSERVER \ OPERATIONS,1433