Solved

SQL 2008 and Server 2008

Posted on 2011-09-22
11
305 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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

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

Suggested Solutions

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…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

809 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