先把安装ISO的文件copy过来,虚拟机则用挂一个虚拟光驱即可,然后cd进入目录,执行以下命令
安装 SQLEngine,Replication
Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine,Replication /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="计算机名\登陆用户名" /SQLSVCPASSWORD="windows的登陆密码" /SQLSYSADMINACCOUNTS="计算机名\登陆用户名" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /TCPENABLED=1 /IACCEPTSQLSERVERLICENSETERMS /SECURITYMODE=SQL /SAPWD=sa的密码
SQL SERVER 2019 安装全功能
Setup.exe /qs /ACTION=Install /FEATURES=SQLENGINE,FullText,Replication,AS,IS,Conn /PID="SQL序列号" /INSTANCENAME="MSSQLSERVER" /INSTANCEID="MSSQLSERVER" /SQLSVCACCOUNT="计算机名\登陆用户名" /SQLSVCPASSWORD="windows的登陆密码" /SQLSYSADMINACCOUNTS="计算机名\登陆用户名" /ASSVCACCOUNT= "NT Service\MSSQLServerOLAPService" /ASSYSADMINACCOUNTS="计算机名\登陆用户名" /ASSERVERMODE="MULTIDIMENSIONAL" /TCPENABLED=1 /IAcceptSQLServerLicenseTerms="True" /IACKNOWLEDGEENTCALLIMITS /SECURITYMODE=SQL /SAPWD=sa的密码
2019 server core 卸载SQL SERVER
Setup.exe /QS /Action=Uninstall /FEATURES=SQLENGINE,FullText,Replication,AS,IS,Conn(填写己安装的功能) /INSTANCENAME=MSSQLSERVER