To install SQL Server on Windows, download the installer from Microsoft's SQL Server downloads page, run setup.exe as an administrator, choose New SQL Server standalone installation, pick an edition, select Database Engine Services, add yourself as a SQL Server administrator, and select Install. Management Studio is a separate download.
The steps below follow the setup wizard in SQL Server 2025, the current release. SQL Server 2019 and 2022 are almost identical, and the differences are called out. If you only need an instance for development, the Docker route at the end is faster.
Pick an edition first
Edition
Cost
Production use
Limits worth knowing
Enterprise Developer
Free
No, development and test only
None. Every Enterprise feature
Standard Developer
Free
No, development and test only
Same feature set and limits as Standard
Express
Free
Yes
50 GB per database, 4 cores, about 1.4 GB of buffer pool memory, no SQL Server Agent
Evaluation
Free for 180 days
No
Every Enterprise feature, then it expires
Standard
Paid
Yes
32 cores, 256 GB buffer pool
Enterprise
Paid
Yes
Operating system maximums
SQL Server 2022 and earlier have a single Developer edition, equivalent to Enterprise, and limit Express databases to 10 GB. The Standard Developer edition is new in SQL Server 2025 and is useful when production runs Standard: you cannot accidentally build on an Enterprise-only feature. Web edition is not available from SQL Server 2025 onward.
For learning or development, choose a Developer edition. Choose Express only when you need a free instance you are allowed to run in production.
Before you start
Operating system: Windows 10 or later, or Windows Server 2019 or later, on an x64 processor. The paid Enterprise edition is supported on Windows Server only. ARM-based Windows machines are not supported.
It's caching by design, not a leak, but the default limit is 'everything'. How to set max server memory and tell real memory pressure from a full buffer pool.
Disk: at least 6 GB free on the system drive, even if you install to another drive.
Memory: 1 GB minimum (512 MB for Express). Plan for 4 GB or more.
Rights: you must be a local administrator.
Pending restarts: if Windows is waiting for a reboot, setup's rule check fails. Restart first.
Not a domain controller. Setup allows it, Microsoft advises against it, and several features do not work there.
Install with the setup wizard
Run the downloaded installer. The small web installer offers Basic, Custom and Download Media. Basic installs the Database Engine with defaults and asks almost nothing. Custom downloads the full media and opens the SQL Server Installation Center, which is the path described here. If you have an ISO, mount it and run setup.exe.
Installation Center. Select Installation on the left, then New SQL Server standalone installation or add features to an existing installation.
Edition. Choose a free edition from the list, or enter a product key, or choose pay-as-you-go billing through Azure. In SQL Server 2019 this page is called Product Key.
License Terms. Accept and continue.
Microsoft Update and Product Updates. Let setup include the latest updates if the machine has internet access.
Install Rules. Setup checks for blockers. A Windows Firewall warning is normal: it only tells you the firewall is on and remote access will need a rule later. Do not turn the firewall off. Anything marked Failed must be fixed before you can continue.
Azure Extension for SQL Server. This page, added in SQL Server 2022, is selected by default and connects the instance to Azure Arc. If you do not have an Azure subscription or do not want the connection, clear the checkbox and move on. You can connect later.
Feature Selection. Tick Database Engine Services. That is all most installations need. Add Full-Text and Semantic Extractions for Search, SQL Server Replication, Analysis Services or Integration Services only if you will use them, because each one adds services to patch. Reporting Services and Management Studio are not in this list. They have their own installers.
Instance Configuration. A default instance is reached by the machine name alone, for example SERVER01. A named instance is reached as SERVER01\NAME and lets several instances share one machine. Use the default instance unless one already exists.
Server Configuration. Leave the service accounts at their defaults (virtual accounts such as NT Service\MSSQLSERVER) unless your organization issues domain service accounts. Tick Grant Perform Volume Maintenance Task privilege so data files can grow without being zeroed first. Check the Collation tab now: the default comes from the Windows locale, and changing the server collation after installation means rebuilding the system databases.
Database Engine Configuration. This page has several tabs:
Server Configuration. Choose Windows authentication mode unless an application needs SQL logins. Mixed Mode enables the sa login and requires a strong password for it. Then select Add Current User. If you leave the administrators list without anyone you can log in as, you will be locked out of your own instance.
Data Directories. On a server, put data, log and backup files on drives other than C:.
TempDB, MaxDOP and Memory. Setup proposes values based on the machine's cores and RAM. Accept the MaxDOP proposal, and on the Memory tab choose the recommended maximum so SQL Server leaves memory for Windows. The MaxDOP and Memory tabs were added in SQL Server 2019.
Ready to Install. Review the summary. The page shows the path of a ConfigurationFile.ini that records your choices. Keep it: you can replay it for an unattended install of an identical instance.
Complete. Every feature should show Succeeded. If one failed, the link on this page opens the summary log.
Install Management Studio
SQL Server Setup does not install a query tool. Download SQL Server Management Studio (SSMS) separately. Current SSMS versions install through the Visual Studio Installer: you run a small bootstrapper, vs_SSMS.exe, and select Install. One copy of SSMS manages every supported SQL Server version, so you never need a version-matched copy.
If you prefer a lighter cross-platform tool, the MSSQL extension for Visual Studio Code connects to the same instance.
Verify the installation
Open SSMS, enter the server name (localhost or . for a default instance, .\NAME for a named instance), keep Windows Authentication and connect. Then run:
SELECT @@SERVERNAMEAS ServerName,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductUpdateLevel') AS UpdateLevel;
Or check from PowerShell without any client tools:
Get-Service -Name 'MSSQL*' | Select-Object Name, Status
The Database Engine service is MSSQLSERVER for a default instance and MSSQL$NAME for a named one.
After installing
Patch. Install the latest cumulative update. Setup media is almost never current.
Remote connections. Developer and Express editions install with the TCP/IP protocol disabled. Enable it in SQL Server Configuration Manager under SQL Server Network Configuration, restart the service, and open the port in Windows Firewall:
A default instance listens on TCP 1433. A named instance uses a dynamic port unless you set a fixed one, and clients find it through the SQL Server Browser service on UDP 1434.
Backups. A new instance has none configured.
Common problems
"The certificate chain was issued by an authority that is not trusted." Recent SSMS versions and drivers encrypt connections by default, and a fresh instance uses a self-signed certificate. On a development machine, tick Trust server certificate in the connection dialog. In production, install a proper certificate.
Setup fails on Windows 11 with errors about misaligned log I/O or the service not starting. Some NVMe drives report a sector size larger than 4 KB, which SQL Server does not support. Microsoft documents a registry setting, ForcedPhysicalSectorSizeInBytes, as the fix. See the hardware requirements page linked below.
Cannot connect by name to a named instance from another machine. The SQL Server Browser service is stopped, or UDP 1434 is blocked.
"Login failed" for your own Windows account. You were not added as an administrator in step 10. Restarting the instance in single-user mode (the -m startup parameter) lets a local Windows administrator connect and add the login.
Uninstall
Open Settings > Apps, find the Microsoft SQL Server entry for your version, choose Uninstall, then Remove, and select the instance and features. Database files you created are left on disk and must be deleted by hand.
Docker and Linux
SQL Server also runs on Linux, and a container is the quickest way to get a disposable instance:
Replace <password> with your own. It must be at least eight characters and include three of: uppercase letters, lowercase letters, digits and symbols. If it does not, the container starts and stops again within seconds. docker logs sql1 shows why.
sqlcmd prompts for the password, and -C trusts the container's self-signed certificate. From the host, connect to localhost,1433 with SSMS or any driver.
Things to know about containers:
Without -e MSSQL_PID=..., the container runs a Developer edition.
Data lives inside the container and is lost when you remove it. Mount a volume at /var/opt/mssql to keep it.
The image is x86-64 only. Microsoft does not support running it under emulation, which includes Docker on Apple silicon Macs. It often works for development, but treat it as unsupported.
For a native Linux install on a supported distribution such as Red Hat Enterprise Linux or Ubuntu, register Microsoft's package repository, install the mssql-server package, then run sudo /opt/mssql/bin/mssql-conf setup to choose the edition and set the sa password.
NOLOCK doesn't just risk dirty reads. It can skip rows, count rows twice and fail with error 601. Read Committed Snapshot Isolation removes the blocking without the wrong answers.
Execution plans tell you exactly how SQL Server ran your query. Learn which operators matter, how to spot bad estimates and what the warnings really mean.