How to create a LOCALDB database and a DB instance

Source: Internet
Author: User
Tags connectionstrings

LocalDB is a new feature of SQL Server 2012, a lightweight database specifically tailored for developers, and describes how to use it.

How to create a LOCALDB database:

Open Server Explorer, right click on "Data Connection" to create a new SQL Server database, the server name is filled in: (LocalDB) \v11.0, which means connecting to the v11.0 instance.

Create a new database named "Work" and click the "OK" button to finish creating the database operation.

Modify the database connection string in the configuration file in the project.

< connectionStrings >    <  name= "Workdatabase"  connectionString= "Data source= (LocalDB) \v11.0;i Nitial catalog=work;integrated security=true; " />  </ connectionStrings >


You can also create a DB instance from the SqlLocalDB.exe tool.

This program is typically located in the following path: C:\Program Files\Microsoft SQL Server\110\tools\binn\sqllocaldb.exe

To create a test db instance:

SqlLocalDB.exe Create Test

To start the test DB instance:

SqlLocalDB.exe Start Test

To stop the test DB instance:

SqlLocalDB.exe Stop Test

Display Test DB instance information:

SqlLocalDB.exe Info Test

Show all DB instance information:

SqlLocalDB.exe Info

How to create a LOCALDB database and a DB instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.