Accidentally turned down SQL memory too low to log in, how do I fix?

Connect using the Dedicated Administrator Connection (DAC), which is guaranteed a minimal amount of resources in order to solve issues exactly like this one. For example, if you are connecting via Management Studio, launch a New Query window and just type ADMIN:servername instead of servername when it prompts you to connect. Ignore any errors you get which are usually benign as they are associated with Object Explorer, the database dropdown list, IntelliSense, etc. also trying to connect on your behalf (only one DAC connection is allowed).

More info here, here, and some troubleshooting here.


Alternatively (since had it happen twice before and the DAC trick didn't work for me), shut the SQL Server service down, then bring it back in "minimal configuration" mode, which is a modified version of single-user mode.

Via the command line, go to the path for the sqlservr.exe executable, as listed in the service. But instead of running sqlservr.exe -m, use sqlservr.exe -f"sqlcmd". This will ONLY allow connections from the named application, so everything else will fail, but you'll be able to connect, change the setting, issue the SHUTDOWN command from within SQLCMD, then bring it up normally.


From the command prompt start sqlCmd using the Didicated Administrator Connection (DAC). :

    C:\>sqlcmd -S ServerName -U sa -P  –A

Once you are connected execute the following to set the memory to 4Gigs. it should be enough to allow you to reconnect using the Management studio tool.

sp_configure 'show advanced options', 1;  
GO  
RECONFIGURE;  
GO  
sp_configure 'max server memory', 4096;  
GO  
RECONFIGURE;  
GO  

More on the DAC see : Dedicated Administrator Connection (DAC)https://msdn.microsoft.com/en-us/library/ms189595(v=sql.105).aspx