'How to connect to a local database in SQL Server Management Studio?
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?
Solution 1:[1]
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 2:[2]
- Open
SSMS
->Connect
- Server name:
(LocalDb)\MSSQLLocalDB
, - Choose Windows Authentication.
For a reference:
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | |
Solution 3 | jeetendra Mandal |