Перейти к содержимому

Instance name sql server что это

  • автор:

Что такое экземпляр sql server?

Я разрабатываю приложение на C# в Visaul Studio 2015, которое работает с sql базой данной. Я программист самоучка, практик без какого-либо теоретического образования, все вопросы которые возникают просто гуглю, а тут бьюсь какую неделю и ни как не могу разобраться. Помогите, пожалуйста.

Была база данных sql и проект, по моему в 2012 студии. Базу данных делал в какой-то sql management studio, не помню какая версия. И вот пришлось вернуться к заводским настройкам компьютера и все, что было устанавливать заново. Установил 2015 Visual Studio, sql express 2014 и sql management studio 2014. Все устанавливал «по умолчанию» просто нажимал кнопку далее, так как мало что во всем этом понимаю. После запуска старого проекта в Visual Studio 2015, она видит файл базы данных, но с красным крестиком, и когда я нажимаю «проверить подключение» выдает ошибку:

«Значение источника данных в строке подключения указывает на неустановленный экземпляр SQL Server. Для устранения этой проблемы установите соответствующий экземпляр SQL Server или измените значение источника данных в строке подключения.»

что такое экземпляр SQL Server? как его узнать и как установить? я установил еще SQL Server 2012, но все равно выдает ошибку.

Заранее большое спасибо за помощь.

  • Вопрос задан более трёх лет назад
  • 17495 просмотров
  • Facebook
  • Вконтакте
  • Twitter
  • Facebook
  • Вконтакте
  • Twitter

Экземпляр базы — конкретная база данных. Обычно у БД 4 реквизита: Хост (Localhost, 127.0.0.1 или другой айпи или ДНС имя), имя базы данных, логин и пароль. Хост и имя БД указывают на экземпляр базы данных. А Логин и пароль доступ к БД.

Скорей всего после установки у вас поменялся Хост или имя БД. Вам нужно найти в вашем коде описанные реквизиты и исправить их на корректные.

  • Facebook
  • Вконтакте
  • Twitter

Ошибка ведь сама за себя говорит: когда пытаетесь открыть БД в студии, настройку подключения она «подхватывает» из файла app.config (web.config, если web-приложение). Сейчас, видимо, у вас указана неверная строка, которая ссылается на SQL Server другой версии.

Вот как примерно должен выглядеть параметр строки подключения:

В основном, обычно, в разных версиях SQL Server меняется только параметр «Data Source» в этой строке.

what is meant by Instance name?

what is a sql server instance ? what does it mean and why do why need it ?

enter image description here

What does an instance name mean ?

1 Answer 1

In this case, its the name or unique connection string of your «instance» of the SQL Server.

When you install software you can create one or more instance of the dataset. Each instance and a different hostname and port which allows you to contact that instance.

Instance name sql server что это

Declare @key Varchar ( 100 ), @PortNumber varchar ( 20 )

if charindex ( ‘\’ , CONVERT ( char ( 20 ), SERVERPROPERTY ( ‘servername’ )), 0 ) <> 0

set @key = ‘SOFTWARE\MICROSOFT\Microsoft SQL Server\’ + @@servicename + ‘\MSSQLServer\Supersocketnetlib\TCP’

set @key = ‘SOFTWARE\MICROSOFT\MSSQLServer\MSSQLServer\Supersocketnetlib\TCP’

EXEC master .. xp_regread @rootkey = ‘HKEY_LOCAL_MACHINE’ , @key = @key , @value_name = ‘Tcpport’ , @value = @PortNumber OUTPUT

SELECT CONVERT ( char ( 20 ), SERVERPROPERTY ( ‘servername’ )) ServerName ,

CONVERT ( char ( 20 ), SERVERPROPERTY ( ‘InstanceName’ )) instancename ,

CONVERT ( char ( 20 ), SERVERPROPERTY ( ‘MachineName’ ))

as HOSTNAME , convert ( varchar ( 10 ), @PortNumber ) PortNumber

  • Proposed as answer by stefanobi Thursday, September 24, 2009 5:51 AM

In a simple way :

Start ->All progrmas->Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager

In Configuration Manager -> SQL Server 2005 Services -> double click the SQL Service -> click the Service Tab.

There you will find the name of the Host.

In Configuration Manager -> SQL Server 2005 Network configuration ->double click the TCP/IP protcol to see the port no .

In SQL Server Management Studio->RegisterServers->double click your server to open the Object Explorer -> right click to select the properties window ->General Tab — to see the ServerName

or Open a new query in SQL Server Management window and execute the following

What is a SQL Server Instance

In this article let us learn what is SQL Server Instance is. SQL Server allows us to install and run multiple instances of SQL Server or install SQL Server on a computer, where another version of SQL Server is already installed. You can refer to the article on How to download and install SQL Server.

Table of Contents

What is SQL Server Instance

The SQL Server allows us to install multiple instances of the SQL Server database engines. These engines run side by side and completely isolated from each other. Each database engine installation is known as the SQL Server instance.

Every instance is a complete SQL Server Installation along with its own copy of server files, database engine, databases, Users and credentials.

The instances can be of the same SQL server version or of different versions.

Running multiple instances will use considerably more resources since you are running multiple SQL Servers on the same box.

Instance Name

We give a unique name to each instance so as to uniquely identify them.

We connect to the SQL Server using the <computerName>\<InstanceName> as server name

For Example, if the computer name is HOME and the instance name is SQL2017 then SQL server name is HOME\SQL2017

We assign the instance name when we install the SQL Server database engine.

Instance Configuration

The SQL Server Instance configuration window asks for us to choose between two options. One is the default instance and the other one is named instance.

The default instance name is MSSQLSERVER. You do not have to specify the instance name when you want to connect to the default instance. You can have only one default instance installed on the PC. This is regardless of the SQL Server version

Instance Configuration Default Instance

Example of Default Instance

A Unique name must be given to a named instance. You can install SQL Server as a named instance without installing the default instance first.

Instance Configuration Named Instance

Example of Named Instance

You can create multiple instances by running the setup again. Refer to the article on How to download and install SQL Server

Naming the instance

The following rules must be followed when you name an instance of SQL Server:

  • Instance names are not case sensitive.
  • Names cannot start or end with an underscore ().
  • Reserved Keywords are not allowed in the instance name. Here is the list of Reserved Keywords
  • If you specify MSSQLSERVER as the instance name, the default instance will be created
  • Name cannot be more than 16 characters
  • The first character of the instance name must be a letter. a-z, A-Z Subsequent characters can be decimal numbers, the dollar sign ($), or an underscore ().
  • Do not use the Spaces, backslash (), comma (,), colon (:), semi-colon (;), single quote (‘), ampersand (&), hyphen (-), and (@), etc

Summary

In this article, we learned what is SQL Server Instance is. In the next tutorial, we will learn how to connect to an Instance using the SSMS

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Car Rental HPN Inside the Terminal