[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

SQL 2008 and Server 2008

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
Epic7
Asked:
Epic7
  • 6
  • 5
1 Solution
 
zvytasCommented:
Run the following query:

sp_configure 'show advanced options', 1
RECONFIGURE
GO

sp_configure 'max server memory'
0
 
Epic7Author Commented:
For a noob, where am i running this query?
0
 
zvytasCommented:
In the SQL Management Studio.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Epic7Author Commented:
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
 
zvytasCommented:
Execute the following query:

sp_configure 'max server memory', 5120;
GO
RECONFIGURE;
GO
0
 
Epic7Author Commented:
Will this require a reboot or service outage?
0
 
zvytasCommented:
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
 
Epic7Author Commented:
So what query would tell me real time of ram usage for the SQL database.
0
 
zvytasCommented:
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
 
Epic7Author Commented:
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
 
zvytasCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now