sqlsrv 2017 for linux 相关设置记录


mssql-conf进行参数配置

.查看当前设置

cat /var/opt/mssql/mssql.conf

[sqlagent]
enabled = true
[EULA]
accepteula = Y
[network]
tcpport = 15559
[telemetry]
customerfeedback = false
[filelocation]
defaultdatadir = /data/mssqlserver/data


0.修改需要重启服务

systemctl stop mssql-server.service
systemctl start mssql-server.service

1.启用SQL Server代理(默认,SQL Server代理是禁用的)

/opt/mssql/bin/mssql-conf set sqlagent.enabled true

2.修改SQL Server排序规则(默认,对于所有版本该值设置为true)

/opt/mssql/bin/mssql-conf set-collation

3.配置客户反馈

/opt/mssql/bin/mssql-conf set telemetry.customerfeedback false

4.设置内存限制(默认是物理内存的80%)

/opt/mssql/bin/mssql-conf set memory.memorylimitmb 3328

5.修改TCP端口

/opt/mssql/bin/mssql-conf set network.tcpport <new_tcp_port>

6、给sa用户赋予文件夹权限

chown -R mssql:mssql /db

chmod 777 /db

查看权限

ls -la /db

7、备份数据库

sqlcmd -S localhost -U sa -P pw@123 -Q "backup database test to disk='/db/bak/test-1202110.bak'"




常用命令记录更新中...

声明:我的幸运年|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - sqlsrv 2017 for linux 相关设置记录


Carpe Diem and Do what I like