SQL Server Management Studio (SSMS)

Connecting to Databases

SQL Server Management Studio (SSMS) provides multiple ways to connect to a SQL Server instance or Azure SQL Database. This guide walks you through the most common connection methods and options.

1. Using the Connect Dialog

  1. Launch SSMS.
  2. When the Connect to Server dialog appears, fill in the following fields:
    • Server type: Database Engine, Analysis Services, Reporting Services, Integration Services, or Azure Synapse.
    • Server name: The instance name (e.g., MYPC\SQLEXPRESS) or Azure server URL.
    • Authentication: Windows Authentication, SQL Server Authentication, or Azure Active Directory.
    • Login and Password: required for SQL Server or Azure AD authentication.
  3. Click Connect.

2. Connecting via Object Explorer Details

You can also connect directly from Object Explorer:

Right‑click on "Object Explorer" → "Add New Server..."

3. Using Registered Servers

Register frequently used servers for quick access:

View → Registered Servers → New Server Registration

4. Connection String Dialog

If you need to test or build a connection string, use the built‑in dialog:

File → Connect Object Explorer → "Advanced…" → "Connection Properties"

5. Command‑Line Connections

SSMS can be started with a specific connection from the command line:

ssms.exe -S tcp:myserver.database.windows.net,1433 -d MyDatabase -U mylogin -P mypassword

6. Azure Active Directory Authentication

When connecting to Azure SQL Database, you can use Azure AD authentication.

Authentication: Azure Active Directory – Universal with MFA support

7. Connection Options

Click the Options >> button in the Connect dialog to set advanced properties such as:

Sample Connection Strings

SQL Server Authentication

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Windows Authentication

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Azure AD Authentication (MFA)

Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;Authentication=Active Directory Interactive;

Common Issues & Troubleshooting

Related Topics