Solved

SQL Server Eating Up All Memory in My Laptop

Posted on 2016-11-24
6
24 Views
Last Modified: 2016-12-27
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
0
Comment
Question by:shah36
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41900599
Have you set the max memory of the server..?

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 !!
0
 

Author Comment

by:shah36
ID: 41900611
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.
0
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41901087
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.

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

Open in new window

0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 8

Expert Comment

by:Jason clark
ID: 41901142
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.
0
 

Accepted Solution

by:
shah36 earned 0 total points
ID: 41902294
Thanks for all of your suggestions, however nothing of those worked and i was getting stuck so our IT has provided me with the new laptop with new OS and SQL Server installed.
0
 

Author Closing Comment

by:shah36
ID: 41908430
Neither of the suggestion worked for me
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question