Что такое экземпляр 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, но все равно выдает ошибку.
Заранее большое спасибо за помощь.
- Вопрос задан более трёх лет назад
- 17008 просмотров
- Вконтакте
- Вконтакте
Экземпляр базы — конкретная база данных. Обычно у БД 4 реквизита: Хост (Localhost, 127.0.0.1 или другой айпи или ДНС имя), имя базы данных, логин и пароль. Хост и имя БД указывают на экземпляр базы данных. А Логин и пароль доступ к БД.
Скорей всего после установки у вас поменялся Хост или имя БД. Вам нужно найти в вашем коде описанные реквизиты и исправить их на корректные.
- Вконтакте
Ошибка ведь сама за себя говорит: когда пытаетесь открыть БД в студии, настройку подключения она «подхватывает» из файла app.config (web.config, если web-приложение). Сейчас, видимо, у вас указана неверная строка, которая ссылается на SQL Server другой версии.
Вот как примерно должен выглядеть параметр строки подключения:
В основном, обычно, в разных версиях SQL Server меняется только параметр «Data Source» в этой строке.
SQL Server — difference between instance name and instance id
I’m a bit confused with SQL Server instances. The Instance Name and Instance ID are different properties, yet Instance ID tends to be defaulted to a capitalized version of the Instance Name. The installation allows you to set a different value for the ID than the Name, although typically they’re the same.
Obviously, ID refers to internal reference and Name refers to user-friendly reference. But what are the fundamental differences between the two? When should one be used rather than the other?
I need to understand this while deploying / installing SQL Server 2008 R2 Express on our clients’ server machines from a custom installation process.
4 Answers 4
By default, the instance name is used as the Instance ID. Instance ID is used to identify installation directories and registry keys for your instance of SQL Server. This is the case for default instances and named instances
Install SQL 2008 r2 steps: Link
![]()
I am not even a beginner but it’s all in the references provided to you Jerry Dodge.
INSTANCE NAME = Is attached to a SERVER NAME just like the way it’s stated. When you try to connect to an SQL Database you need the server to be able to get in. It’s all about the networking and properties of your Physical or Virtual machine hosting your DATABASE.
INSTANCE attached to SQL Instance Name. Once you provided the instance name which is the PATH to your SERVER NAME then you need the INSTANCE ID to be able to get into your programs and DATABASE path and all other software licensing requirements to run.
One is Physical or Virtual Computer and Network and the other is physical or logical path to the database storage.
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 meant by Instance name?
what is a sql server instance ? what does it mean and why do why need it ?

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.