Saturday, February 25, 2012

AMO:Is there any locking mechanisam available in MSAS 2005

Hi All,

I am working on Analysis Server 2005 and .Net 2005 and AMO,i already worked on AS 2000 and .Net 1.1 with DSO.

I just want to comform one thing is there any thing like OlapLockTypes are there in AS 20005 or AMO.Please let me know how it works.

Thanks in Advance.

Hi vishweshwar,

This feature is already deprecated in AMO. Just want to inform that locking mechanisms can be well implemented using security features which provides good layer of abstraction.

Thanks

Subhash Subramanyam

|||

Locking in DSO does not really relate to the security features in SSAS 2005.

Locking in DSO was used to prevent mulitple uses from trying to alter an object at the same time. This is not an issue in 2005 with AMO due to the way it works with XML/A commands. Basically when you connect via AMO it reads the object definition off the server and then all the changes you make are done in memory until you issue an update command. At this point an XML/A alter command is sent to the server which contains the entire object definition. If mulitple developers happen to work on the same object at the same time, then that the second update will overwrite the first.

|||

Thanks Darren, Agree that my answer was partially wrong. Its clear to understand why Locking Mechanisms are no more implemented and how update actually works.

|||

hi Darren,

Thanks ,but one thing I coudnt understand clearly how it will handle (whether explicitly or implicitly) ,i just want to clear one point here whether we need to write explicitly by using AMO code or it will handle internally in AMO.

Please let me know.

How we can use XML/A code in .net with AMO.

Thanks in Advance.

|||

All the stuff I described is handled implicitly. You don't usually need to work about XMLA, you can just work with the AMO objects. It is just that AMO is generating XMLA under the covers.

If you want to group a whole series of updates into one batch, you can use the .CaptureLog() and .ExecuteCaptureLog() methods of the server object. I have an example in powershell on my blog here:

http://geekswithblogs.net/darrengosbell/archive/2006/06/21/GenerateXmlaByName.aspx

But you should be able to work exclusively with AMO without needing to resort to explicitly dealing with XMLA.|||

Thanks Darren.

Actually with DSO code there we are checking before doing process lock is opened , read or write.

but in AMO i am just writing code directly creating a object of server,database,cubes and dimension and then with objects we are doing process what i am doing is it the right way.Please let me know.

|||AMO is implicitly transactional. I think there are beginTransaction methods on some of the objects, but if an object is being processed you will not be able to alter it until the processing is complete. With DSO, if you did not check for the locks there was a danger of altering an object that was processing. With AMO you cannot do this.

No comments:

Post a Comment