Solved

SQL 2008 and Server 2008

Posted on 2011-09-22
11
322 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 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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 video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

734 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