Thursday, September 24, 2020

There is insufficient system memory in resource pool 'internal' to run this query. SQL SERVER cannot start

 While playing with the DB, I was curious what will happen if I set the max memory of the sql server instance to 10mb.

So it crashed.


Now I cannot restart it.



This is how I fixed it.


Step 1 start the sqlserver instance with minimum settings.

1. open a command prompt as an administrator 



2. Go to the directory where SQL server is installed
    cd C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn
    then run 'sqlservr.exe -f -s <instance name>'






3. open a separate admin window like in step 1
4. type sqlcmd
EXEC sys.sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sys.sp_configure 'min server memory', 1024;
GO
EXEC sys.sp_configure 'max server memory', 4096;
GO
RECONFIGURE;
GO



5. Go back to the first window and do a ctrl c to shutdown the instance

6. Startup normal in the sql server configuration manager.
7. you are back in business







No comments:

Post a Comment