May 14, 2012

sp_MSflush_access_cache (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_MSflush_access_cache()

MetaData:

 create procedure sys.sp_MSflush_access_cache  
AS
-- Delete all the 'dead' connections in MSpublisher_access.

if exists (select * from tempdb.sys.objects where name = 'MSdistributor_access' and
type = 'U')
begin
-- Delete all the 'dead' connections in MSdistributor_access.
delete tempdb.dbo.MSdistributor_access
from tempdb.dbo.MSdistributor_access a
left outer join sys.dm_exec_sessions dm
on a.spid = dm.session_id
and a.login_time = dm.login_time
where dm.session_id is null

if @@error <> 0
return 1
else
return 0
end
return (0)

No comments:

Post a Comment

Total Pageviews