Page 1 of 1

SubsetDestroy prompts error

Posted: Fri Aug 06, 2010 6:19 am
by bunchukokoy
hi again!

I wonder why in my TI, this code.., prompts an error even though i already have deleted the cube view which used it.

============ at the bottom part of the Prolog

IF (ViewExists(CubeName, DestinationViewName)=1);
ViewDestroy(CubeName, DestinationViewName);
ENDIF;
============
============ at the Epilog

IF (SubsetExists(DimVersion, DestinationSubVersion)=1);
SubsetDestroy(DimVersion, DestinationSubVersion);
ENDIF;
=======

the scripts in the Epilog tab still prompts an error message.
Please help anyone.
Thanks!

bunchukokoy

Re: SubsetDestroy prompts error

Posted: Fri Aug 06, 2010 6:59 am
by Wim Gielis
What error message do you see in the Message Log, and to what line of code is pointing?

Re: SubsetDestroy prompts error

Posted: Fri Aug 06, 2010 1:28 pm
by Jeroen Eynikel
- The subset may still be attached to another view. The problem here is that I have never found a way to easily identify such cases. Worst case it is attached to a private view of some user in which case you wouldn't even be able to see it.

=> Make a habit of cleaning any views / subsets used in TI process the moment you don't need them anymore. If possible create and delete them again in the same TI process.


- The view may still exist in memory even if you already deleted it. I have seen this happen in the following circumstances.

1: the view is open in SE.
2: try to do the destroy.
3: realize it fails because it was open
4: close the view
5: delete the view
6: subsets still won't delete. In this case unloading the cube from memory or restarting the service usually resolves the problem.

Re: SubsetDestroy prompts error

Posted: Tue Aug 17, 2010 3:43 am
by bunchukokoy
Jeroen,

Thanks for the idea. But as I looked at my cubes, you are right, there was still a view which was using the subset. :lol:

bunchukokoy