question

Mhance avatar image
Mhance asked

Failed to create AppDomain - selecting view that references External Name

,Selecting view that uses Scalar Function - this is a 3rd party application - so I don't have a lot of control over this VIew. THe view works on our SQL test machine( SQL SERVER 2012) and doesn't work on the production SQL SERVER 2014. It's using " EXTERNAL NAME [SessionTexture].[SessionTexture.TextureValue].[GetDoubleFromVar24]" that (I think) refers to CLR ( common language runtime) and that is enables on both test & production machines. Get this message trying to look at the view or trying to select the view. ****Any help or suggestions anyone could provide would be appreciated.**** **The error Message is:** TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to create AppDomain "Arkansas_Vision_Production_2014.dbo[runtime].117". Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008) (Microsoft SQL Server, Error: 6517) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2000&EvtSrc=MSSQLServer&EvtID=6517&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ **THe VIEW query that produces this error is:** CREATE VIEW [dbo].[Textures] AS SELECT T.IDSession, T.DistanceStamp, dbo.fn_GetDoubleFromVar24(T.RMS, 0x000001) AS RMSCentre, dbo.fn_GetDoubleFromVar24(T.RMS, 0x000100) AS RMSRight, dbo.fn_GetDoubleFromVar24(T.RMS, 0x010000) AS RMSLeft, dbo.fn_GetDoubleFromVar24(T.MPD, 0x000001) AS MPDCentre, dbo.fn_GetDoubleFromVar24(T.MPD, 0x000100) AS MPDRight, dbo.fn_GetDoubleFromVar24(T.MPD, 0x010000) AS MPDLeft, CAST(dbo.fn_GetSingleFromVar12(T.Valid, 0x000001) AS FLOAT) AS ValidCentre, CAST(dbo.fn_GetSingleFromVar12(T.Valid, 0x000100) AS FLOAT) AS ValidRight, CAST(dbo.fn_GetSingleFromVar12(T.Valid, 0x010000) AS FLOAT) AS ValidLeft FROM Texture T ==> fn_GetSingleFromVar12 under FUNCTION >> SCALAR_VALUED_Functions CREATE FUNCTION [dbo].[fn_GetDoubleFromVar24](@Var24 [varbinary](24), @Offset [varbinary](3)) RETURNS [float] WITH EXECUTE AS CALLER AS EXTERNAL NAME [SessionTexture].[SessionTexture.TextureValue].[GetDoubleFromVar24] +++++++++++++++++++++++++++++++++++ Thanks
clr
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mhance avatar image
Mhance answered
It is amazing what a REBOOT will fix. Rebooted the SQL Server and this problem was solved - at least for the moment.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bhushan.dhanke avatar image
bhushan.dhanke answered
i am facing same issue and it is working fine after reboot but it is not possible to take reboot frequently. anyone got permanent solution?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

srutzky avatar image
srutzky answered
From everything I have found, this appears to be a memory issue. For some reason, it seems that the SQL Server process was not able to allocate enough memory for the operation. * Is this a 32-bit or 64-bit instance? 32-bit is more constrained. * Check your **max server memory** setting as it controls how much (within some limits) of the system's memory can be used by SQL Server. Hence, SQL Server could be out of memory even while there is still memory available on the machine. See [Server Memory Server Configuration Options][1] for more details. * Some other potentially helpful info here: [Troubleshooting the error "Not enough storage is available to complete this operation"][2] Here is a thread with 2 similar issues: [Error-Not enough storage is available to complete this operation.][3] [1]: https://msdn.microsoft.com/en-us/library/ms178067.aspx [2]: http://blogs.technet.com/b/abizerh/archive/2009/07/12/troubleshooting-the-error-not-enough-storage-is-available-to-complete-this-operation.aspx [3]: http://www.sqlservercentral.com/Forums/Topic882209-145-2.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.