Provides access to the DataServerManager object.
Product Availability
When To Use
Use this interface to initialize and connect to a Database Server. Once connected, depending on your permissions level, you can perform administration tasks, get properties of the server and create and open geodatabases on the server.
Members
| Description | ||
|---|---|---|
![]()  | 
AvailableMemory | The total available memory (MB). | 
![]()  | 
Connect | Connects to an initialized Data Server. | 
![]()  | 
CreateConnectionFile | Create a Data Server connection file. | 
![]()  | 
DataServerClass | The server class. | 
![]()  | 
DataServerType | The type of data server. | 
![]()  | 
Disconnect | Disconnects from the Data Server. | 
![]()  | 
InitFromFile | Initializes a saved connection to the GIS Data Server. | 
![]()  | 
IsConnected | Indicates whether the server is connected or not. | 
![]()  | 
ProductName | The product name. | 
![]()  | 
ProductVersion | The product version. | 
![]()  | 
ServerName | The data server name. | 
CoClasses that implement IDataServerManager
| CoClasses and Classes | Description | 
|---|---|
| DataServerManager | Object to administer a Data Server. | 
The IDataServerManager interface allows you perform general operations on a Database Server, such as Connect or Disconnect, etc. To connect to a Database Server, you must first initialize the DataServerManager by setting the ServerName property or the InitFromFile method:
dataserverManager.ServerName = "minnie\\sqlexpress";
dataserverManager.InitFromFile ("C:\\Documents and Settings\\bobm\\Application Data\\ESRI\\ArcCatalog\\minnie_SQLEXPRESS.GDS");
Operations performed on the server service itself, such as stopping and starting the server, must be performed will disconnected from the server.
// The following code example demonstrates how to establish a connection to a database server in order
// to open an existing workspace\geodatabase
public void esriDataSourcesGDB__IDataServerManager()
{
    // Create a Data Server Manager object
    IDataServerManager dataserverManager = new DataServerManagerClass();
    dataserverManager.ServerName = "minnie\\sqlexpress";
dataserverManager.Connect();
    // Create a new workspace name object for the geodatabase we want to open
    IDataServerManagerAdmin dataservermanagerAdmin = (IDataServerManagerAdmin)dataserverManager;
    IWorkspaceName workspaceName = dataservermanagerAdmin.CreateWorkspaceName ("Landbase", "VERSION", "dbo.DEFAULT");
    // Open the workspace
    IName name = (IName)workspaceName;
    IWorkspace workspace = (IWorkspace)name.Open();
}


