Issue:
======
CRM works fine, but if I'm trying to export a dynamic worksheet I get an sql error: Connection failed, SQLState: 28000, SQL Server Error: 18456: Login failed for user xy. This error comes on a windows server 2008.
On windows server 2008 r2: SQLState: 01000, SQL Server Error: 10060 Connection failed. Then a second SQLState: 08001, SQL Server Error: 17 SQL Server does not exist or access denied.
Both environments are in the same domain and I tried with several user. Everytime the same. Data Connector is installed on both machines. Both machines are single servers (crm+sql on the same machine).
Cause:
=======
Firewall is not going to allow the connection on Port
Solution:
========
How do I open the firewall port for SQL Server on Windows Server 2008?Windows Firewall on Windows Server 2008 helps prevent unauthorized access to computer resources. However, if the firewall is configured incorrectly, attempts to connect to an instance of SQL Server may be blocked. To access an instance of SQL Server that is behind the firewall, you must configure the firewall on the computer that is running SQL Server.
This article helps you open the firewall ports for SQL Server on Windows Server 2008.
To have us fix this problem for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.
To fix this problem automatically, click the Fix this problem link. Click Run in the File Download dialog box, and then follow the steps in this wizard.
Note this wizard may be in English only; however, the automatic fix also works for other language versions of Windows.
Note if you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.
The script that is discussed in this section opens the firewall ports for SQL Server.
To create the script, follow these steps:
- Start Notepad.
- Copy and paste the following code into Notepad:
@echo ========= SQL Server Ports =================== @echo Enabling SQLServer default instance port 1433 netsh firewall set portopening TCP 1433 "SQLServer" @echo Enabling Dedicated Admin Connection port 1434 netsh firewall set portopening TCP 1434 "SQL Admin Connection" @echo Enabling conventional SQL Server Service Broker port 4022 netsh firewall set portopening TCP 4022 "SQL Service Broker" @echo Enabling Transact-SQL Debugger/RPC port 135 netsh firewall set portopening TCP 135 "SQL Debugger/RPC" @echo ========= Analysis Services Ports ============== @echo Enabling SSAS Default Instance port 2383 netsh firewall set portopening TCP 2383 "Analysis Services" @echo Enabling SQL Server Browser Service port 2382 netsh firewall set portopening TCP 2382 "SQL Browser" @echo ========= Misc Applications ============== @echo Enabling HTTP port 80 netsh firewall set portopening TCP 80 "HTTP" @echo Enabling SSL port 443 netsh firewall set portopening TCP 443 "SSL" @echo Enabling port for SQL Server Browser Service's 'Browse' Button netsh firewall set portopening UDP 1434 "SQL Browser" @echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK) netsh firewall set multicastbroadcastresponse ENABLE
- Save the file as a .txt file by using the following name: OpenSqlServerPort.txt
- Rename the OpenSqlServerPort.txt file to the following: OpenSqlServerPort.bat
Before you run the OpenSqlServerPort.bat script, you must copy the script to the computer which has the firewall and then run the script on that computer. To run the script, follow these steps:
- Click Start, click Run, type cmd, and then click OK.
- At the command prompt, use the cd command to navigate to the folder in which you saved the OpenSqlServerPort.bat file.
- To run the OpenSqlServerPort.bat script, type OpenSqlServerPort.bat at the command prompt, and then press ENTER.