?
Solved

SQL 2008 and Server 2008

Posted on 2011-09-22
11
Medium Priority
?
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 5

Accepted Solution

by:
zvytas earned 2000 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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