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