Table of Contents

Class DatabaseOperationTask

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Represents a Database Operation Task.

[ComVisible(true)]
[Guid("53C24C25-E465-41BD-9282-C9B39783E830")]
public sealed class DatabaseOperationTask : Task
Inheritance
object
DatabaseOperationTask

Properties

ActionType

The type of action to perform

public DatabaseTaskType ActionType { get; set; }

Property Value

DatabaseTaskType

AdditionalConnectionOptions

Additional options to be appended to the database connection string.

public string AdditionalConnectionOptions { get; set; }

Property Value

string

ClassID

The Class ID for the object

[IgnoreDataMember]
public override ClassID ClassID { get; }

Property Value

ClassID

ClassKeyName

The key name for the class.

public override string ClassKeyName { get; }

Property Value

string

Remarks

This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.

CommandTimeout

The timeout to use when executing commands and queries against the database.

[RequiredVersion(5, 0, 0, 0)]
public TimeSpan? CommandTimeout { get; set; }

Property Value

TimeSpan?

Remarks

If no value (or a value of 0) is specified, the default timeout is used (taken from Server Option "DatabaseOperation:CommandTimeout").

CommandsToExecute

The file to export to if ActionType is ExecuteSQL, SelectScalar, or SelectResultset

public string CommandsToExecute { get; set; }

Property Value

string

CustomConnectionString

Specify a full OleDb connection string to use.

public string CustomConnectionString { get; set; }

Property Value

string

Remarks

Use "{userid}" and "{password}" to insert user ID and password values from the CredentialProfile.

If CustomConnectionString is set, ServerName, DatabaseName, SchemaName, and AdditionalConnectionOptions are ignored.

DatabaseCredentials

The database credentials to use

public CredentialProfile DatabaseCredentials { get; set; }

Property Value

CredentialProfile

Remarks

Set to null to use integrated security (uses the identity that the job is running under).

DatabaseName

The database name.

public string DatabaseName { get; set; }

Property Value

string

Remarks

For Oracle connections, specify the service name if not using TNS for the connection (see Remarks in ServerName).

DatabaseType

The type of database to connect to.

public string DatabaseType { get; set; }

Property Value

string

Remarks

Specify a value from DatabaseTypes.

ImportExportFormat

The format used when ActionType is ExportData or ImportData

public DatabaseImportExportType ImportExportFormat { get; set; }

Property Value

DatabaseImportExportType

IsDependent

Indicates whether the object is a dependent of (owned by) another object

[IgnoreDataMember]
public override bool IsDependent { get; }

Property Value

bool

Remarks

An independent object (IsDependent is false) is an object that can exist on its own without being part of another object. For example, Jobs, Job Groups, etc.

A dependent object (IsDependent is true) is a part of another object. For example, a JobStep cannot exist independently of a Job, so the JobStep is dependent.

Dependent objects cannot be directly fetched from the server: they are only fetched as part of the object they belong to. They also cannot be saved or deleted independently: they are automatically saved or deleted when the owning object is saved or deleted.

JobName

The name of the job to run when ActionType is ExecuteJob

public string JobName { get; set; }

Property Value

string

Remarks

This value is not validated by adTempus.

ProviderName

The OleDb provider name to use, if other than the default.

public string ProviderName { get; set; }

Property Value

string

SchemaName

The schema to use

public string SchemaName { get; set; }

Property Value

string

ServerName

The database server (host) name or address.

public string ServerName { get; set; }

Property Value

string

Remarks

To use a port other than the default, specify it using "servername:portnumber".

<p>For Oracle connections:</p>
<ul><li>To connect using TNS, set ServerName to the TNS alias and leave DatabaseName empty.</li><li>To connect without TNS, set ServerName to the server host name and set DatabaseName to the service name.</li></ul>

SupportedResponseEvents

Gets a list of the events that are supported for Responses associated with this task.

public override ReadOnlyCollection<SupportedResponseEvent> SupportedResponseEvents { get; }

Property Value

ReadOnlyCollection<SupportedResponseEvent>

TargetFile

The file to export to if ActionType is ExportData

public string TargetFile { get; set; }

Property Value

string

TargetScript

The script to pass the selected data to when ActionType is SelectResultset

public Script TargetScript { get; set; }

Property Value

Script

TargetVariable

The name of the variable to update when ActionType is SelectScalar

public string TargetVariable { get; set; }

Property Value

string

Remarks

The variable value is set only for the executing instance of the job. The variable does not need to be defined before job execution; it is created if necessary.

WaitForCompletion

Determines whether the task waits for the job to complete

public bool WaitForCompletion { get; set; }

Property Value

bool

Remarks

When ActionType is ExecuteJob, set WaitForCompletion to true to have the task wait for the database job to complete and set the result of the task based on the database job outcome. If WaitForCompletion is false the task does not wait for the database job to complete and the result of the task indicates only whether the database job was successfully submitted.

Methods

GetObjectDescription()

Gets a description of the object's key settings.

protected override string GetObjectDescription()

Returns

string

Remarks

This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.

WriteToConfigurationReport(IADTObjectConfigurationReportWriter)

Writes the object and any contained objects to a configuration report

public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)

Parameters

NameTypeDescription
reportBuilder IADTObjectConfigurationReportWriter

The report builder to write the object to.

Inherited Members