Ali Shah
asked on
SQL Server Eating Up All Memory in My Laptop
Hi guys,
There were some issues on the installation of SQL Server and i have re-installed it. I have also ATTACHED the existing database which is 12GB. After that the SQL Server is eating up all my RAM (16 GB) within 15-20 minutes and definitely it is stopping working me.
I have restarted the laptop and the SQL Services but no luck. Any idea why is this happening?
regards
There were some issues on the installation of SQL Server and i have re-installed it. I have also ATTACHED the existing database which is 12GB. After that the SQL Server is eating up all my RAM (16 GB) within 15-20 minutes and definitely it is stopping working me.
I have restarted the laptop and the SQL Services but no luck. Any idea why is this happening?
regards
ASKER
Thanks for your answer. I have already set the maximum limit to 8 gb but it slows down the things dramatically. and as said this is on my laptop so i have restarted it number of times.
Also it was fine prior to reinstalling the server. It never used that much memory. now if i don't set maximum limit it crashes RAM in 15 minutes and if i do set maximum limit the queries are extremely slow.
Also it was fine prior to reinstalling the server. It never used that much memory. now if i don't set maximum limit it crashes RAM in 15 minutes and if i do set maximum limit the queries are extremely slow.
Restart the services once and try.. Also see which query is taking up all the memory.
Check for inactive sessions ? Run below query from Brent<<https://www.brentozar.com/blitzcache/long-running-queries/>> and check.
Check for inactive sessions ? Run below query from Brent<<https://www.brentozar.com/blitzcache/long-running-queries/>> and check.
SELECT st.text,
qp.query_plan,
qs.*
FROM (
SELECT TOP 50 *
FROM sys.dm_exec_query_stats
ORDER BY total_worker_time DESC
) AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp
WHERE qs.max_worker_time > 300
OR qs.max_elapsed_time > 300
SQL Server consumes that much memory which user will allow it.By default, that might be encompassing 100% of memory.This may be reason the reason. You may go through this link :
http://dba.stackexchange.com/questions/47431/why-is-sql-server-consuming-more-server-memory.
http://dba.stackexchange.com/questions/47431/why-is-sql-server-consuming-more-server-memory.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Neither of the suggestion worked for me
1. Quick fix will be restart the server.
2. Consuming all memory is the default behavior of SQL SERVER. If you dont specify min and max server memory configuration then SQL SERVER will consume all the memory available. It is by DESIGN.
<<For below settings you must consult your Infra Team.>>
3. Setting MIN and MAX Server memory. <<Use article for configuration settings>> https://support.microsoft.com/en-us/kb/319942
4. Max memory limits only Buffer Pool size. It does not limit unreserved memory.
Read how much memory your SQL needs- http://www.sqlskills.com/blogs/jonathan/how-much-memory-does-my-sql-server-actually-need/
Hope it helps !!