How to connect to a local database in SQL Server Management Studio?

Sql ServerDatabaseSsms

Sql Server Problem Overview


I have downloaded the SQL Server Management Studio (SSMS) 2016 to recover a huge .bak file which is an old backup of a database. But first of all I need to connect to a DB Server.

After install, I execute SSMS and it asks me to connect to a DB Server. I don't have any and I saw that it is possible to create a "local" db by typing only a dot '.' for Server Name and use Windows authentication.

It is not working; how to do it?

Sql Server Solutions


Solution 1 - Sql Server

  1. Open SSMS -> Connect
  2. Server name: (LocalDb)\MSSQLLocalDB,
  3. Choose Windows Authentication.

For a reference:

enter image description here

Solution 2 - Sql Server

You need to download and install SQL LocalDB. It is a special edition of SQL Server that does not allow remote connection and supports windows integrated authentication only. It is a simple one click MSI install so it is easy to deploy.

> To download and install SQL Server 2016 Express, go to SQL Server > downloads. LocalDB is a feature you select during installation, and is > available when you download the media. If you download the media, > either choose Express Advanced or the LocalDB package.

The above means that now you have to download and run a small downloader (cca 5 MB), select LocalDB (44 MB) and the Microsoft downloader will download MSI package to the folder you select. Then just run MSI package and LocalDB gets installed.

Solution 3 - Sql Server

To recover your Dump, you need one server where your dump will get uploaded. For this you need one MS server. you can connect to server using username and password. After connection to server you can create a DB in which you want the dump to get imported.

If your SQL dump contains create Database statement, then you don't need to create one.

If its possible to open SQL dump in text file, you can see Database name required to create or its already have statement to create DB.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlexView Question on Stackoverflow
Solution 1 - Sql ServerXinView Answer on Stackoverflow
Solution 2 - Sql ServerVojtěch DohnalView Answer on Stackoverflow
Solution 3 - Sql Serverjeetendra MandalView Answer on Stackoverflow