Windows 2016 server install SQL Server2019


If the URL is invalid, just search by search engine.


Just click on the next step.

Deployment and configuration

After the installation is complete, begin to configure the database.

Configure username

Normally, sql authentication login is required, so we need to configure sa login.

Insert picture description here

Modify password

Insert picture description here


Insert picture description here

modify server properties

Insert picture description here

Configure remote connection

After completing sa login, you need to configure remote login.

Insert picture description here

Configure firewall

netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN

Create database

If there is an error, as follows

Insert picture description here

Execute sql

use master  --选择数据库
select spid from master.sys.sysprocesses where dbid = db_id('model');

use master  --选择数据库
declare @sql varchar(100) 
while 1=1 
  select top 1 @sql = 'kill '+cast(spid as varchar(3)) 
  from master..sysprocesses where spid > 50 and spid <> @@spid and  dbid = db_id('model')
  if @@rowcount = 0 
    break ;
  print(@sql)   --打印杀掉进程语句
  exec(@sql)    --执行杀掉进程语句

database backup

The database is backed up to the server disk. Note: it cannot be backed up locally (if you are connected remotely)

Database restore

Restore after obtaining the backup database package

Need to download the driver (Microsoft® SQL Server® 2012 Native Client-QFE)

Insert picture description here