Share via


Server Class

Represents an instance of Microsoft SQL Server 2005 Analysis Services (SSAS) and provides methods and members that enable you to control that instance. This class cannot be inherited.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.AnalysisServices.ModelComponent
        Microsoft.AnalysisServices.NamedComponent
          Microsoft.AnalysisServices.MajorObject
            Microsoft.AnalysisServices.Server

Namespace:  Microsoft.AnalysisServices
Assembly:  Microsoft.AnalysisServices (in Microsoft.AnalysisServices.dll)

Syntax

'Declaration
<GuidAttribute("554BBCA3-925F-4797-9460-2421A8CD7030")> _
Public NotInheritable Class Server _
    Inherits MajorObject _
    Implements IMajorObject, INamedComponent, IModelComponent, IComponent,  _
    IDisposable, ICloneable
'Usage
Dim instance As Server
[GuidAttribute("554BBCA3-925F-4797-9460-2421A8CD7030")]
public sealed class Server : MajorObject, 
    IMajorObject, INamedComponent, IModelComponent, IComponent, IDisposable, 
    ICloneable
[GuidAttribute(L"554BBCA3-925F-4797-9460-2421A8CD7030")]
public ref class Server sealed : public MajorObject, 
    IMajorObject, INamedComponent, IModelComponent, IComponent, IDisposable, 
    ICloneable
[<SealedAttribute>]
[<GuidAttribute("554BBCA3-925F-4797-9460-2421A8CD7030")>]
type Server =  
    class 
        inherit MajorObject 
        interface IMajorObject 
        interface INamedComponent 
        interface IModelComponent 
        interface IComponent 
        interface IDisposable 
        interface ICloneable 
    end
public final class Server extends MajorObject implements IMajorObject, INamedComponent, IModelComponent, IComponent, IDisposable, ICloneable

The Server type exposes the following members.

Constructors

  Name Description
Public method Server Initializes a new instance of the Server using the default values.

Top

Properties

  Name Description
Public property Annotations Gets the collection object of all annotations to current object. (Inherited from MajorObject.)
Public property Assemblies Gets a collection of assemblies from the Server object.
Public property CaptureLog Gets a collection containing XMLA commands generated if CaptureXml property was set to true.
Public property CaptureXml Gets or sets the CaptureLog property of the Server object, which indicates whether XML messages sent to an instance of Analysis Services should be logged.
Public property Connected Gets a value indicating whether there is a connection to an instance of Analysis Services.
Public property ConnectionInfo Gets the ConnectionInfo object from the Server object. This field is read-only.
Public property ConnectionString Gets the string of characters used to connect to an instance Analysis Services. This field is read-only.
Public property Container (Inherited from Component.)
Public property CreatedTimestamp Gets or sets the date and time of the creation of the object. (Inherited from MajorObject.)
Public property Databases Gets the collection of databases resident on a Server.
Public property DefaultCompatibilityLevel
Public property Description Gets or sets a description string of current object. (Inherited from MajorObject.)
Public property Edition Gets or sets the currently installed version of Analysis Services. This is read-only.
Public property EditionID Gets or sets the EditionID for the currently installed version of Analysis Services. This is read-only.
Protected property FriendlyName Returns a user-friendly name. (Inherited from NamedComponent.)
Public property ID Gets or sets the identifier of the component. (Inherited from NamedComponent.)
Public property IsLoaded Infrastructure. Gets a value that indicates whether MajorObject have been loaded. (Inherited from MajorObject.)
Protected property KeyForCollection Returns the key used in collections. (Inherited from NamedComponent.)
Public property LastSchemaUpdate Gets or sets the date and time when current object schema was last updated. (Inherited from MajorObject.)
Public property Name Gets or sets the name of the component. (Inherited from NamedComponent.)
Public property OwningCollection Gets or sets the collection that contains the ModelComponent. (Inherited from ModelComponent.)
Public property Parent Infrastructure. Gets the IModelComponent object that is the parent of the ModelComponent object. (Inherited from ModelComponent.)
Public property ProductLevel Gets or sets read-only access to the product level element. The product level itself is obtained from the stored install-specific string.
Public property ProductName Gets or sets read-only access to the name of the product from which an instance of Analysis Services was installed.
Public property Roles Gets the collection of Roles for a database, cube, or mining model.
Public property ServerLocation
Public property ServerMode Gets or sets the server mode the server is operating in.Server mode is an enumeration of ServerMode
Public property ServerProperties Gets a collection of server properties associated with a specific Server object.
Public property SessionID Gets the session ID for the server.
Public property SessionTrace Gets the SessionTrace object that is used to start and stop traces on the server.
Public property Site Infrastructure. Gets or sets the site of the component. (Inherited from NamedComponent.)
Public property SiteID Infrastructure. Gets or sets the identifier for the site associated with the component. (Inherited from NamedComponent.)
Public property Traces Gets the traces available on the server.
Public property Version Gets or sets the server version.

Top

Methods

  Name Description
Protected method AddToContainer Infrastructure. Adds a ModelComponent object to the specified container. (Inherited from ModelComponent.)
Protected method AfterInsert Infrastructure. Displays a ModelComponent object after added to the specified index. (Inherited from ModelComponent.)
Protected method AfterMove Infrastructure. Displays a ModelComponent object after moving to the specified index. (Inherited from ModelComponent.)
Protected method AfterRemove Infrastructure. Displays a ModelComponentCollection after a ModelComponent object is removed. (Inherited from ModelComponent.)
Public method Attach(String) Attaches a folder to the server.
Public method Attach(String, ReadWriteMode) Attaches a folder to the server with specified mode.
Public method Attach(String, ReadWriteMode, String) Attaches a folder to the server with specified mode and password.
Protected method BeforeRemove Infrastructure. Removes the ModelComponent object before the cleanup. (Inherited from ModelComponent.)
Public method BeginTransaction Starts a transaction on the server.
Public method CancelCommand() Cancels the last command sent to the server.
Public method CancelCommand(String) Cancels the last command sent to the server on the specified session.
Public method CancelConnection(Int32) Cancels the server connection specified by the connection ID.
Public method CancelConnection(Int32, Boolean) Cancels the server connection specified by the connection ID, and indicates whether all other associated connections will be canceled.
Public method CancelSession() Cancels the session on the server.
Public method CancelSession(Int32) Cancels the specified session on the server.
Public method CancelSession(String) Cancels the specified session on the server.
Public method CancelSession(Int32, Boolean) Cancels the specified session on the server.
Public method CancelSession(String, Boolean) Cancels the specified session on the server.
Public method Clone() Creates a new, full copy of a Server object.
Protected method Clone(Boolean) Infrastructure. Creates a new copy of the MajorObject object. (Inherited from MajorObject.)
Public method CommitTransaction Commits the changes made in the current transaction.
Public method ConcatenateCaptureLog(Boolean, Boolean) Gets the capture log in a concatenated XML format, wrapped in an XMLA Batch element, and indicates whether to include the transaction attribute and XMLA Parallel element.
Public method ConcatenateCaptureLog(Boolean, Boolean, Boolean) Gets the capture log in a concatenated XML format, wrapped in an XMLA Batch element, and indicates whether to include the transaction attribute and XMLA Parallel element.
Public method Connect(String) Connects the current instance of Server to the Analysis Services server, using the specified connection string.
Public method Connect(String, Boolean) Connects the current instance of Server to the Analysis Services server using the specified connection string and properties.
Public method Connect(String, String) Connects the current instance of Server to the Analysis Services server, using the specified connection string.
Public method CopyTo(Server) Copies a Server object to the specified object.
Protected method CopyTo(MajorObject, Boolean) Infrastructure. Copies a MajorObject object to the specified destination. (Inherited from MajorObject.)
Public method CreateObjRef Security Critical. (Inherited from MarshalByRefObject.)
Public method Disconnect() Disconnects the Server object from the Analysis Services server.
Public method Disconnect(Boolean) Disconnects the specified session Server object from the Analysis Services server.
Public method Dispose (Inherited from Component.)
Public method Drop() Removes current object and updates server. (Inherited from MajorObject.)
Public method Drop(DropOptions) Removes current object and updates server using specified options. (Inherited from MajorObject.)
Public method Drop(DropOptions, XmlaWarningCollection) Removes current object and updates server using specified options. Warnings resulting from drop operation are returned on the specified warnings object. (Inherited from MajorObject.)
Public method Drop(DropOptions, XmlaWarningCollection, ImpactDetailCollection) Removes current object and updates server using specified options. Warnings resulting from drop operation are returned on the specified warnings variable and results for affected objects in operation are returned on specified impactResult variable. (Inherited from MajorObject.)
Public method Drop(DropOptions, XmlaWarningCollection, ImpactDetailCollection, Boolean) Removes current object and updates server using specified options. Warnings resulting from drop operation are returned on the specified warnings variable and results for affected objects in operation are returned on specified impactResult variable. (Inherited from MajorObject.)
Public method EndXmlaRequest Ends the last XML for Analysis (XMLA) request.
Public method Equals (Inherited from Object.)
Public method Execute(String) Executes the specified command on the Analysis Services server.
Public method Execute(String, ImpactDetailCollection, Boolean) Executes the specified command on the Analysis Services server, and provides support for impact analysis.
Public method ExecuteCaptureLog(Boolean, Boolean) Executes the contents of the capture log on the server, and indicates whether execution will be in a transactional and/or parallel mode. Affected objects will not be processed.
Public method ExecuteCaptureLog(Boolean, Boolean, Boolean) Executes the contents of the capture log on the server, indicates whether execution will be in a transactional and/or parallel mode, and indicates whether affected objects will be processed.
Public method ExecuteCaptureLog(Boolean, Boolean, Boolean, Boolean) Executes the contents of the capture log on the server, indicates whether execution will be in a transactional and/or parallel mode, indicates whether affected objects will be processed, and indicates whether to skip volatile objects.
Public method GetConnectionState Gets the current state of the connection to the Analysis Services server.
Protected method GetCreateReferences Infrastructure. Gets a Hashtable to create references. (Inherited from MajorObject.)
Public method GetDependents Infrastructure. Gets the dependents to the specified Hashtable. (Inherited from MajorObject.)
Protected method GetDropDependents Infrastructure. Gets the drop dependents. (Inherited from MajorObject.)
Public method GetHashCode (Inherited from Object.)
Public method GetLastSchemaUpdate Infrastructure. Retrieves the date and time when the specified object schema was last updated.
Public method GetLifetimeService Security Critical. (Inherited from MarshalByRefObject.)
Public method GetReferences Infrastructure. Gets the objects that the MajorObject references. (Inherited from MajorObject.)
Public method GetType (Inherited from Object.)
Public method GetUpdateOverwrites Infrastructure. Gets the Hashtable object that overwrites the updated MajorObject. (Inherited from MajorObject.)
Public method InitializeLifetimeService Security Critical. (Inherited from MarshalByRefObject.)
Public method NotifyTableChange Notifies an instance of Analysis Services that a change has occurred to tables in a specified data source.
Public method Reconnect Re-establishes the connection to the Analysis Services database.
Public method Refresh() Updates current object from server definitions. (Inherited from MajorObject.)
Public method Refresh(Boolean) Updates current object from server definitions and loaded dependent objects if specified. (Inherited from MajorObject.)
Public method Refresh(Boolean, RefreshType) Updates current object from server definitions and loaded dependent objects if specified. (Inherited from MajorObject.)
Protected method RemoveFromContainer Infrastructure. Removes a ModelComponent object from the specified container. (Inherited from ModelComponent.)
Public method Restore(String) Restores an Analysis Services database from a backup file.
Public method Restore(RestoreInfo) Restores an Analysis Services database from a backup file, using the options set on a RestoreInfo object.
Public method Restore(String, String) Restores an Analysis Services database from a backup file to the specified database.
Public method Restore(String, String, Boolean) Restores an Analysis Services database from a backup file to the specified database, given an overwrite flag.
Public method Restore(String, String, Boolean, array<RestoreLocation[]) Restores an Analysis Services database from a backup file to the specified database, given an overwrite flag and multiple remote servers.
Public method Restore(String, String, Boolean, array<RestoreLocation[], RestoreSecurity) Restores an Analysis Services database from a backup file to the specified database, given an overwrite flag, multiple remote servers, and specifying security settings.
Public method Restore(String, String, Boolean, array<RestoreLocation[], RestoreSecurity, String) Restores an Analysis Services database from a backup file to the specified database, given a password, an overwrite flag, multiple remote servers, and specifying security settings.
Public method Restore(String, String, Boolean, array<RestoreLocation[], RestoreSecurity, String, String) Restores an Analysis Services database from a backup file to the specified database, given a password, an overwrite flag, multiple remote servers, specifying security settings and storage location.
Public method RollbackTransaction Rolls back the current transaction on the connection to the server.
Public method SendXmlaRequest(XmlaRequestType, Stream) Sends an XML for Analysis (XMLA) request of the specified type using the specified stream.
Public method SendXmlaRequest(XmlaRequestType, TextReader) Sends an XML for Analysis (XMLA) request of the specified type using the specified stream.
Public method StartXmlaRequest Starts an XML for Analysis (XMLA) request to the server.
Public method Submit() Infrastructure. Submits a ModelComponent object. (Inherited from ModelComponent.)
Public method Submit(Boolean) Infrastructure. Submits a ModelComponent object. (Inherited from ModelComponent.)
Public method ToString Returns a string containing the name of the component. (Inherited from NamedComponent.)
Public method Update() Updates server definition of current object to actual values using the default values to update dependent objects. (Inherited from MajorObject.)
Public method Update(UpdateOptions) Updates server definition of current object to actual values using the specified options to update dependent objects. (Inherited from MajorObject.)
Public method Update(UpdateOptions, UpdateMode) Updates server definition of current object to actual values using the specified options to update dependent objects. (Inherited from MajorObject.)
Public method Update(UpdateOptions, UpdateMode, XmlaWarningCollection) Updates server definition of current object to actual values using the specified options to update dependent objects and reports any warnings from operation. (Inherited from MajorObject.)
Public method Update(UpdateOptions, UpdateMode, XmlaWarningCollection, ImpactDetailCollection) Updates server definition of current object to actual values using specified options to update dependent objects, reports any warnings from operation, and returns affected objects from operation. (Inherited from MajorObject.)
Public method Update(UpdateOptions, UpdateMode, XmlaWarningCollection, ImpactDetailCollection, Boolean) Updates server definition of current object to actual values using specified options to update dependent objects, reports any warnings from operation, and returns affected objects from operation. If analyzeImpactOnly is true, an impact analysis operation is performed with no update operation. (Inherited from MajorObject.)
Public method UpdateObjects(array<IMajorObject[]) Infrastructure. Sends the updates made on the Server object to the Analysis Services server.
Public method UpdateObjects(array<IMajorObject[], ImpactDetailCollection) Infrastructure. Sends the updates made on the Server object to the Analysis Services server.
Public method Validate(ValidationErrorCollection) Validates the element to which it is appended; returns any errors encountered in a collection. (Inherited from ModelComponent.)
Public method Validate(ValidationResultCollection) Indicates whether the MajorObject is valid. (Inherited from MajorObject.)
Public method Validate(ValidationErrorCollection, Boolean) Validates the element to which it is appended; returns any errors encountered in a collection. Also contains a parameter to enable return of detailed errors. (Inherited from ModelComponent.)
Public method Validate(ValidationResultCollection, ValidationOptions) Indicates whether the MajorObject is valid. (Inherited from MajorObject.)
Public method Validate(ValidationErrorCollection, Boolean, ServerEdition) Indicates whether the Server object is valid. (Overrides NamedComponent.Validate(ValidationErrorCollection, Boolean, ServerEdition).)
Public method Validate(ValidationResultCollection, ValidationOptions, ServerEdition) Indicates whether the MajorObject is valid. (Inherited from MajorObject.)

Top

Events

  Name Description
Public event Disposed (Inherited from Component.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICloneable.Clone Creates a copy of the server.
Explicit interface implemetationPrivate method IDeserializationCallback.OnDeserialization Runs when the entire object graph has been deserialized. (Inherited from MajorObject.)
Explicit interface implemetationPrivate method IFormattable.ToString Formats the value of the current instance using the specified format. (Inherited from NamedComponent.)
Explicit interface implemetationPrivate method IDeserializationStartCallback.OnDeserializationBegin Runs when the entire object graph starts to deserialized. (Inherited from MajorObject.)
Explicit interface implemetationPrivate property IHostableComponent.Host Gets or sets the IServiceProvider that is the host of the ModelComponent. (Inherited from ModelComponent.)
Explicit interface implemetationPrivate property IMajorObject.BaseType Gets the base type implementation of the server.
Explicit interface implemetationPrivate method IMajorObject.CreateBody Infrastructure. Creates a new body for the server.
Explicit interface implemetationPrivate method IMajorObject.DependsOn Infrastructure. Determines whether the server depends on an object.
Explicit interface implemetationPrivate property IMajorObject.ObjectReference Gets the object reference implementation of the server.
Explicit interface implemetationPrivate property IMajorObject.ParentDatabase Gets the parent database implementation of the server.
Explicit interface implemetationPrivate property IMajorObject.ParentServer Gets the parent server implementation of the server.
Explicit interface implemetationPrivate property IMajorObject.Path Gets the path implementation of the server.
Explicit interface implemetationPrivate method IMajorObject.WriteRef Infrastructure. Writes a reference for the server.
Explicit interface implemetationPrivate property IModelComponent.FriendlyPath Gets a friendly path for the ModelComponent. (Inherited from ModelComponent.)
Explicit interface implemetationPrivate property IModelComponent.OwningCollection Gets or sets the collection that owns the current object. (Inherited from ModelComponent.)

Top

Remarks

This object is the root object for the entire Analysis Management Objects (AMO) object model tree. With an object of ClassType Server you can:

  • Connect to a computer on which an instance of Analysis Services is running.

  • Connect (create a session) and disconnect (end session context) to an instance of Analysis Services.

  • Capture XML message logs of command traffic to Analysis Services.

  • Identify the product edition and product level.

  • Execute requests to create other Analysis Services objects, such as databases, data sources, commands, dimensions, cubes, data mining models, and roles.

Examples

The following code creates and initializes an instance of Analysis Services. "LocalHost" specifies the instance running on the same computer as your AMO application.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AnalysisServices;

namespace AMO_Server_object_snippet
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create instance of Analysis Services object
            using (Server myServer = new Server())
            {
                // Connect to local instance of Analysis Services
                myServer.Connect("LocalHost");

                //use the server object here
                //....

                //Disconnect from the server
                myServer.Disconnect();
            }//Remember: this closing curly brace is 
             //          where the Dispose method, of the server object,
             //          is invoked (when you use the 'using' statement).
        }
    }
}

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.AnalysisServices Namespace