GetInstallation method

Retrieves an audit installation by name or by management database connection.

Syntax

Installation class GetInstallation(
	string installationName)
 
Installation class GetInstallation(
	string server,
	string database)

Parameters

Specify the following parameters when using this method.

Parameter Description

installationName

The name of the audit installation you want to retrieve.

server

The Microsoft SQL Server instance name of the management database.

database

The database name of the management database.

Return value

Returns the Installation object found.

Errors

The GetInstallation method may throw the following exception:

  • Centrify.Cfw.DirectoryServices.ServerNotOperationalException if the domain controller is not operational. Check to make sure you entered the correct domain name when you called the constructor for the Connection object.

Discussion

The Connection.GetInstallation method is overloaded to provide two ways to search for an installation: by the name of the installation, or by the management database that is part of the installation.

Example

The following code sample illustrates using Connection.GetInstallation in a script to get the Installation object for the audit installation in the current Active Directory domain. The Installation object is then used to get the name of the object store database:

...

SET objInstallation = objConnection.GetInstallation(strInstallationName)
SET objAuditStore = objInstallation.GetAuditStore(strAuditStoreName)
SET objAuditStoreDatabase = objAuditStore.GetDatabase(strDatabaseName)

See also