Thursday, March 8, 2012

.NET Custom UDF - "Internal error: An unexpected exception occured."

Hi!

I have developed some .NET UDF for MSAS2005.
I compiled it, added assembly to database and tested it - it works.
But works only on my test seerver. On life server I've got this message:
"Internal error: An unexpected exception occured."
Assembly is registered as unrestricted.
I've maid simple test function in own assembly file, which just gives back 1.
It also works on test- and does not work on life server.
Customer will kill me :-( ....
P.S. Last post-SP1-fix (form July) is installed.

I (and a few other people) have been working on writing some stored procs for AS which will be available for public download soon, and we've seen this error a lot. The only information I can give you about it is that it seems to be sporadic and happen more often on lower-spec machines. I believe it's already been logged as a bug; until it's fixed, in my opinion you can't really use AS stored procs in a production environment.

Sorry...

Chris

|||

Thanx Chris for reply,
but it is not our case, because our Life-Server has much more Performance

|||

Are there any updates on this issue? I get this same error on our production server even though it never happened in development and testing (2 different servers).

The problem is very erratic and may happen or not happen in a given cube depending on how the query is built.

Any help would be appreciated.

|||

Hi All,

We have come across this error too but can only find evidence of Microsoft fixing this issue in SP1... http://support.microsoft.com/kb/912429/. However this issue is described as happening not in AS stored procs but in standard queries made even from SSMS.

Does anyone have any information or links etc that shows that this particular issue relating to SPs has been acknowledged by Microsoft? It's been requested by our project manager...

As per usual, any feedback will be gratefully received.

Rob.

|||

The error "Internal error: An unexpected exception occured." is generic in a sense, that it is raised when AS detects any internal inconsistency. So the KB912429 is about different cause. However, the following KB seems more relevant: http://support.microsoft.com/kb/918753/

Yura - I suggest you contact PSS and request this hotfix. Alternatively, you can wait for SP2, where this hotfix is rolled into.

HTH,

Mosha (http://www.mosha.com/msolap)

|||

We have already found (and solve) a problem. This error happends then, when R-ROLAP partition and something is not correct with DataTypes.

Mutch more necessary are trace messages for Custom UDFs. You told what this messages are simple DataRows - could be, but how to send them? With which .NET API method?

|||

Mutch more necessary are trace messages for Custom UDFs. You told what this messages are simple DataRows - could be, but how to send them? With which .NET API method ?

You can build standard rowset inside sproc and return it from there. Then, if you invoke it with CALL sproc you can get rowset back to the client tool (such as SSMS).

|||

Mosha Pasumansky wrote:

Mutch more necessary are trace messages for Custom UDFs. You told what this messages are simple DataRows - could be, but how to send them? With which .NET API method ?

You can build standard rowset inside sproc and return it from there. Then, if you invoke it with CALL sproc you can get rowset back to the client tool (such as SSMS).


Ok, now I got it. Is it only way? I mean, is it possible to have both - result of execution and trace messages? Like by .NET StoredProcedures in SQL Server - Pipe.Send(...) method give you possibility to send Rows, RewSets (as result set) and strings (as a-la PRINT messages).
But in SSAS we have only "chanel" - result. It could be string, numeric or RecordSet, but only one way - correct?

|||Yes, in SSAS there is only one result - either MDDataSet or Rowset. The only way to have second channel is to write into Trace which can be monitored with Profiler. There is no equivalent to SQL Server Pipe.Send() method.|||No solution yet!! I installed SQL SP2 (CTP) and I still have the same problem. Anyone please help !! I hope Microsoft is listening.|||No solution to what problem ? The original problem that started this thread is solved in SP1 (and therefore in SP2). And if you are refering to the new feature request of equivalent of SQL's Pipe.Send - than you shouldn't have expected new features out of the service pack. Service pack is to fix existing problems (whether wrong results, major performance issues or crashes), not to introduce new functionality. If you would like to see new functionality in the next version, the best way is to open an issue on 'connect', and let people vote for it.|||

Mosha Pasumansky wrote:

... If you would like to see new functionality in the next version, the best way is to open an issue on 'connect', and let people vote for it.

Done! You can vote for this feature here:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=261868

|||Hi Mosha,

Sorry for replying late on same. I still have the problem Internal error: An unexpected exception occured." when I use a custom UDF. The UDF expects total of three array (SetToArray) parameter and I believe that' sthe problem. The UDF works fine with one array parameter.

Oh yes, this problem still exists with Sql Server SP2

Original Quote from Mosha - "No solution to what problem ? The original problem that started this thread is solved in SP1 (and therefore in SP2). And if you are refering to the new feature request of equivalent of SQL's Pipe.Send - than you shouldn't have expected new features out of the service pack. Service pack is to fix existing problems (whether wrong results, major performance issues or crashes), not to introduce new functionality. If you would like to see new functionality in the next version, the best way is to open an issue on 'connect', and let people vote for it."

No comments:

Post a Comment