Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Removing variables from cache?

Author  Topic 

apporter
Starting Member

2 Posts

Posted - 2008-09-23 : 07:43:26
Is there a way to remove just one specific variable from the cache for a stored procedure? I am passing some XML to a stored procedure and I need it to be removed from the cache each time the procedure is run. Does anyone have an idea? My superiors do not want to use DBCC FreeProcCache for whatever reason, they want me to just remove the one variable from the cache.

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-23 : 07:55:31
Variables are not stored in the cache.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

apporter
Starting Member

2 Posts

Posted - 2008-09-23 : 07:58:59
Hmm, my boss claims that the XML we are passing to the stored procedure as @XMLdata is being held in the cache, and I should remove it. Am I misunderstanding something?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-23 : 08:36:11
It would be a great help if your boss could provide a code snippet that reveals where xml data is stored in cache on sql server 2005.
You can cache data in DotNet (see http://aspnet.4guysfromrolla.com/articles/121802-1.aspx)

Or, is he referring to this?

SELECT *
FROM master..syscacheobjects

or this

DBCC DROPCLEANBUFFERS


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-23 : 08:46:25
This is one way to read the RAM of sql server.

http://www.dba-oracle.com/t_sql_server_ram_buffer_cache_scripts.htm



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -