Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 views
in Technique[技术] by (71.8m points)

ssms - SQL Server (localdb)v11.0 explained

I'm following Code First to an Existing Database tutorial and noticed that it suggested to connect to (localdb)v11.0 in learning purposes. I've tried to connect to it using my SQL Management Studio and it worked. But when I've restored a DB backup it created an [DatabaseName].mdf file in my user's directory.

I'm quite surprised and have following questions:

  1. What is a (localdb)v11.0? Does it uses my SQL Express or SQL Compact?
  2. Does it support only databases stored in .mdf files?
  3. How can I specify path for my restore other than my user's folder?
  4. What general purposes does it serve (is it for learning purposes only)?
  5. Where can I find more info about this kind of database?
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. LocalDB was introduced in SQL Server 2012 CTP3. It’s basically a new version of SQL Express, with same functionality, dedicated to developers. So you don’t need to install any SQL server. If you have installed SQL 2012 or Visual Studio 11 then you already have it, and it runs over .Net 4 or higher. If you are using Visual Studio 11 and have been playing with the new EntityFramework and MVC, you can see it on the default connection string. (Source)

  2. MDF is the default extension for SQL Server database files. (Log files are LDF) Also see this question.

  3. You can restore to a specific folder by using RESTORE DATABASE WITH MOVE as documented on MSDN here.

  4. LocalDB is intended for developers, see point 1.

  5. The SQL Server Express blog has an informative post about LocalDB here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...