Here’s a complete step-by-step guide to set up a Microsoft SQL Server and configure user access for SQL Server Management Studio (SSMS).
This guide covers:
- Installing SQL Server
- Installing SSMS
- Enabling server authentication
- Creating logins and users
- Granting permissions
- Allowing remote access (optional)
Download Microsoft SQL Server (Developer or Express edition recommended).
Choose:
- Developer Edition (full features, free for dev)
- Express Edition (lightweight, free)
-
Select New SQL Server stand-alone installation
-
Choose edition
-
Accept license terms
-
At Feature Selection, select:
- ✔ Database Engine Services
In Database Engine Configuration → Server Configuration:
Select:
🔘 Mixed Mode (SQL Server authentication and Windows authentication)
Then:
- Set a strong sa password
- Click Add Current User (adds your Windows account as admin)
Finish installation.
Download and install SQL Server Management Studio separately (it is no longer bundled with SQL Server).
After installation:
-
Open SSMS
-
Connect using:
- Server type: Database Engine
- Server name:
localhostorSERVERNAME - Authentication: Windows Authentication
If Mixed Mode wasn't enabled during installation:
-
Open SSMS
-
Right-click server → Properties
-
Go to Security
-
Select:
SQL Server and Windows Authentication mode
-
Click OK
-
Restart SQL Server service
Restart via:
- SQL Server Configuration Manager OR
- Services.msc → Restart “SQL Server (MSSQLSERVER)”
A Login allows access to the SQL Server instance.
- In SSMS → Expand Security
- Right-click Logins → New Login
Fill in:
- Login name:
testuser - Select: SQL Server authentication
- Enter password
- Uncheck: Enforce password policy (optional)
- Default database: Choose your database
Click OK.
CREATE LOGIN testuser
WITH PASSWORD = 'StrongPassword123';CREATE DATABASE TestDB;A User maps a Login to a specific database.
- Expand Databases
- Expand your database
- Expand Security
- Right-click Users → New User
Fill in:
- User type: SQL user with login
- Login name: testuser
- Username: testuser
- Default schema: dbo
Click OK.
USE TestDB;
CREATE USER testuser FOR LOGIN testuser;You can grant:
ALTER ROLE db_owner ADD MEMBER testuser;ALTER ROLE db_datareader ADD MEMBER testuser;
ALTER ROLE db_datawriter ADD MEMBER testuser;ALTER ROLE db_datareader ADD MEMBER testuser;-
Open SQL Server Configuration Manager
-
Go to:
- SQL Server Network Configuration
- Protocols for MSSQLSERVER
-
Enable: ✔ TCP/IP
-
Restart SQL Server
Default SQL Server port:
TCP 1433
Add firewall rule:
- Open Windows Defender Firewall
- Add inbound rule for TCP 1433
Run:
ipconfigUse IPv4 address to connect remotely:
192.168.1.10,1433
Open SSMS:
- Server name:
SERVER_IP,1433 - Authentication: SQL Server Authentication
- Login: testuser
- Password: ********
Click Connect.
- Never use
safor applications - Use strong passwords
- Grant least privilege access
- Disable unused logins
- Consider Windows Authentication for domain environments
- Change default port in production
- Use SSL encryption for remote access
For business/production environments consider:
- Install on Windows Server (e.g., Windows Server 2022)
- Regular backups
- Enable maintenance plans
- Configure SQL Agent jobs
- Restrict public network exposure
- Use VPN for remote access
| Step | Purpose |
|---|---|
| Install SQL Server | Database engine |
| Install SSMS | Management tool |
| Enable Mixed Mode | Allow SQL logins |
| Create Login | Server-level access |
| Create User | Database-level access |
| Grant Roles | Control permissions |
| Enable TCP/IP | Remote access |