Software development, the database is certainly essential, of course, the database, the best compatibility in. NET development is Microsoft's pro-son "SQL Server", but the installation of SQL Server installed in a random version is a multi-g or hundreds of trillion, After the installation of the performance of the computer is too large, the computer configuration of the words will be various cards.
So through the investigation found that Microsoft in the existing compact version of SQL Server and the basis of the streamlining, it seems that after SqlServer2012 launched the SQL Server Express LocalDB database, that is, sqllocaldb,2012 version of more than 30 trillion, 2014 version of 40 trillion, install vs advanced version of the time will be installed by default, the use of the time do not have to go to a mess of services, for individual learning research is basically enough.
Anyway
First, sqllocaldb database download:
Version 2012: https://www.microsoft.com/zh-cn/download/details.aspx?id=29062
Version 2014: Https://download.microsoft.com/download/5/7/4/574AAAA3-FA70-40B9-9DCE-17450FC05905/CHS/x64/SqlLocalDB.msi
Second, the installation: Double-click to run, there is no too many options;
After installation, install the default folder location: C:\Program Files\Microsoft SQL Server\110\tools\binn
After the installation completes 2012, there will be a default instance for v11.0,2014 by default : mssqllocaldb;
Third, use:
1. Add a link in vs Service Explorer:
Open Server Explorer and right click on "Data Connection" to create a new SQL Server database.
The default instance of version 2012 is named: v11.0, so the server name is filled in: (LocalDB) \v11.0.
The default instance of version 2014 is named: MSSQLLOCALDB, so the server name is filled in:(localdb) \mssqllocaldb,
Identity Select Window authentication, then select the specified database, the default database has master, module, msdb, tempdb four databases.
If you want to link to an instance created by the user yourself, the instance name should fill in the instance created by the user himself, and the instance will be created in the next step.
2. Create a new database:
Open a Command Prompt window, enter: SqlLocalDB.exe command to enter;
Create a SQL instance with the name "Test" (note that there can be no semicolon after the command ):
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
Version 3, 2014 default connection string: Data source= (localdb) \mssqllocaldb;initial catalog=master;integrated security=true
To connect by using a file name to a specific database , such as MDF files, use a similar
"server= (LocalDB) \mssqllocaldb; Integrated security=true; Attachdbfilename=d:\data\mydb1.mdf " connection string for the connection.
Reference Documentation:
Https://msdn.microsoft.com/zh-cn/library/hh510202.aspx
Http://www.cnblogs.com/shanyou/archive/2012/09/05/2672590.html
SqlLocalDB2014 using Notes