Sql server брандмауэр windows предупреждение

I am undertaking this effort to learn SQL as a self-administered educational excerise, on my personal laptop, while between job assignments.

Should I let the Firewall warning go unaddressed until I get to a stage where I actuallu configure a server on my laptap ?

All other Setup Support Rules passed.  The object of the installation is Microsoft® SQL Server® 2008 Express with Advanced Services. 

SQL Server 2008 was said to have been installed with my installation of Web Developer 2008 but, with my attempt to use the SQL Server 2008 Developer Training Kit, the Advanced Services version was shown as a prerequesite.  

I am not a skilled IT professional but am conducting these efforts on my personal laptop for home use.  So, I am unsure what scope of installation I will require in order to gain a good understanding of SQL.

Investigation into the firewall warning led me to «Configuring the Windows Firewall to Allow SQL Server Access» on MSDN.  This help topic basically serves as a further warning against careless firewall modiciations, and provides no «How To …»

Among the other «common prerequisites of the Training Kit, Microsoft SQL Server 2008 AdventureWorks Sample Database remains to be installed, apparently another potentially daunting task, along with these additional requisites (all requied by the SSRS Demo):

MS SQL Server Business Intelligence Developer Studio
MS SQL Server 2008 Reporting Services Samples (AdventureWorks Report Samples)
MS SQL Server 2008 Reporting Services Report Builder 2.0

Then there may be the question of using Crystal Reports instead, if a freeware version is available, due to the possibility of its greater applicability.

logo_sql_2012Если к службе Microsoft SQL Server должны подключаться программы с других компьютеров в сети, то необходимо чтобы правильным образом был настроен Брандмауэр Windows на сервере, где запущена служба. А именно разрешены входящие подключения по определенному порту, используемому компонентой Database Engine SQL Server. О том как узнать, какой порт использует SQL Server, изменить этот порт, а также настроить Брандмауэр Windows читайте в данной статье.

0. Оглавление

  1. Что понадобится
  2. Определение / изменения порта для «экземпляра по умолчанию»
  3. Определение / изменения порта для именованного экземпляра SQL Server
  4. Добавление правила в Брандмауэр Windows

1. Что понадобится

  • Статья будет актуальна для Microsoft SQL Server 2012 и для Microsoft SQL Server 2008 (R2).
  • В качестве операционной системы сервера рассматриваются Microsoft Windows Server 2012 (R2) или Microsoft Windows Server 2008 (R2)

2. Определение / изменения порта для «экземпляра по умолчанию»

По умолчанию SQL Server использует для соединения порт 1433. Чтобы проверить это, запустим оснастку «Диспетчер конфигурации SQL Server» (SQL Server Configuration Manager). В Microsoft Windows Server 2012 (R2) ее можно найти в списке всех программ.

Firewall_Windows_MS_SQL_Server_2012_01

В Microsoft Windows Server 2008 (R2) в меню «Пуск» (Start) — «Microsoft SQL Server 2012» — «Средства настройки» (Configuration Tools) — «Диспетчер конфигурации SQL Server» (SQL Server Configuration Manager)

Firewall_Windows_MS_SQL_Server_2012_02

В запустившейся оснастке раскроем вкладку «Сетевая конфигурация SQL Server» (SQL Server Network Configuration), затем выделим вкладку «Протоколы для MSSQLSERVER» (Protocols for MSSQLSERVER). В окне слева в таблице найдем протокол TCP/IP, кликнем по нему правой кнопкой мыши и в контекстном меню выберем «Свойства» (Properties).

Firewall_Windows_MS_SQL_Server_2012_03

В открывшемся окне свойств перейдем на вкладку «IP-адреса» (IP Addresses), затем найдем и раскроем в дереве настроек ветку «IPAll». Здесь мы видим, что выбранный экземпляр SQL Server использует TCP-порт по умолчанию, а именно порт 1433. Если по каким то причинам требуется использовать другой номер порта, необходимо просто поменять текущее значение, нажать «Применить» (Apply) и перезапустить службу SQL Server.

Firewall_Windows_MS_SQL_Server_2012_04

3. Определение / изменения порта для именованного экземпляра SQL Server

В случае использования именованного экземпляра SQL Server ситуация аналогичная, за тем лишь исключением, что используются динамические TCP-порты. Это значит, что для каждого отдельного экземпляра будет назначен свой номер порта.

Для определения / изменения текущего порта, найдем в оснастке «Диспетчер конфигурации SQL Server» (SQL Server Configuration Manager) вкладку с сетевой конфигурацией необходимого нам экземпляра SQL Server и перейдем в свойства протокола TCP/IP для данного экземпляра. Здесь, как и в предыдущем случае, на вкладке «IP-адреса» (IP Addresses) в ветке «IPAll» можно узнать, а также изменить динамический TCP-порт для текущего экземпляра SQL Server.

Firewall_Windows_MS_SQL_Server_2012_05

4. Добавление правила в Брандмауэр Windows

Теперь, когда мы определились с номером порта, который будет использоваться для подключения к службе SQL Server, создадим разрешающее правило в Брандмауэре Windows на сервере, где запущена служба.

О том, как добавить разрешающее правило для определенного порта в Microsoft Windows Server 2008 (R2) я уже писал здесь. В Windows Server 2012 (R2) действия аналогичны.

Запускаем брандмауэр Windows (Windows Firewall). Сделать это можно кликнув правой кнопкой мыши по «Пуск» (Start), затем «Панель управления» (Control Panel)  — «Система и безопасность» (System and Security) — «Брандмауэр Windows» (Windows Firewall). Или же выполнив команду firewall.cpl (для этого необходимо нажать комбинацию клавиш Win + R, в окне «Отрыть» (Open) ввести имя команды и нажать «ОК» ) .

Firewall_Windows_MS_SQL_Server_2012_06

Далее нажимаем на «Дополнительные параметры» (Advanced Settings) в меню слева.

Firewall_Windows_MS_SQL_Server_2012_07

В открывшемся окне, в дереве слева откроем вкладку «Правила для входящих подключений» (Inbound Rules), а затем в меню «Действия» (Actions) выберем пункт «Создать правило…» (New Rule…).

Firewall_Windows_MS_SQL_Server_2012_08

Запустится «Мастер создания правила для нового входящего подключения» (New Inbound Rule Wizard). На первой странице выберем тип правила (Rule Type) «Для порта» (Port) и нажмем «Далее» (Next).

Firewall_Windows_MS_SQL_Server_2012_09

Затем необходимо указать протокол (в нашем примере это TCP) и, непосредственно, номер порта (Specific local ports), который открываем. После чего жмем «Далее» (Next).

Firewall_Windows_MS_SQL_Server_2012_10

Теперь укажем действие связанное с добавляемым правилом. Выберем «Разрешить подключение» (Allow the connection) и нажмем «Далее» (Next).

Firewall_Windows_MS_SQL_Server_2012_11

На следующей странице нужно указать, для каких профилей брандмауэра будет действовать правило. Отмечаем нужные профили галочками и жмем «Далее» (Next).

Firewall_Windows_MS_SQL_Server_2012_12

Ну и наконец, вводим имя и описание для нового правила и нажимаем «Готово» (Finish) для завершения работы мастера.

Firewall_Windows_MS_SQL_Server_2012_13

А в оснастке «Брандмауэр Windows в режиме повышенной безопасности» (Windows Firewall with Advanced Security) в таблице «Правила для входящих подключений» (Inbound Rules) мы увидим только что созданное правило.

Firewall_Windows_MS_SQL_Server_2012_14

На этом настройка Брандмауэра завершена. Клиентские программы должны без препятствий подключиться к службе SQL Server.

5. Порт для администрирования MS SQL Server

Для того, чтобы к MS SQL Server можно было подключиться с помощью программы SQL Management Studio, необходимо также добавить правило для протокола UDP и порта 1434.

Подробнее о используемых SQL Server портах здесь.

The problem

“Cannot connect to sql\instance. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 — Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)”

Let’s say we have a system with a running SQL Server (Express or Standard Edition — doesn’t matter) and want to connect to this database from another machine. The chances are high that you will see the above error message.

Be aware: You can customize more or less anything, so this blogposts does only cover a very “common” installation.

I struggled last week with this problem and I learned that this is a pretty “old” issue. To enlighten my dear readers I made the following checklist:

Checklist:

  • Does the SQL Server allow remote connections?
  • Does the SQL Server allow your authentication schema of choice (Windows or SQL Authentication)?
  • Check the “SQL Server Configuration Manager” if the needed TCP/IP protocol is enabled for your SQL Instance.
  • Check if the “SQL Server Browser”-Service is running
  • Check your Windows Firewall (see details below!)
  • This is a weird one, but try to add the Port to the ConnectionString, e.g. Data Source=MyServer\Instance,1434. This is not always needed, but I had one case, where each point on this list was OK, but I couldn’t connect from a client without the port.

Windows Firewall settings:

Per default SQL Server uses TCP Port 1433 which is the minimum requirement without any special needs — use this command:

netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN,PRIVATE,PUBLIC

If you use named instances we need (at least) two additional ports:

netsh advfirewall firewall add rule name = SQLPortUDP dir = in protocol = udp action = allow localport = 1434 remoteip = localsubnet profile = DOMAIN,PRIVATE,PUBLIC

This UDP Port 1434 is used to query the real TCP port for the named instance.

Now the most important part: The SQL Server will use a (kind of) random dynamic port for the named instance. To avoid this behavior (which is really a killer for Firewall settings) you can set a fixed port in the SQL Server Configuration Manager.

SQL Server Configuration Manager -> Instance -> TCP/IP Protocol (make sure this is "enabled") -> *Details via double click* -> Under IPAll set a fixed port under "TCP Port", e.g. 1435

After this configuration, allow this port to communicate to the world with this command:

netsh advfirewall firewall add rule name = SQLPortInstance dir = in protocol = tcp action = allow localport = 1435 remoteip = localsubnet profile = DOMAIN,PRIVATE,PUBLIC

(Thanks Stackoverflow!)

Check the official Microsoft Docs for further information on this topic, but these commands helped me to connect to my SQL Server.

The “dynamic” port was my main problem — after some hours of Googling I found the answer on Stackoverflow and I could establish a connection to my SQL Server with the SQL Server Management Studio.

Hope this helps!

SQL Server Setup: Windows Firewall warning (Ports)

What was it again SQL server setup throws out, when you have your Windows Firewall on?!

Rule «Windows Firewall» generated a warning.

The Windows Firewall is enabled. Make sure the appropriate ports are open to enable remote access. See the rules documentation at http://go.microsoft.com/fwlink/?LinkId=94001 for information about ports to open for each feature.

Keywords:
Setup, Firewall, Ports, SQL Server, Microsoft

Popular posts from this blog

Wrong screen resolution / wrong screen scaling with Windows Server 2016, Asus P7H55 HDMI Video Adapter and Sharp Aquos TV Panel

Image

Running your servers out of your living room exposes you sometimes to unusual issues, like getting a server OS to run on a TV Panel. Problem: The Windows Server 2016’s default video adapter (Microsoft Basic Display Adapter) would inappropriately overscale the screen, so that the borders were invisible. Solution: (Obviously) install the correct video adapter drivers (which are only available for Windows 7 64-bit, but WHQL compatible and thus still installable on Windows Server 2016. Note: Running the setup.exe on the driver gave me the (imho incorrect) message that there would be newer drivers already installed on my system for the Intel drivers. I performed the following Steps: Sever Manager / Tools Computer Management Device Manager / Display Adapters / Expand Microsoft Basic Display Adapter / Right-Click / Properties Tab «Driver» / Button «Update Driver…» Browse my computer for driver software Browse for folder / Select the folder you

SQL Server 2014 Enterprise Edition: Server Setup: Analysis Services Configuration

Although the default option is «Multidimensional and Data Mining Mode» Microsoft actually recommends for new projects «Tabular Mode». According to the Model Features overview Multidimensional supports all features. Microsoft offers a white paper on choosing a Tabular or Multidimensional Modeling Experience in SQL Server 2012 Analysis Services . Tabular Mode Tabular solutions use relational modeling constructs such as tables and relationships for modeling data, and the in-memory analytics engine for storing and calculating data. Because tabular is the newer solution, you might think that migrating an existing multidimensional solution to a tabular format is the correct course of action, but this is usually not the case. Tabular does not supersede multidimensional, and the two formats are not interchangeable. Unless you have a specific reason to do so, do not rebuild an existing multidimensional solution if it is already meeting the needs of your organizatio

Problem: A warning message is displayed in SQL Sever 2014 Setup «Install Rules» step.


Rule «Windows Firewall» generated a warning
The Windows firewall is enabled. Make sure the appropriate ports are open to enable remote access. See the rules’ documentation at http://go.microsoft.com/fwlink/?LinkId=94001 for information about ports to open for each feature. 

Solution: Needs to open up relevant ports in the Windows firewall. In addition, some other parameters must be set depending on the components installed, the setup scenario, and the version of the SQL server.

SQL Server 2008 R2 Specific Instructions
SQL Server 2014 Specific Instructions
SQL Server 2016 Specific Instructions

Steps: To pass the Installation Rules step of the SQL server 2014 setup, open up port 1433.


  1. Go To Windows Firewall





Then click on Advanced Settings in the Allowed Apps window.



Click on Allow another App..

  • Sql server windows server core
  • Sql server windows nt 64 жрет память
  • Srs audio sandbox 64 bit скачать windows 10 ключом
  • Sricam ip камера программа для windows
  • Sql server windows nt 64 bit что это