This is a guide to installing a T-SQL server on Windows or Mac, so you can start using T-SQL.
This will guide you through installing the server and editor and then creating the databases. The editor we will use is Azure Data Studio.
- Navigate to Azure Data Studio and download the 'User Installer' for windows.
- Run the installer, clicking through to accept all the default options.
- Launch Azure Data Studio and click 'Deploy a Server'.
- A window opens asking you to select deployment options. Choose 'SQL Server on Windows' and click 'Select'.
- The deployment prerequisites window opens. Click 'Select'. This will cause SQL Server 2019 Developer Edition to download and begin installing.
- In the SQL Server installer window, choose installation type 'Basic'.
- Read and accept the terms and conditions.
- The install location window opens. Leave the default install location. Click 'install'.
- Once installation completes, click 'Close'.
- In Azure Data Studio click 'Create a connection'.
- The 'Connection Details' panel opens. Make sure the Connection type is 'Microsoft SQL Server' and the Authentication type is 'Windows Authentication'. For Server, type 'localhost'. Leave the username and password blank. Click 'Connect'.
- Azure Data Studio is now connected to your SQL Server.
- Right click this link to the T-SQL database script and click 'save link as'. Save the file somewhere you can find it. The filename should be 'T-SQL-database.sql'.
- Find 'T-SQL-database.sql' on your computer and click and drag it into the Azure Data Studio window.
- Click the green play button to execute the script, or press F5.
- The databases have now been created.
- Navigate to Azure Data Studio and download the '.zip file' for macOS.
- Extract 'Azure Data Studio' (app file) from the zip file. This should happen automatically after your download.
- Drag 'Azure Data Studio' (app file) to the Applications folder.
- The remainder of the process involves installing Docker and using it to pull a SQL Server container. Follow the guide here.
- Once you have connected Azure Data Studio to a local SQL Server 2019 instance, you are done.
- Control-click this link to the T-SQL database script and click 'save link as'. Save the file somewhere you can find it. The filename should be 'T-SQL-database.sql'.
- Find 'T-SQL-database.sql' on your computer and click and drag it into the Azure Data Studio window.
- Click the green play button to execute the script, or press F5.
- The databases have now been created.