Skip to content

IAdmServiceLog3

The IAdmServiceLog3 interface extends the IAdmServiceLog interface with the possibility to provide credentials for an external logging database.

Inheritance: The IAdmServiceLog3 interface inherits from the IAdmServiceLog2 interface.

Methods

  • Method

  • Description

  • SetDatabaseTypeEx()

  • Sets the type of the database where the service logs will be stored.

  • GetDatabasesEx()

  • Gets information about databases installed on the given MS SQL server.

  • GetDatabaseEx()

  • Gets information about databases installed on the given MS SQL server.

  • ValidateCredential()

  • Validates whether the specified username and password are valid for the specified database server.

Details

SetDatabaseTypeEx()

Sets the type of the database where the service logs will be stored. This method extends the IAdmServiceLog2::SetDatabaseType method with the possibility to specify credentials for the given database.

void SetDatabaseTypeEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        Object dbInfo,
                        String username,
                        String password)

Parameters

  • dbType - Specifies the database type.
  • dbInfo - Contains information about the database.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter must be NULL.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_MSSQL, this parameter must be set to an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.
  • username - Contains the username that will be used to connect to the database server.
    • If the username parameter is set to NULL, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials used to connect to the server are not changed. Saved credentials are used.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter is ignored.
  • password - Specifies the password to use with the username provided. If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter is ignored.

GetDatabasesEx()

Gets information about databases installed on the given MS SQL server. This method extends the IAdmServiceLog2::GetDatabases method with the possibility to specify credentials to use when connecting to the server.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        String server,
                        String username,
                        String password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • username - Contains the username that will be used to connect to the server.
    • If the username parameter is set to NULL, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials saved in Adaxes service are used. If there are no saved credentials, Adaxes service account is used.
  • password - Specifies the password to use with the username provided.

Return value

An Object[] array, where each Object represents information about a single database. The interfaces supported by items in the array depend on the database type specified by the dbType parameter. Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and each item in the array returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


GetDatabaseEx()

Gets information about databases installed on the given MS SQL server. This method extends the IAdmServiceLog2::GetDatabases method with the possibility to specify credentials to use when connecting to the server.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        String server,
                        String databaseName,
                        String username,
                        String password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • databaseName - Specifies the database name.
  • username - Contains the username that will be used to connect to the server.
    • If the username parameter is set to NULL, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials saved in Adaxes service are used. If there are no saved credentials, Adaxes service account is used.
  • password - Specifies the password to use with the username provided.

Return value

An Object that represents information about the specified database. The interfaces supported by the returned value depend on the database type specified by the dbType parameter.

Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and the Object returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


ValidateCredential()

Validates whether the specified username and password are valid for the specified database server. If the credentials are not valid, the method throws a Softerra.Adaxes.Logging.ExternalDatabaseException.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        String server,
                        String username,
                        String password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • username - Contains the username to validate.
  • password - Specifies the password to use with the username provided.

Exceptions

  • Softerra.Adaxes.Logging.ExternalDatabaseException
  • The provided credentials are not valid for the specified server.

Requirements

Minimum required version: 2016

See also