com.esri.arcgis.datasourcesGDB
Interface IDataServerManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
DataServerManager

public interface IDataServerManager
extends Serializable

Provides access to the DataServerManager object.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void connect()
          Connects to an initialized Data Server.
 String createConnectionFile(String pathName, String serverName)
          Create a Data Server connection file.
 void disconnect()
          Disconnects from the Data Server.
 int getAvailableMemory()
          The total available memory (MB).
 int getDataServerClass()
          The server class.
 int getDataServerType()
          The type of data server.
 String getProductName()
          The product name.
 String getProductVersion()
          The product version.
 String getServerName()
          The data server name.
 void initFromFile(String gdsFileName)
          Initializes a saved connection to the GIS Data Server.
 boolean isConnected()
          Indicates whether the server is connected or not.
 void setServerName(String serverName)
          The data server name.
 

Method Detail

connect

void connect()
             throws IOException,
                    AutomationException
Connects to an initialized Data Server.

Description

This function connects to a Database Server.

Remarks

The DataServerManager must be initialized by using put_ServerName or InitFromFile. You must already be a user on the server, with the appropriate permissions, in order to connect to it.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

disconnect

void disconnect()
                throws IOException,
                       AutomationException
Disconnects from the Data Server.

Description

This function disconnects from a Database Server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setServerName

void setServerName(String serverName)
                   throws IOException,
                          AutomationException
The data server name.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
serverName - The serverName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getServerName

String getServerName()
                     throws IOException,
                            AutomationException
The data server name.

Remarks

The ServerName property is used to return or set the name of the server of the Data Server Manager, for example; “myserver\sqlexpress”. The ServerName value is used with the CreateConnectionFile method. Setting the ServerName property is one method for initializing the DataServerManager before connecting to the Database Server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The serverName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initFromFile

void initFromFile(String gdsFileName)
                  throws IOException,
                         AutomationException
Initializes a saved connection to the GIS Data Server.

Description

This method initializes a Data Server from a Database Server connection file (.gds).

Remarks

The .gds file is created using the Add Database Server option in ArcCatalog, or the CreateConnectionFile method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
gdsFileName - The gdsFileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createConnectionFile

String createConnectionFile(String pathName,
                            String serverName)
                            throws IOException,
                                   AutomationException
Create a Data Server connection file.

Remarks

Creates a Database Server connection file (.gds).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pathName - The pathName (in)
serverName - The serverName (in)
Returns:
The connFileName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isConnected

boolean isConnected()
                    throws IOException,
                           AutomationException
Indicates whether the server is connected or not.

Description

This method returns whether you are currenrtly connected to the database server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The isConnected
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataServerType

int getDataServerType()
                      throws IOException,
                             AutomationException
The type of data server.

Description

This method returns the type of the database server (DataServerType).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.datasourcesGDB.esriDataServerType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProductName

String getProductName()
                      throws IOException,
                             AutomationException
The product name.

Remarks

This method returns the product name for the underlying database server. For example; “Microsoft SQL Server Express Edition”.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProductVersion

String getProductVersion()
                         throws IOException,
                                AutomationException
The product version.

Remarks

This return returns the version of the underlying database server. For example; “9.00.1399.06”.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The version
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAvailableMemory

int getAvailableMemory()
                       throws IOException,
                              AutomationException
The total available memory (MB).

Remarks

This function returns the available physical RAM on the database server. This is the total memory that is available to the database server, including memory that may already be in use, either by the database server or other applications.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The memory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataServerClass

int getDataServerClass()
                       throws IOException,
                              AutomationException
The server class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.geodatabase.esriGeodatabaseServerClassType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.