.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL Server not releasing memory back!

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Sql Server
Hi Guys,   I have done enough research on this topic and understood that SQL Server loves to cache as much memory as it can get hold of , but did not find a straight forward answer to my problem.   To explain things in detail, We are currently using SQL Server 2005 (64 Bit) on Windows 2003 (64 Bit) with 32 GB of RAM. This morning when I checked, it was showing the memory as 1GB RAM.  As soon as I stopped and restarted SQL Sever, I got back all 31GB of it! This is a live mirrored server, and the data is exposed through a .NET Win Application. Also, this is a dedicated SQL Server.   The min and max memory of the SQL Server is set at 16 and 2147483647 respectively.   My questions: 1. What can be done to make SQL Server release the memory back once the process is complete?   2. If this involves setting a limit to the max memory of the SQL Server, what can it be set to? And does setting the max memory low affect the performance of server?   3. I have other servers that are not dedicated SQL Servers which are showing the same 'memory' related problems, what should be the max memory setting on these ?   Any help in this regard is deeply appreciated.   Little_Birdie.

View Complete Post

More Related Resource Links

Not Releasing memory in sql server 2008 R2

HI I have a server with 8 Gb Ram I installed Sql server 2008 R2 Enterprise Edition on 64 bit platform Enterprise edition,in that for Sql server I allocated 6 GB of Ram I enable the AWE oprtion as well but in processing time it taking above 6 Gb ram like 7.gb or more after query completing its not release the memory how can I resolve this issue. Actually when we running quries it taking the memory and memory increasing gradually after executing the query its not releasing the memory per example I set maximum 6 GB per Sql server then I run the query memory will increase gradually like 3.4 gb,3.7 gb, 4.5gb,and so on it will reach 7.56gb then after it steadily over there not come to down I am using X64 bit windows server 2008 sql server 2008 R2. My system configuration is sql server 2008R2(10.0.3798) windows server 2008 X64 Ram is 8GB

SQL Server 2008 R2 on Windows Server 2008 R2 Memory Usage issues and not giving memory back


Okay so i have a physical server i am trying to replace with a virtual server. Its doing a large load process every night, about 190GB on one disk.

The VM is:

On vSphere 4.1 ESXi

O/S is Windows Server 2008 R2 Enterprise

SQL version is SQL Server 2008 R2 Enterprise.

4 vCpus

Now 20GB of memory

Disks assigned to this virtual are all seperate LUNs except for the O/S which is on a shared LUN which is not busy. So 1 LUN/Datastore per 'disk drive on this SQL virtual. Data/Log/TempDB/Backup are on their own LUNs.

All the recommended exclusions are in place for McAfee on a SQL Server.

ESXi 4.1 Enterprise host is not overcommitted. Has 4 x 6core 2.6Ghz AMD processors. BL685c G6 and 128GB of memory. Almost nothing else is running at the time i am testing this load and host is not overcommited or stressed or anywhere near it.

SQLServer process shows 127,236K Working Set and 130,040K Peak working set and memory Private working set 88,828k and Commit Size of 302,792k.

It seems when i check the memory usage in task manager it doesn't show much. In Windows 2003 X64 in would show the GB being used, like 8GB right in task manager. But i don't see that in Windows 2008 R2 task manager. I downloaded SysInternals and it shows the memory on the Windows 2008 r2 box as 15Gb of AWE memory. How can this be? The case is th

Talk Back: Voice Response Workflows with Speech Server 2007


Speech Server 2007 lets you create sophisticated voice-response applications with Microsoft .NET Framework and Visual Studio tool integration. Here's how.

Michael Dunn

MSDN Magazine April 2008

Saving JQuery date back to SQL Server


Hi..my web app uses lots of asp:textboxes and I can save this data back to SQL Server easily using a stored procedure..

however my JQuery datepicker uses an input textbox, how do I save the date entered into this control.

<input id="datepicker"type="text" /> back to server and can I use the same stored procedure that I use for the other data?



WmiPrvSE.exe causes a huge memory leak in SQL server 2008 R2, why?

My OS is windows server 2008 r2 data center 64 bit and my SQL server is server 2008 R2. The problem is when I open sql server, the WmiPrvSE.exe process consumes 20 - 60kbs every second. Several hours later, it eats up at least 200mbs memorry and this process seems like it will never stop. Can any experts give me some ideas to fit this mess? PS: My mainboard is Asus striker II formular, cpu is intel quad-core. Also, all my software are updated to latest version.

SQL server memory / speed configuration

Let me preface this by saying I'm aware of SQL server memory architecture, i.e it takes as much as it can get it's hand's on ...I've read through all the post's on here and they have been very helpful ... However if someone could take a look at these these configuration values ... I'm trying to get a new server dialed in, I'm still having some user end speed issues, and application hangup's that seem sql related ... I'm by no means a dba so if someone who's knowledgeable could point me in the right direction I would appreciate it ... I feel like something is not configured properly ... The box has Microsoft SQL Server 2008 (RTM) 64-bit on Windows NT 6.0 <X64> Service Pack 2 Dell Power Edge R10 16 Logical CPU, 8 Hyperthread 12gig of memory (Right now SQL has 10/12 gig allocated in the task manager ( I know this is not accurate ) I'm adding another 12 gig tomorrow ... So the machine will be running 24 gig) There's two 9 gig databases running on the machine with several 4-6 million row tables .... Server is SQL Dedicated Configuration Values   Page Life Expectancy 18,038 under moderate load, tho I've seen it as low as 1,200 under heavy load .... Buffer Pool Usage CACHESTORE_SQLCP 2778616 OBJECTSTORE_LOCK_MANAGER 38816 MEMORYCLERK_SOSNODE 20936 CACHESTORE_OBJCP 18992 CACHESTORE_PHDR 16472 USERSTORE_SCHEMAMGR 12184 USERSTORE_DBMETADATA 8264 USE

Cube Writeback SQL Server 2008 R2 (SSAS, write back)

CUBE WRITE BACK in SQL SERVER 2008 R2 Did anybody get the SSAS write back functionality to work against a decent sized datawarehouse? I'm not asking about a little demo but a significant sized footprint e.g. 14M Rows measures, 6-8 wired Dimensions with 8-10 attributes each. I setup a test server using a Dell XEON ( 2x4core) with 48 GB RAM hardware and the latest Sql Server 2008 R2 release. I used the What-If scenario in Excel 2010 and modified a higher level, hoping SSAS would push the values down. After about 15 minutes and after having used 48 GB memory (on average 5% CPU) Excel throw an error - short on memory - and stopped the action. I found the same behavior in Sql server 2005 and 2008 and was hoping this would work now but apparently not so. Here are my questions: Is anybody using this at all? how can one calculated (roughtly) how much memory is requiered? is there any paper that describes best practise? Thanks for any help in advance, Dirk  

SQL Server Management Studio - Invalid access to memory location

In SQL Server Management Studio (for SQL Server 2008), when I try to open a new query window, or create a new database, I get a popup error box saying the following: "Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (mscorlib)" This just started happening in the last few days, and I have no idea why.  I even uninstalled SQL Server 2008, and then installed SQL Server 2008 R2, and continued to get the exact same error, in the exact same scenarios. Please let me know if you have seen this before, and what I might try to correct it. Thanks, Robert  

Can't save SQL Server Management Studio sql file back into Sharepoint Document Library

I created an sql query file in SQL Server Management Studio and saved it onto my hard drive.  I then moved that file into a Sharepoint Document Library so others on my team could use that query.I opened the file from within sharepoint, it launched SSMS.I made a change to the file and pressed save.here is the error message that comes up."The operation could not be completed.  The process cannot access the file because it is being used by another process"Am I doing something wrong?

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

Max Server Memory Alteration..

I am running SQL Server 2005 Enterprise on Win Server 2003 SP1 32 bit with 16 GB RAM. I have both /3BG and /PAE enabled. AWE is enabled for SQL Server. I have set the Max Server Memory to 12 GB. When I check the perfmon counters, The Available MBytes is about 2.3 GB. This means that I am not using this 2.3 GB of my 16 GB memory. What I am thinking is that instead of keeping the /3GB switch, I will remove it and make the Max Server Memory to 13 GB. Will this be euqivalent to my prevoius configuration? Will my SQL Server get the same RAM as before? Anyways, what's the advice to achieve optimum utilization of RAM?

Problems with SSRS 2008 Install when configuring a back-end database on a SQL Server 2008 R2 environ

We are tyring to configure SQL Server Reporting Services (SSRS 2008) not the R2 version with a SQL Server 2008 R2 version of database. We are facing error when the configuration manager within SSRS tries to execute its scripts against the database. Do you think that SSRS 2008 may have trouble using a SQL Server 2008 R2 version as the back-end? Also, what kind of permissions does the ID installing SSRS needs to have on the SQL Server database ?  Not much is available in the documenation or online.

Can anyone explain how SQL Server performance scales with CPUs/Cores, memory, disk drives, etc?

I have experienced the situation where our application running on an expensive system with two 4 core CPUs ran slower than on a cheap machine with one dual core CPU. Both machines had similar memory capacity. In each case, the same query was being run by only one user. It would be nice to find a way to increase performance, but if adding cores doesn't help, what can a poor developer do? Customers get annoyed when they spend a truckload of money on a new server and nothing changes... Another potential problem is when customers have an expensive SAN system Sometimes the performance is much slower then on a system with conventional storage. Can anyone explain the relationship between SQL Server perfomance and hardware ?

Can I upload email back to server

When I setup outlook to a re-formated computer at home. Outlook connected my personal email provider's server and automatically downloaded email, meanwhile removed all my email in the server!!! This is horrible function! I know that I should do advance setting and choose "leave email in sever" before finish. Dose anyone know that I can up load email back to server then I can access the email from other computer?   I really don't understand why Microsoft office has so many auto function, especially why I need to go to advance setting to avoid email delete!!!!!!!! Thanks,       

Excel as front end and SQL Server as back end

I read some documentation on the web today about using Excel as front end and SQL Server as back end. Actually, this link was pretty good: http://support.microsoft.com/kb/321686 This is pretty good too: http://bytes.com/topic/sql-server/answers/486783-updating-sql-server-Table-using-excel This is very good; gets pretty complicated though: http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/ I’m still pretty confused about how it all works. I found a sample of VBA online that lets me import a couple columns from a Table: Sub Import() ' Declare the QueryTable object Dim qt As QueryTable ' Set up the SQL Statement sqlstring = "select LastName, FirstName from Employees" ' Set up the connection string, reference an ODBC connection connstring = _ "ODBC;DSN=Northwind;UID=;PWD=;Database=Northwind" ' Now implement the connection, run the Query, and add ' the results to the spreadsheet starting at row A1 With ActiveSheet.QueryTables.Add(Connection:=connstring, Destination:=Range("A1"), Sql:=sqlstring) .Refresh End With End Sub That’s pretty slick, actually! However, I’m thinking I need to use Excel to LINK to SQL Server, not COPY or IMPORT. Basically, I’m trying to find an easy way to use Excel as a front end interface so that a user may

COM Server process compiled with /clr option doesn't unload itself from memory when last COM client

I created Visual C++ ATL project in VS2010, exe type, imlemented COM object, then added /clr option to project. Project uses other C# dlls (WCF service). When last COM client disconnects and last COM object instance destroys, WCF service stopped, my COM server process doesn't unload itself from memory. All managed threads in C# dll are background, COM object doesn't create threads. How can I unload server process? Thank you in advance. 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend