Databases Reference
In-Depth Information
AnalysisServices.MajorObject
System.IMajorObject
FIGURE 34.5
Major objects are derived from the IMajorObject interface.
Major objects support the following methods and properties:
.
Drop sends a Delete statement to the server and removes an object from the parent
collection. When you set the affectDependents parameter to TRUE , you are instruct-
ing AMO to send an Update request to the server for each of the objects affected by
the deletion of the object. The Drop method might fail to delete an object because of
a communication problem. You might want to make sure that such an object gets
deleted regardless. To accomplish this, have the application pass the
DropOptions.IgnoreFailures parameter to the Drop method.
.
LastSchemaUpdat e returns the date and time when the structure of the object was
last changed on the server.
.
Refresh synchronizes AMO and Analysis Services. If more than one user or client
application is administering Analysis Services, it is easy to get into a situation in
which a client application ends up with a reference to an AMO object that no longer
has a corresponding object on the server or a situation in which the object on the
server has changed.
.
Update sends object definitions to the server. The client application can use the
default overload of the Update method, which causes only the object itself and its
properties to be updated on the server. A client application can also pass the
UpdateOptions parameter, which specifies whether the dependent objects also need
to be updated. (We discuss dependent objects in greater detail in the “Dependent
and Referenced Objects” section later in this chapter.)
In addition, a client application can pass an UpdateMode parameter, which specifies
the operation that should be performed on the object: Create , Replace , Update , or
any combination of those. This argument affects which DDL request AMO sends to
the server: Create or Alter .
An application can also pass the XmlaWarningCollection collection, which will be
populated by the Update method if a warning occurs, and the ImpactDetail
Collection collection, which will be populated with information about the changes
of object state that will occur on the server if the Update operation succeeds. (You'll
read more about this functionality in the “Impact Analysis” section later in this
chapter.)
Collections of the major objects support the same interfaces and functionality as collec-
tions of all other named objects.
Search WWH ::




Custom Search