Since sql server 2005 we got this new feature where we can load .net assemblies to the database and execute all our app functions.
You can view the existing app domains using the query:
select * from sys.dm_clr_appdomains
and the assemblies which are loaded can be seen here:
select * from sys.dm_clr_loaded_assemblies
The below error is due to insufficient CLR memory allocated:
to resolve this, you can use the startup parameter "-g" and give additional memory to the external assemblies and objects. By default sql server allocates 256 MB memory to external assemblies.
AppDomain 129 (testdb.dbo[runtime].135) is marked for unload due to memory pressure.