I just installed SQL Server Developer Edition and SQL Server Management Studio, how can I configure the server? I want to configure it to have server name localhost-sql-server, with a login/password. I found the configuration manager but not sure where I can modify this.

  • Did u installed or downloaded? Because if you have installed server name and login section comes during installation which should answer your question? Also what version are you installing? – KASQLDBA Jun 25 '19 at 14:19
  • 2
    The server name is the name of the machine on which you installed SQL Server. Is there a particular reason you need to specify a different name when connecting? You could simply create a DNS alias. – Dan Guzman Jun 25 '19 at 14:25

For your first question:

I want to configure it to have server name localhost-sql-server

This is normally done during installation. From the "Install SQL Server from the Installation Wizard (Setup)" article:

On the Instance Configuration page, specify whether to install a default instance or a named instance.

You would want a named instance. Instance names are limited to 16 characters and cannot contain hyphens (thanks to Dan Guzman for pointing that out), so you unfortunately can't name it "localhost-sql-server" per your original request.

I typically have multiple versions of SQL Server installed on my laptop, for different development projects, and name them "SQL2017" or "SQL2016" per the version installed. You may want to go with that route.

Once that's done, you can connect to it using the server name ".\SQL2017" (the computer name is part of the connection, which you can replace with ".\" for local connections).

I would recommend uninstalling SQL Server and setting it up this way from the start. I'm not aware of a simple way to change a default (standalone) instance to a named instance.

For your second question:

with a login/password

That's also normally done during installation, here's a relevant quote from the same docs page:

Use the Database Engine Configuration - Server Configuration tab to specify the following:

Security Mode - Select Windows Authentication or Mixed Mode Authentication for your instance of SQL Server. If you select Mixed Mode Authentication, you must provide a strong password for the built-in SQL Server system administrator account.

You would want mixed mode. Once the server is set up, you could connect with the "sa" account and create a login and user with the desired password:

CREATE LOGIN YourUserName   
    WITH PASSWORD = 'a strong password';
CREATE USER YourUserName FOR LOGIN YourUserName;

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.