dbTalk Databases Forums  

SQL Server 2005 stored procedure assembly loading

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss SQL Server 2005 stored procedure assembly loading in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jon.Axon@gmail.com
 
Posts: n/a

Default SQL Server 2005 stored procedure assembly loading - 11-03-2005 , 09:13 AM






Hi

I'm trying to understand a little more about how loading of stored
procedure assemblies is implemented in terms of (client)
sessions/queries. Specifically, as a test, I've got a stored procedure
(implemented as a static method in a C# class) that writes to and reads
from a static class variable. If I invoke this method from two queries
in succession on the same connection, the changes made to the static
variable by the first invocation are not reflected in the second
invocation, which leads me to believe the stored procedure's class is
loaded into a different AppDomain for each query within the connection
i.e. the static members are not shared between queries. Is this
interpretation correct (I also note that changes to the variable made
by a procedure invocation are reflected in subsequent invocations
within the SAME query)? If so, at what point is the AppDomain
unloaded, please, since my primitive monitoring through Task Manager
suggests that the memory grabbed by the static variable is not
reclaimed immediately after the query returns.

As an observation, this seems to be in contrast to AS2k UDFs, where
data stored within a UDF's containing class seems to be accessible from
within other queries in the same connection (I know the differences
between AS2k UDFs and Yukon stored procs are vast, so this is no great
surprise)?

Thanks,
Jon


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.