Tuesday, 7 August 2018 By Fred Mintah
Tuesday, 7 August 2018
Connecting to Microsoft SQL Server LocalDB can be very simple however it may seem daunting if you don't know how to do it, even among SQL experienced users.
Firstly, Microsoft SQL Server Express LocalDB is a lightweight "on demand" version of SQL Server Express and it's intended for developers. It is very easy to install and doesn’t require any complex configuration task to create an instance or to use the database. The Introduction on the installation of Local DB be found on “How to install Microsoft SQL Server Express LocalDB” article or SQL Server 2016 Express LocalDB
Firstly, determine the version of LocalDB version you have installed. To do this,
- Open Command Prompt
- Enter sqllocaldb info
3. Now you can connect to the LocalDB via SQL Server Management Studio with the version information
You can also connect to the Default instance if your installation was configured as default. To do that, connect as shown in the image below.
In the Server name combo box of the Connect to Server window, enter (LocalDB)\ followed by a dot ((LocalDB)\.):
Once connection has successfully been established, open your Object Explorer, expand Databases tree and you'll see databases listed if databases have already been initialised or attached to the LocalDB in the past.
In my example, no databases have been initialised on this LocalDB server.
If you're unsure how to attached or create a new database on the LocalDB, follow this link Create new or attach a database on LocalDB