February 24, 2011 at 10:32 pm
Comments posted to this topic are about the item SQLCLR Appdomains
February 24, 2011 at 11:08 pm
Had no idea, missed it but learnt something new. Good question Steve!!
February 24, 2011 at 11:26 pm
I remember coming across this question earlier but even then got it wrong.
M&M
February 24, 2011 at 11:57 pm
Thanks for good question.
I got my answer from url : http://msdn.microsoft.com/en-us/library/ms187720.aspx
It says:
There are several types of CLR integration managed database objects. For general information about these objects, see Building Database Objects with Common Language Runtime (CLR) Integration. Whenever these objects are executed, SQL Server creates an AppDomain under which it can load and execute the required code. The isolation level for an AppDomain is one AppDomain per database per owner.
February 25, 2011 at 12:05 am
There was a real similar question before, and I thought I'd remember the answer, but apparently I did not, as I took the wrong answer.
But nice question though, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 25, 2011 at 6:12 am
Got it right because I've on a few occasions seen messages in the error log saying "Appdomain <database name>.<something> has been unloaded due to memory pressure".
February 25, 2011 at 7:05 am
Good question, thanks. I got it right because I have a poster in my cube of SQL Server Dynamic Management Views and in the CLR section it clearly states: "SQL Server creates one AppDomain per database per owner so that all CLR objects are always executed in the same AppDoman." It's a good poster, lots of good stuff like this.
February 25, 2011 at 8:21 am
Great question! Guessed wrong, I thought it could be configured, but it actually makes sense.
Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
February 25, 2011 at 8:34 am
I was confused by "all CLR objects owned by a user are always executed in the same AppDomain" which seems to contradict “one AppDomain per database per owner”.
February 25, 2011 at 8:41 am
Peter Trast (2/25/2011)
Great question! Guessed wrong, I thought it could be configured, but it actually makes sense.
Peter - It can be somewhat configured using the createdomain method.
http://msdn.microsoft.com/en-us/library/yk22e11a(VS.90).aspx
What the question is testing is that you can not configure two differant objects in two differant databases to run in the same app domain. SQL server will always load them into differant ones becuase it considers the database is the appdomain ROOT for any CLR objects loaded in them.
February 25, 2011 at 9:51 am
Thanks for the question, I learned something by it. (One of the thing was to check the date on blog posts, and if it is old you might want to look for a more current reference.)
February 25, 2011 at 10:08 am
Good question.
I'm sure I've seen the same question before. If so, this is the second time I got it wrong.
Tom
February 25, 2011 at 11:01 am
Daniel Bowlin (2/25/2011)
Good question, thanks. I got it right because I have a poster in my cube of SQL Server Dynamic Management Views and in the CLR section it clearly states: "SQL Server creates one AppDomain per database per owner so that all CLR objects are always executed in the same AppDoman." It's a good poster, lots of good stuff like this.
Daniel,
Good you found out from the CLR object from the DMV poster, i have it in my cube but never looked at it. It is a good question!!!
February 25, 2011 at 2:20 pm
Great question
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 25, 2011 at 2:20 pm
SanDroid (2/25/2011)
Peter Trast (2/25/2011)
Great question! Guessed wrong, I thought it could be configured, but it actually makes sense.Peter - It can be somewhat configured using the createdomain method.
http://msdn.microsoft.com/en-us/library/yk22e11a(VS.90).aspx
What the question is testing is that you can not configure two differant objects in two differant databases to run in the same app domain. SQL server will always load them into differant ones becuase it considers the database is the appdomain ROOT for any CLR objects loaded in them.
That is very good explanation and makes a lot of sense. Thanks
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply