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

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

After installation, I start SSMS and it asks me to connect to the database server. I donโ€™t have them, and I saw that you can create a "local" database by typing only a dot. "For the server name and use Windows authentication.

This does not work; how to do it?

+19
source share
3 answers

You need to download and install SQL LocalDB . This is a special edition of SQL Server that does not allow remote connections and only supports integrated Windows authentication. This is a simple MSI installation with one click, so it is easy to deploy.

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

The above means that now you need to download and run a small bootloader (approximately 5 MB), select LocalDB (44 MB), and the Microsoft bootloader will download the MSI package to your chosen folder. Then just run the MSI package and install LocalDB.

+2
source

Open SSMS โ†’ Connect and enter the server name: (LocalDb)\MSSQLLocalDB and select Windows Authentication.

For reference:

enter image description here

+61
source

To restore your dump, you need one server on which the dump will be loaded. For this you need one MS server. You can connect to the server using a username and password. After connecting to the server, you can create the database in which you want to import the dump.

If your SQL dump contains a create database statement, you do not need to create it.

If it is possible to open the SQL dump in a text file, you can see the database name needed to create it or the existing instructions for creating the database.

0
source

Source: https://habr.com/ru/post/1266420/


All Articles