Solved

SQL 2008 and Server 2008

Posted on 2011-09-22
11
286 Views
Last Modified: 2013-11-05
How do i determine how much ram is dedicated to a SQL database? I have a 14 GB Server and i am told SQL was dedicated 10 GB of those resources.. Where can i find out how much is being allocated for SQL.

Reason i am asking is because the server is in a virutal machine and it appears to only be getting 6 GB of ram instead of the 14 GB.. My thought is that because it's only given it 6 GB than the SQL database would assume it gets the entire 6 GB everytime it runs? Would that be a correct statement?

vmware, sql 2008 , server 2008 R2 64bit
0
Comment
Question by:Epic7
  • 6
  • 5
11 Comments
 
LVL 5

Accepted Solution

by:
zvytas earned 500 total points
ID: 36580936
Run the following query:

sp_configure 'show advanced options', 1
RECONFIGURE
GO

sp_configure 'max server memory'
0
 
LVL 1

Author Comment

by:Epic7
ID: 36581053
For a noob, where am i running this query?
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581060
In the SQL Management Studio.
0
 
LVL 1

Author Comment

by:Epic7
ID: 36581214
So it is setup with 10,240 MB = 10.24 gb of ram.

How would i go about changing the config_value to say 5 gb?
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581243
Execute the following query:

sp_configure 'max server memory', 5120;
GO
RECONFIGURE;
GO
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:Epic7
ID: 36581361
Will this require a reboot or service outage?
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581466
Microsoft is a bit vague on that, they state that restart might be required to free up memory. My guess is that you will need to restart the server if it uses more than 5 GB at the time of the change.
0
 
LVL 1

Author Comment

by:Epic7
ID: 36581482
So what query would tell me real time of ram usage for the SQL database.
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581506
This one should do it:

CREATE TABLE #memusage (ID [int] IDENTITY(1,1), counterName [varchar] (MAX), value [bigint]);

INSERT INTO #memusage
EXEC ('DBCC MEMORYSTATUS');

SELECT value / 1024
  FROM #memusage
 WHERE [counterName] = 'Working Set';

DROP TABLE #memusage;
0
 
LVL 1

Author Comment

by:Epic7
ID: 36581536
very odd. So an application that is getting SQL time out's and such but when i run the script above it shows that the SQL DB is only using 305,472 MB..

Why would there be SQL time out's if the databse isn't even using a GB of ram?
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581596
There is no direct correction between memory usage and timeouts. Timeouts are outside of this thread, but I would suspect you have a slow running query, but this has nothing to do with memory usage.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now