SQL Server (localdb)\v11.0 explained

76,001
  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.

  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.

Share:
76,001
Pavel K
Author by

Pavel K

Writing elegant (and sometimes not) code on C#, C++, JavaScript etc. Solving interesting problems, studying fundamental stuff on speech recognition, signal processing, machine learning and optimization.

Updated on July 05, 2022

Comments

  • Pavel K
    Pavel K almost 2 years

    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?
  • Richard Chambers
    Richard Chambers over 8 years
    localDB can also be used in production if the full functionality of SQL Server is not needed. There are some limitations to localDB however there are quite a few applications where localDB will work fine for people who need something more than SQLite or who need some degree of SQL Server functionality but not the entire huge thing.
  • Demir
    Demir over 8 years
    sqlcoffee.com/sqlserver2012_0004.htm gives useful explanations about LocalDB.