After installation ......
C:\Users\xx>sqllocaldb i
MSSQLLocalDB
C: \ Users \ xx> sqllocaldb i mssqllocaldb
not automatically create instances "mssqllocaldb".
C: \ Users \ xx> sqllocaldb c mssqllocaldb
has been used to create a version 14.0.1000.169 LocalDB instance "mssqllocaldb".
C: \ the Users \ xx> sqllocaldb S mssqllocaldb
LocalDB instance "mssqllocaldb" has started.
// ssms connection
server name: (LocalDB) \ mssqllocaldb
Windows Authentication
Later you can go in the "Security" - Enable sa> "login" in.
// subsequent
stop the instance name
sqllocaldb p MyLocaldb
Delete this instance name
sqllocaldb d MyLocaldb
// online backup data
shared instance name
special mention here the name of the shared instance
the case of shared instance name to use is that you also have several processes at the same time need to access the database, then the situation will happen occupied, this situation needs to be shared examples of names to deal with this problem.
Shared use instance names.
1, declare a shared instance name.
sqllocaldb h "MyLocaldb" "mylocaldb"
so that we can have access to the instance name MyLocaldb through shared instance name mylocaldb
2, access to shared instance name
(LocalDB) \. \ Mylocaldb
(created here over shared instance name sometimes there will be access timeout, or can not find the shared name. Here I checked the official statement is that there will be a delay Diudiu, to wait for a while to visit, I usually practice is to restart the computer will be able to access)
3, stop sharing the instance name
sqllocaldb u. \ Mylocaldb
stop over can not be used.
SSMS is generally used when connecting tool connected, but also to open with administrator privileges. Instance name becomes (localdb) \. \ Mylocaldb first \ back. \ Mylocaldb is shared instance of Alias
Online Recruitment content
File instance name localdb create the folder where (here you can view the log)
C: \ the Users \ XXX \ AppData \ Local \ in the Microsoft \ in the Microsoft SQL Server Local DB \ the Instances
where I store all the instance name, and then if you delete the instance name, you can check here, there is no delete, no, you will help, because the deletion localdb is not to force.
localdb startup files. (All your commands are executing it.)
C: \ Program Files \ in the Microsoft SQL Server \ 110 \ Tools \ Binn
where 110 is not necessarily, is the version with localdb you to install, such as localdb 2012 is 110 2016 is 130, if you are filled with a variety of PC version of localdb, there is a syntax to specify which version to use
REM Create an instance of LocalDB
"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create LocalDBApp1
REM Start the instance of LocalDB
"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" start LocalDBApp1
REM Gather information about the instance of LocalDB
"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" info LocalDBApp1
Adjust the value according to your version.
Reference https://www.cnblogs.com/Grande/p/10002123.html, thanks author!