MS SQL Server Installation Guide (edit)

For SQL Server 2019 Express Edition in Windows Server 2019

  • Configure: Allow remote connections to this server
  • Configure: SQL Server Configuration Manager > Protocols for MSSQLSERVER > TCP/IP (Enabled) > TCP/IP Properties > IP Addresses tab
    • IP Address: 10.10.10.10 (Enter the Public IP Address)
    • TCP Port: 1433
  • Configure: Windows Defender Firewall with Advanced Security > Inbound Rules > New Rule... > Port:
    • TCP (selected)
    • Specific local ports: 1433 (enter)
    • Allow the connection (selected)
    • Domain, Public, Private (checked)
    • Name: SQL SERVER 1433 (enter)

Create Login

USE [master]
GO
CREATE LOGIN [test_user] WITH PASSWORD=N'Abc@123', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
GO
USE [test_db]
GO
CREATE USER [test_user] FOR LOGIN [test_user]
GO
USE [test_db]
GO
ALTER ROLE [db_owner] ADD MEMBER [test_user]
GO