Wednesday, January 3, 2018

[MSSQL] Set max server memory using command | 用指令設定伺服器最大記憶體

sql_maxmemory3
Few days ago I am testing a issue, set maximum server memory to very low (min limit 128 if you set the value below it) on SSMS, after apply the setting, SSMS pop out error , broken connection from SQL server and can't connect back due to the memory to low can't accept connection.
幾天前我在測一個問題,用SSMS把DB的最大伺服器記憶體設到非常低(系統最低是128MB),執行這個設定後,SSMS跳出錯誤,與SQL伺服器的連線中斷而且因為記憶體太少而連不回去。

I take some time to find out how to change the setting from command line, here is the guide.
我花了點時間找出怎麼用指令把設定改回來,下面是教學。