Sql server разрешены удаленные соединения provider sql network interfaces error 26

User-605499000 posted

User-605499000 posted

Hi 

Below is the error message and also the web config.  I am using visual studio 2019 as.net c#.  I had to upgrade the sql and they changed the Jen19.mdf to Jen19.mdf1. Should I delete the old mdf and change the new one to just mdf.  Also in
the old web config they had a line listing the SQl and there was a mdf listed. I don’t have that in the new web config.  Should I? The mdf1 file has the products listed in it.  

Thanks, Jen

Server Error in ‘/’ Application.


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)

Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Web config:

<?xml version=»1.0″ encoding=»utf-8″?>
<!—
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
—>
<configuration>
<configSections>
<!— For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 —>
<section name=»entityFramework» type=»System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ requirePermission=»false» />
</configSections>
<system.web>
<compilation debug=»true» targetFramework=»4.7.2″ />
<httpRuntime targetFramework=»4.7.2″ />
<pages>
<namespaces>
<add namespace=»System.Web.Optimization» />
</namespaces>
<controls>
<add assembly=»Microsoft.AspNet.Web.Optimization.WebForms» namespace=»Microsoft.AspNet.Web.Optimization.WebForms» tagPrefix=»webopt» />
</controls>
</pages>
<customErrors mode=»Off» defaultRedirect=»ErrorPage.html»>
</customErrors>
<profile defaultProvider=»DefaultProfileProvider»>
<providers>
<add name=»DefaultProfileProvider» type=»System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ connectionStringName=»DefaultConnection» applicationName=»/» />
</providers>
</profile>
<membership defaultProvider=»DefaultMembershipProvider»>
<providers>
<add name=»DefaultMembershipProvider» type=»System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ connectionStringName=»DefaultConnection» enablePasswordRetrieval=»false»
enablePasswordReset=»true» requiresQuestionAndAnswer=»false» requiresUniqueEmail=»false» maxInvalidPasswordAttempts=»5″ minRequiredPasswordLength=»6″ minRequiredNonalphanumericCharacters=»0″ passwordAttemptWindow=»10″ applicationName=»/» />
</providers>
</membership>
<roleManager defaultProvider=»DefaultRoleProvider»>
<providers>
<add name=»DefaultRoleProvider» type=»System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ connectionStringName=»DefaultConnection» applicationName=»/» />
</providers>
</roleManager>
<!—
If you are deploying to a cloud environment that has multiple web server instances,
you should change session state mode from «InProc» to «Custom». In addition,
change the connection string named «DefaultConnection» to connect to an instance
of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
—>
<sessionState mode=»InProc» customProvider=»DefaultSessionProvider»>
<providers>
<add name=»DefaultSessionProvider» type=»System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ connectionStringName=»DefaultConnection» />
</providers>
</sessionState>
</system.web>
<runtime>
<assemblyBinding xmlns=»urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=»Antlr3.Runtime» publicKeyToken=»eb42632606e9261f» />
<bindingRedirect oldVersion=»0.0.0.0-3.5.0.2″ newVersion=»3.5.0.2″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»Newtonsoft.Json» publicKeyToken=»30ad4fe6b2a6aeed» />
<bindingRedirect oldVersion=»0.0.0.0-12.0.0.0″ newVersion=»12.0.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»WebGrease» publicKeyToken=»31bf3856ad364e35″ />
<bindingRedirect oldVersion=»0.0.0.0-1.6.5135.21930″ newVersion=»1.6.5135.21930″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»Microsoft.Owin» publicKeyToken=»31bf3856ad364e35″ culture=»neutral» />
<bindingRedirect oldVersion=»0.0.0.0-4.0.1.0″ newVersion=»4.0.1.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»Microsoft.Owin.Security.OAuth» publicKeyToken=»31bf3856ad364e35″ culture=»neutral» />
<bindingRedirect oldVersion=»0.0.0.0-4.0.1.0″ newVersion=»4.0.1.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»Microsoft.Owin.Security» publicKeyToken=»31bf3856ad364e35″ culture=»neutral» />
<bindingRedirect oldVersion=»0.0.0.0-4.0.1.0″ newVersion=»4.0.1.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=»Microsoft.Owin.Security.Cookies» publicKeyToken=»31bf3856ad364e35″ culture=»neutral» />
<bindingRedirect oldVersion=»0.0.0.0-4.0.1.0″ newVersion=»4.0.1.0″ />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<providers>
<provider invariantName=»System.Data.SqlClient» type=»System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer» />
</providers>
<defaultConnectionFactory type=»System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework»>
<parameters>
<parameter value=»mssqllocaldb» />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<connectionStrings>
<add name=»DefaultConnection» providerName=»System.Data.SqlClient» connectionString=»Data Source=.SQLEXPRESS;Initial Catalog=aspnet-Jen19-20190804123356;Integrated Security=SSPI» />
</connectionStrings>
<system.codedom>
<compilers>
<compiler language=»c#;cs;csharp» extension=».cs» type=»Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ warningLevel=»4″
compilerOptions=»/langversion:default /nowarn:1659;1699;1701″ />
<compiler language=»vb;vbs;visualbasic;vbscript» extension=».vb» type=»Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″
warningLevel=»4″ compilerOptions=»/langversion:default /nowarn:41008 /define:_MYTYPE=&quot;Web&quot; /optionInfer+» />
</compilers>
</system.codedom>
</configuration>

Methods to Resolve SQL Server Error 26

Users often see “SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified” error message while connecting to SQL Server.

SQL Server Error 26

SQL Server Error 26 occurs when users trying to connect to a SQL Server named instance. The reason of the SQL Server Error 26 is the client stack could not receive SSRP response UPD packet from SQL Browser.

Tip: Fix SQL Server Management Studio Error 40

You have to create an incoming rule that allows traffic from all promising IP addresses that are configured for the failover cluster instance and from all possible IP addresses of the remote server. For this you have to follow the below steps

    • Open Adminstrative Tools, from Control Panel
    • In Adminstrative Tools, click on Windows Firewall with Advanced Security
    • Under Windows Firewall with Advanced Security on Local Computer column, click on the Inbound Rule and then select New Rule from the right pane

Windows Firewall with Advanced Security

    • From New Inbound Rule Wizard window, select Custom and then click on the Next button

Select Custom

    • Under Does this rule apply to all programs or a specific program? select All programs then click on Next button

Select All Program

    • Form Protocol type list, select Any and then click on Next button

Select Protocol Type

    • Under Which remote OP addresses does this rule apply to? select These IP addresses and then click on Add button

Select These IP Addresses

    • In IP Address dialog box, under This IP address or subnet type the IP address and then click on Ok button

IP Address

    • Under What action should be taken when a connection matches the specified conditions? select Allow the connection and then click on Next button

Allow the connection

  • Click on the Next button to complete the New Outbound Rule Wizard steps

Other Possible Causes of SQL Server Error 26 with Solution

SQL Server does not allow remote connections

  • To resolve the SQL Server Error 26 open SQL Server Management Studio, Right click on the database and select properties
  • On Security page, select SQL Server and Windows Authentication mode and click on Ok button
  • Restart SQL Server

If you are still facing the SQL Server Error 26, then there could be a same name conflict between two systems. Check whether the computer name, system name is same if yes, then try to system using its IP address.

SQL Server Error 26 and SQL Server Error 40 appear when you try to connect to SQL Server. We will troubleshoot and try to fix them in the same article as both are related to connection issue. We recommend to use the below solutions for the both errors and to try to localize the problem.

The error Messages:

(provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

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)

“ Named Pipes Provider Error: 40 – Could not open a connection to SQL Server“.

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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

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 the SQL Server is configured to allow remote connections. (provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server) (Microsoft SQL Server, Error: 2).

sql server error 26

sql server error 26

SQL Server Error 26 and SQL Server Error 40

What is SQL Server Error 26?

You will get this error message while trying to connect to a SQL Server named instance and not when you use default instance. The client stack could not receive SSRP response UDP packet from SQL Browser.

How to fix Error 26 on SQL Server?

  1. Recheck the server name for any error and fix it
  2. Check the instance name for any error
  3. Check if SQL Server browser is running
  4. Control if this instance exist on server
  5. Ping the server and check if DNS can be resolved correctly

What is SQL Server Error 40?

This error appears mostly when SQL Server does not allow remote connections, Firewall Settings or TCP/IP is not enabled. We will explain below all those in order to troubleshoot easy.

Read also other SQL Server Helping Posts:

  1. How to fix SQL Server Error 229
  2. Fix SQL Server Error 233
  3. SQL Server Error 17002

How to fix error 40 on SQL Server?

  1. Check SQL Server is running
  2. Make sure that Allow Remote Connections is enabled on sql server properties
  3. Check if TCP/IP is enabled
  4. Configure to allow SQL Server in Firewall Settings
  5. Check for working fine SQL Server Browser
  6. Make sure that you can ping the SQL Server

Below we will explain the above steps in long way for better understanding and easy fix of SQL error 26 and sql error 40.

1. Check if SQL Services are running

Hint! If you are running SQL Server by using an instance name and you are not using a specific TCP/IP port number in your connection string, you must enable the SQL Server Browser service to allow for remote connections.

How to check if SQL Server Service is running?

  • Go to SQL Server Configuration Manager > SQL Server Services
  • Find the service SQL Server (MSSQLSERVER) if default or the name of your instance
  • Check if is running – should be running state with a green indication

Using Windows Command Prompt

sc query mssqlserver

For named instance name use below by by replacing instancename with the actual SQL Server instance name.

sc query mssql$instancename

How to check if SQL Server Browser is running?

  • Navigate to SQL Server Configuration Manager > SQL Server Services
  • Find the SQL Server Browser Service
  • Check if it is configured to start automatically and is started – should be with a green indication

Using Windows Command Prompt

sc query sqlbrowser

Check if SQL Server Service

Check if SQL Server Service

2. Try to Flush DNS

How to flush DNS?

  1. Click Start Button
  2. Type CMD and press enter
  3. Type this into the black window that appears: ipconfig /flushdns and press enter.

Fluish DNS

Fluish DNS

3. Make sure that allow Remote Connection is enabled

Check if remote connections is allowed for applications/client. This option need to be allowed to establish connections and perform operations on the server. Often this is the reason of SQL Server Error 26 and SQL Server Error 40.

How to check if the remote connection is enabled?

  1. Open ‘SQL Server Management Studio’
  2. Right click on database name and select ‘Properties’
  3. In ‘Properties’ window, select ‘Security’, enable `SQL Server and Windows Authentication mode` and click `OK`.
  4. Now restart the SQL server.

Allow Remote Connections

Allow Remote Connections

4. Check Firewall

Check the firewall status for any troubles:

  1. Open ‘Control Panel’ and after that ‘Windows Firewall’.
  2. Select ‘Change Settings’ In ‘Windows Firewall’,
  3. Add an exception for port ‘1434’ and name it ‘SQL Server’
  4. Enable by clicking on the checkbox

5. Connection String

This solution is on cases when you are using connection string and are you writing it wrongly. For example connection string used by .NET framework:

Server=serverAddress;Database=dbName;User Id=username;

Password=password;

  1. Check for each parameter passed in the connection string for any typographical errors.
  2. Control the validity of the username/password.
  3. Confirm if the given database exists.

6. TCPIP Protocol

This solutions can work when you have mix of default and named instance or named instances only.

How to Enable TCP/IP port?

  1. Open SQL Server Configuration Manager
  2. Click on SQL Server Network Configuration and click on Protocols for Name
  3. Right-click on TCP/IP
  4. Click Enable
  5. Restart your SQL Server instance

Enable TCP-Ip port

Enable TCP-Ip port

If you want to use a static port for your instance (instead of dynamic that changes after every restart) you can change it here.

  1. Open Properties for TCP/IP protocol
  2. Go to IP Addresses tab
  3. Scroll down to IPAll section
  4. Remove 0 value from TCP Dynamic Ports
  5. Specify your port in TCP Port

You can use this port to connect to your instance by providing <servername>,<port> or <IP>,<port> as Server Name (yes, there is a comma, not a colon).

TCP-Ip static port

TCP-Ip static port

Conclusion:

We have explained some solutions to fix SQL Server Error 26 and SQL Server Error 40 and hope that you find the fix on those solutions. The both errors are included on the same article because they have almost the same troubleshoot. If you have any other solution worked for you comment below and we will try to include it on our article.

Sometimes you may see “SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified” error message when connecting to a SQL Server and don’t know where to start. In most forums people say this is because remote connection is not enabled on the server. This is not exactly correct. Actually, this error message gives customers a very specific information and the solution is quite simple.

First of all, you get this error message only if you are trying to connect to a SQL Server named instance. For a default instance you never see this. Why? Because even if we have failed at this stage (i.e. error locating server/instance specified), we will continue to try connect using default values, e.g default TCP port 1433, default pipe name for Named Pipes. You may see others error messages due to failure later, but not this error message.
Every time client makes a connection to SQL Server named instance, we will send a SSRP UDP packet to the server machine UDP port 1434. We need this step to know configuration information of the SQL instance, e.g., protocols enabled, TCP port, pipe name etc. Without this information,  a client does know how to connect to the server and it fails with this specific error message.
In other wors, the reason that we get this error message is the client stack could not receive SSRP response UDP packet from SQL Browser. It’s easy to resolve the issue. Here are the steps:

  • Make sure your server name is correct, e.g., no typo on the name.
  • Make sure your instance name is correct and there is actually such an instance on your target machine. (Try to use a connection string like .<instance-name> to connect to an instance on your local computer. E.g:  .SQLEXPRESS)
  • When you try to connect to an SQL Server instance on another server,  make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
  • Make sure SQL Browser service is running on the server.
  • If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

Once you are done with these steps, you should not see this error message anymore.

Проблема

При попытке добавления рабочей группы в Vault с помощью консоли Autodesk Data Management Server (ADMS) или установки с помощью удаленного сервера SQL появляется следующее сообщение об ошибке:

———————
Консоль Autodesk Data Management Server
———————
При установке подключения к SQL Server произошла ошибка, связанная с сетью или экземпляром. Сервер не найден или недоступен. Убедитесь, что имя экземпляра указано правильно и SQL Server разрешает удаленные подключения (поставщик: сетевые интерфейсы SQL, ошибка: 26 — ошибка при поиске сервера/указанного экземпляра)
———————
ОК
———————

В журнале консоли ADMS Console появляется следующая запись:

Ошибка: Соединение с базой данных разорвано. Повторный запуск операции.
Исключение: ошибка, связанная с сетью или экземпляром, произошла при установке подключения к SQL Server. Сервер не найден или недоступен. Убедитесь, что имя экземпляра указано правильно и SQL Server разрешает удаленные подключения (поставщик: сетевые интерфейсы SQL, ошибка: 26 — ошибка при поиске сервера/указанного экземпляра)
Трассировка стека: в Connectivity.Core.Database.TransactionContext.OnSqlException(SqlException e)
в Connectivity.Core.Database.TransactionContext..ctor(база данных TransactionDatabase, пользователь базы данных DatabaseUser, логическая транзакция)
в Connectivity.Core.Database.TransactionBase.SetupTransactionContext(TransactionReqs, база данных TransactionDatabase, Nullable`1 dUsus)
в Connectivity.Core.BusinessLogic.WorkgroupBL.Database.CleanupRemoteSubscription(Workgroup publisher, String publationnameation, Staseasea)
в Connectivity.Core.BusinessLogic.WorkgroupBL.Database.Subscribe(рабочая группа, целевая рабочая группа, имя базы данных строки, тип базы данных KnowledgeDatababaseaseTypeaseType, стро, строaseUsUser, St, St, Ster ag)
в Connectivity.Core.BusinessLogic.WorkgroupBL.Create(String sqlServer, String sauser, String saPassword, String agent Agator Passassworworwory Lworal Ler)
в System.Runtime.Remoting.Messaging.Message.Dispatch(Объект цель)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Причины

  • Соединения между сервером источника и сервером подписчика разорваны. 
  • Это произошло из-за проблемы DNS (Domain Name System) между двумя доверенными доменами. Корневая причина проблемы должна быть изучена администратором DNS доменов.
  • Экземпляр SQL Server не запущен.

Решение

Убедитесь, что соединения между двумя узлами установлены. Простую проверку можно выполнить, выполнив следующие действия. Если соединение установлено некорректно, как указано в одном из следующих тестов, проблема подключения должна быть решена сетевым инженером или администратором базы данных:

  • Убедитесь, что SQL Server в источнике может подключиться к SQL Server в подписчике с помощью SSMS (SQL Server Management Studio), подключившись к экземпляру AUTODESKVAULT. 
  • Убедитесь, что SQL Server в подписчике может подключаться к SQL Server в источнике с помощью SSMS (SQL Server Management Studio), подключившись к экземпляру AUTODESKVAULT.

Если проблемы вызваны проблемами с DNS (Domain Name System) между двумя сайтами, одним из возможных способов разрешения имен будет использование файлов узлов на каждом сервере. Выполните указанные ниже действия. 

  1. После установления соединения между двумя сайтами убедитесь, что и издателю, и всем подписчикам назначен статический IP-адрес.
  2. На сервере издателя откройте файл hosts в Блокноте Windows. Файл находится в папке C:WindowsSystem32driversetc.
  3. Вставьте имя хоста компьютера (краткое имя) и IP-адрес подписчика.
  4. На сервере подписчика откройте файл hosts в Блокноте Windows. Файл находится в папке C:WindowsSystem32driversetc.
  5. Вставьте имя узла компьютера издателя (краткое имя) и IP-адрес.
  6. Сохраните файл.

Убедитесь, что экземпляр SQL Server, используемый Vault, запущен, если он не запущен.

  1. Войдите на сервер, на котором размещен экземпляр SQL Server, используемый Vault.
  2. Откройте консоль служб.
  3. Проверьте состояние службы SQL Server. По умолчанию это будет SQL Server (AUTODESKVAULT), но имя будет меняться, если имя экземпляра отличается от AUTODESKVAULT.
  4. Если статус не указан как выполняющийся, щелкните службу правой кнопкой мыши и выберите «Запустить».

Программы

Vault Professional

  • Remove From My Forums
  • Question

  • User1972336035 posted

    Hi Guys,

    If you are facing problem with connecting to SQL Server through ur application. And getting following error

    «An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces,
    error: 26 — Error Locating Server/Instance Specified)
    «

    Step 1.

    Check if you can login to your SQL Server Managed Studio using ur user Name and pwd.

    Example using ur sa account which is ur default account

    If not the then follow following steps

    Change the authentication mode to mixed from Windows, Following are the steps to be followed.

    1. In SQL Server Management Studio Object Explorer, right-click the server, and then click
      Properties.

    2. On the Security page, under Server authentication, select the new server authentication mode «SQL Server and Windows Authentication mode», and then click
      OK.

    3. In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server

    To Enable the sa login.

    1. In Object Explorer, expand Security, expand Logins, right-click sa, and then click
      Properties.

    2. On the General page, you might have to create and confirm a password for the
      sa login.

    3. On the Status page, in the Login section, click Enabled, and then click
      OK.

    Step 2.

    Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition

    <mce:script type=»mce-text/javascript»><!— loadTOCNode(2, ‘moreinformation’); // —></mce:script> You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these
    steps:

    1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to
      Configuration Tools, and then click SQL Server Surface Area Configuration.
    2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
    3. On the Surface Area Configuration for Services and Connections page, expand
      Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click
      Apply.

      Note Click OK when you receive the following message:

      Changes to Connection Settings will not take effect until you restart the Database Engine service.

    4. On the Surface Area Configuration for Services and Connections page, expand
      Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click
      Start to restart the MSSQLSERVER service.

    Step 3. 

    Enable the SQL Server Browser service

    <mce:script type=»mce-text/javascript»><!— loadTOCNode(2, ‘moreinformation’); // —></mce:script> If you are running SQL Server 2005 by using an instance name and you are not using a specific TCP/IP port number in your connection string, you must
    enable the SQL Server Browser service to allow for remote connections. For example, SQL Server 2005 Express is installed with a default instance name of <var>Computer Name</var>SQLEXPRESS. You are only required to enable the SQL Server Browser service one
    time, regardless of how many instances of SQL Server 2005 you are running. To enable the SQL Server Browser service, follow these steps.

    Important These steps may increase your security risk. These steps may also make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We recommend the process that this article describes
    to enable programs to operate as they are designed to, or to implement specific program capabilities. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this process in your particular environment.
    If you choose to implement this process, take any appropriate additional steps to help protect your system. We recommend that you use this process only if you really require this process.

    1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to
      Configuration Tools, and then click SQL Server Surface Area Configuration.
    2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
    3. On the Surface Area Configuration for Services and Connections page, click
      SQL Server Browser, click Automatic for Startup type, and then click
      Apply.

      Note When you click the Automatic option, the SQL Server Browser service starts automatically every time that you start Microsoft Windows.

    4. Click Start, and then click OK.

    Note When you run the SQL Server Browser service on a computer, the computer displays the instance names and the connection information for each instance of SQL Server that is running on the computer. This risk can be reduced by not enabling the SQL
    Server Browser service and by connecting to the instance of SQL Server directly through an assigned TCP port. Connecting directly to an instance of SQL Server through a TCP port is beyond the scope of this article. For more information about the SQL Server
    Browser server and connecting to an instance of SQL Server, see the following topics in SQL Server Books Online:

    • SQL Server Browser Service
    • Connecting to the SQL Server Database Engine
    • Client Network Configuration

    Step 4.

    Create exceptions in Windows Firewall

    <mce:script type=»mce-text/javascript»><!— loadTOCNode(2, ‘moreinformation’); // —></mce:script> These steps apply to the version of Windows Firewall that is included in Windows XP Service Pack 2 (SP2) and in Windows Server 2003. If you are using
    a different firewall system, see your firewall documentation for more information.

    If you are running a firewall on the computer that is running SQL Server 2005, external connections to SQL Server 2005 will be blocked unless SQL Server 2005 and the SQL Server Browser service can communicate through the firewall. You must create an exception
    for each instance of SQL Server 2005 that you want to accept remote connections and an exception for the SQL Server Browser service.

    SQL Server 2005 uses an instance ID as part of the path when you install its program files. To create an exception for each instance of SQL Server, you must identify the correct instance ID. To obtain an instance ID, follow these steps:

    1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to
      Configuration Tools, and then click SQL Server Configuration Manager.
    2. In SQL Server Configuration Manager, click the SQL Server Browser service in the right pane, right-click the instance name in the main window, and then click
      Properties.
    3. On the SQL Server Browser Properties page, click the Advanced tab, locate the instance ID in the property list, and then click
      OK.

    To open Windows Firewall, click Start, click Run, type firewall.cpl, and then click
    OK

    Step 5.

    Create an exception for SQL Server 2005 in Windows Firewall

    <mce:script type=»mce-text/javascript»><!— loadTOCNode(3, ‘moreinformation’); // —></mce:script> To create an exception for SQL Server 2005 in Windows Firewall, follow these steps:

    1. In Windows Firewall, click the Exceptions tab, and then click Add Program.
    2. In the Add a Program window, click Browse.
    3. Click the C:Program FilesMicrosoft SQL Server<var>MSSQL.1</var>MSSQLBinnsqlservr.exe executable program, click
      Open, and then click OK.

      Note The path may be different depending on where SQL Server 2005 is installed. <var>MSSQL.1</var> is a placeholder for the instance ID that you obtained in step 3 of the previous procedure.

    4. Repeat steps 1 through 3 for each instance of SQL Server 2005 that needs an exception.

    Create an exception for the SQL Server Browser service in Windows Firewall

    <mce:script type=»mce-text/javascript»><!— loadTOCNode(3, ‘moreinformation’); // —></mce:script> To create an exception for the SQL Server Browser service in Windows Firewall, follow these steps:

    1. In Windows Firewall, click the Exceptions tab, and then click Add Program.
    2. In the Add a Program window, click Browse.
    3. Click the C:Program FilesMicrosoft SQL Server90Sharedsqlbrowser.exe executable program, click
      Open, and then click OK.

Понравилась статья? Поделить с друзьями:
  • Sql server ошибка 1827
  • Sql server ошибка 15007
  • Sql server ошибка 1418
  • Sql server ошибка 10054
  • Sql server wmi provider error