Syntax
The syntax of the RegisterDatabaseServer method is:
RegisterDatabaseServer(DatabaseServerRegistrationParamters databaseServerParameters)Argument
databaseServerParameters: DatabaseServerRegistrationParamters object
The object describes all the values available from the DatabaseServerRegistrationParameters classes.
The DatabaseServerRegistrationParameters class exposes the following members to enable the creation of a database server alias.
Members of DatabaseParameter class
| Name | Type | Description |
|---|---|---|
| DBAlias | String | The alias name to register |
| Host | String | Host name on which the SQL instance is installed |
| SQLInstance | String | The name of the SQL Server instance |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any.
Using the IConfigureDatabase Interface for RegisterDatabaseServer Method
using Unisys.AgileBusiness.RuntimeAPI;
IConfigureDatabase databaseConfig = RuntimeFactory.GetConfigDB();
DatabaseServerRegistrationParamters parameter = new
DatabaseServerRegistrationParamters()
{
DBAlias = "Default",
sqlinstance = "MSSQLSERVER",
host = "MYHOST-UNISYS"
};
StatusInfo status = databaseConfig.RegisterDatabaseServer(parameter);