Solved

SQL Server Eating Up All Memory in My Laptop

Posted on 2016-11-24
6
21 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to share SSIS Package? 6 37
SQL Server 2012 - Merge Replication Issue 1 22
Scheduled Tasks Tweak 5 30
VB.net and sql server 4 35
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

770 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