Visual Studio 2013 does not create SQL Server 2014 LocalDB database

I am working on a VB.NET project in the Visual Studio 2013 Community (thanks MS). SQL Server 2014 LocalDB is configured on my machine (just in case, went to the MS website and got the latest and greatest copy of LocalDB). Added Service-based Database

to my project. In the properties of the database object, the connection string Data Source=(LocalDB)\v11.0;...

, which means using an older version of the database. Tried changing the connection (Server Explorer> Right click on my database> Change connection> Advanced>) but none of the options point to the correct server.

According to MS documentation , the correct line should be"Server=(localdb)\MSSQLLocalDB;..."

Anyone else facing the same problem? Any workarounds?

+3


source to share


3 answers


I found a solution.



Removed existing database. Created a new SQL Server Management Studio 2014 database. Placed it in the solutions folder. Connected to this database via Server Explorer: install Server Name:

in (localdb)\MSSQLLocalDB

and Attach a database name:

in .mdf file.

+3


source


Local DBD instances are located in the following folder:

%LOCALAPPDATA%\Microsoft\Microsoft SQL Server Local DB\Instances

      

Most likely the instance is just V12

either V12.0

or ProjectsV12

(this is what I have for SQL Server 2014 LocalDB)



So, if you have a ProjectV12 instance folder, the server name is:

(localdb)\ProjectV12

      

+3


source


The newprint "solution" above will certainly work and may make life easier in the long run.

However, I just solved this same problem more directly using the directions from this post: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b75bef7e-13f3-4658-8d43-9df12ab4c320/connecting-localdb- using-sql-server-management-studio-express Look for the answer as of Aug 26, 2012 by ReadyRoll, although I'm copying it below for security reasons.

VisualStudio creates an instance of LocalDb if you create your db while working in a Visual Studio solution. However, "server name" is a strange looking string from Management Studio Express's point of view.

From MSDN post by ReadyRoll:

1. Get the address of a (localdb) instance by running the following command:

"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe" info [InstanceName]
(if its the default instance you're interested in, specify v11.0 as the [InstanceName]

2. Copy the value returned in the "Instance pipe name", e.g. np:\\.\pipe\LOCALDB#13E05E01\tsql\query

3. Add a new server registration in SSMS and paste the "Instance pipe name" value as the Server Name.
NOTE: It is not necessary to specify "Named pipes" as the protocol. SSMS should detect the appropriate protocol for you.

      

Note. I had trouble understanding step 3 for a while. I just pasted the line I got from running SqlLocalDb.exe into the Server Name field in the MSE Connect to Server dialog: enter image description here

+2


source







All Articles