mssql-docker
mssql-docker copied to clipboard
[2019-latest] mssql-conf not works
Hi I tried to configure mssql memoryi paramters with this command:
/opt/mssql/bin/mssql-conf set memory.memorylimitmb 1024
Warning: could not create log file for mssql-conf at /var/opt/mssql/log/mssql-conf/mssql-conf.log.
This program must be run as superuser or as a user with membership in the mssql
group.
The problem is this by default:
mssql@mssql-0:/$ /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -C -W
Password:
1> SELECT name,value,value_in_use,description FROM sys.configurations WHERE name LIKE '%memory%';
2> GO
name value value_in_use description
---- ----- ------------ -----------
index create memory (KB) 0 0 Memory for index create sorts (kBytes)
min memory per query (KB) 1024 1024 minimum memory per query (kBytes)
min server memory (MB) 0 16 Minimum size of server memory (MB)
max server memory (MB) 2147483647 2147483647 Maximum size of server memory (MB)
tempdb metadata memory-optimized 0 0 Tempdb metadata memory-optimized is disabled by default.
(5 rows affected)
Any other way? Where can i find what key-values accepted in mssql.conf?
I successfully modified with sql:
EXEC sp_configure 'max server memory', 1024; -- Set maximum memory to 1024 MB
RECONFIGURE;
But still this container would need working mssql-conf and mssql also needs a proper mssql.conf docs.
Hi I tried to configure mssql memoryi paramters with this command:
/opt/mssql/bin/mssql-conf set memory.memorylimitmb 1024 Warning: could not create log file for mssql-conf at /var/opt/mssql/log/mssql-conf/mssql-conf.log. This program must be run as superuser or as a user with membership in the mssql group.The problem is this by default:
mssql@mssql-0:/$ /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -C -W Password: 1> SELECT name,value,value_in_use,description FROM sys.configurations WHERE name LIKE '%memory%'; 2> GO name value value_in_use description ---- ----- ------------ ----------- index create memory (KB) 0 0 Memory for index create sorts (kBytes) min memory per query (KB) 1024 1024 minimum memory per query (kBytes) min server memory (MB) 0 16 Minimum size of server memory (MB) max server memory (MB) 2147483647 2147483647 Maximum size of server memory (MB) tempdb metadata memory-optimized 0 0 Tempdb metadata memory-optimized is disabled by default. (5 rows affected)Any other way? Where can i find what key-values accepted in mssql.conf?
The 'problem' is that you're executing the command as mssql user which has no permissions on changing SQL Server config and most likely on /var/opt/mssql. To use mssql-conf you'll need to run as root or with sudo, even inside of the container.
You can find some configuration values here: https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-ver16
understood but i used the mssql docker image and by default it not works. So i think to fix this Dockerfile modification needed.