Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Creating assembly Expand / Collapse
Author
Message
Posted Friday, March 7, 2008 3:08 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:55 PM
Points: 18, Visits: 34
Last week I had created and added a new CLR assembly to a database. I stopped working on it to work on another project, and today I could no longer run the functions from the assembly. I kept getting the following error:

Msg 6533, Level 16, State 48, Line 1
AppDomain .dbo[ddl].59 was unloaded by escalation policy to ensure the consistency of your application. Out of memory happened while accessing a critical resource.

I tried deleting the assembly and was going to try recreating the assembly. Now when I run the Create Assembly statement I get the same error. I tried creating on another database and it did not work. I tried creating an empty assembly just to see if it could have been something with my assembly, but I couldn't even do that.

What I don't understand is why last week I was able to create the assembly on the database, and add the functions to the database, and now this week it is broken. Could it have been some update that occurred to our server? Is there any options that I need to check? Any help would be greatly appreciated. Thanks in advance!
Post #466170
Posted Friday, March 7, 2008 3:14 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
Heh... it's the SQL gods telling you that you should solve the problems in T-SQL instead of writing a CLR :D

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #466175
Posted Friday, March 7, 2008 3:21 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:59 PM
Points: 7,064, Visits: 15,278
What's the memory situation of that server? Sounds to me like a leak not releasing resources.

Have you had a chance to reboot it recently to see if you can use this on "clean" resources?

Also - there's a hotifx out that has that message as an exact decription....It's over here:

http://support.microsoft.com/kb/928083


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #466181
Posted Friday, March 7, 2008 4:08 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:55 PM
Points: 18, Visits: 34
Thanks for the quick replies!

When you say it "Sounds to me like a leak not releasing resources.", do you mean from the assembly that I created? I have this installed and runs fine on my local. This is not actually in production yet. I just installed and created all the functions on the production database. I was creating a view to use the assembly and that is when I received the error. There is really no resources that I need to release. The assembly (dll) just calculates the companies holidays. I'll try rebooting the server this weekend when nobody is using it.
Post #466201
Posted Friday, March 7, 2008 4:13 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
The assembly (dll) just calculates the companies holidays.


Curious... did you know that a T-SQL function will likely run just as fast here and a properly formed Calendar table will out stripe both? And neither will cause the problems you're currently experiencing?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #466202
Posted Sunday, March 9, 2008 7:35 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:55 PM
Points: 18, Visits: 34
The function automatically calculates the holiday's such as Easter, Memorial Day, etc.
Post #466449
Posted Sunday, March 9, 2008 9:50 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
Are you happy with the performance?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #466465
Posted Monday, March 10, 2008 7:05 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:55 PM
Points: 18, Visits: 34
I was when it was working. There really wasn't a noticeable slow down. But there are only approximately 300-500 records at any given time.
Post #466645
Posted Monday, March 10, 2008 8:07 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:55 PM
Points: 18, Visits: 34
Matt,
Rebooting the server fixed it. How can I test for a memory leak on the server? This was the first assembly on the server, but it was not in production. I don't see how it could cause a memory leak. There are no resources that need to be disposed. It just calculates dates.
Post #466684
Posted Monday, March 10, 2008 8:12 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
Would be a heck of a lot faster if you used a holiday table or, better yet, a calendar table.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #467096
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse