'How do I find what is the named instance of my SQL Server 2012 Express instance
Using SSMS to validate my ServerName\instance ... I can only get it to connect with the dot . (or computerName). I thought the default instance was .\SQLEXPRESS ... but this does not work.
It seems Visual Studio 2012 also expects (.\SQLEXPRESS) .... changing my web.config file to reflect the data source as DATA SOURCE= .; fixes nothing....VS 2012 cannot find my SQL Server 2012 Express when trying to add a database item. All my attempts have failed.
I tried to post image but it fussed at me because I am a new user.... but here is the Visual Studio Error Message I received when I attempt to add a database:
Network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was accessible. Verify that the instance name is correct and that SQL Server is configured to allowed remote connections. (provider: SQL Network Interfaces, error: 50 -Local database runtime error occurred. Cannot create an automatic instance. See the Windows App event log for error details
Windows App Event Log:
Cannot access LocalDB instance folder: %%LOCALAPPDATA%%\Microsoft\Microsoft SQL Server Local DB\Instances\.
(examining the above path.. shows only an instances folder and a projects sub-folder. The project folder contains many files including master db)
How to I sync of my SQL Server 2012 Express installation with VS 2012??
Solution 1:[1]
for checking your connection do the following steps create a new textbox them rename it to a file with udl index for example a.udl now open this file there are 4 tabs first you should select microsoft ole db provider for sql server in second tab (connection tab)select your server name the exact one that you connect with sql server(for example NIKTANA\SQLEXPRESS) now set the user and pass and if your server name is ok you see the databases on your server choose the database click ok and now if you open the file with notepad you see your connection string this connection string work in visual studio
Solution 2:[2]
select @@servername + '\' + @@servicename
Solution 3:[3]
Thogh this question is asked a year back, I didn't find any direct answer to this question when I started playing with SQL Server Express 2012. I surprised when didn't find the service instance running as service. Then I took some time to read what is new in 2012 SQL Server Express edition and onward.
You could have a quick look at; http://msdn.microsoft.com/en-IN/library/hh510202.aspx
Come to the point, how to know the instance name?
Find the following folder to know the instaance name quickly, note that AppData is a hidden folder by default. C:\Users\\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | niktana |
| Solution 2 | user3177394 |
| Solution 3 | anup |
