Skip to main content

Invoke Sql Command Task

Takes as input an SQL file or an SQL command to output several CSV files that can be used by the collection.

Examples

Code attributes enclosed with <> need to be replaced with a custom value before entering the script in the command line.

<InvokeSqlCommandTask Identifier="SQL_Command" DisplayName_L1="SQL Command" SQLCommand="SELECT id FROM uj_jobs" Agent="Local" OpenIdClient="Job" DatabaseIdentifier="UsercubeDemo" />

NOTE: The database Identifier attribute has a specific location where the connection strings for the database identifiers need to be defined. See the appsettings.agenttopic for additional information.

Properties

PropertyTypeDescription
DisplayName_L1 requiredStringDisplay name of the task in language 1 (up to 16).
Agent optionalStringIdentifier of the agent on which the job will be launched. NOTE: When not specified, the task is to be launched on the server. Remember, all jobs containing the task must be launched on the same agent or on the server.
ContinueOnError default value: falseBooleanTrue if the execution of the Task returning an error should not stop the job machine state.
DatabaseIdentifier optionalStringIdentifier of the Database to connect to
Encoding optionalStringEncoding for the output files. See the list of available encodings.
Identifier optionalStringUnique identifier of the task.
IsNotAQuery default value: falseBooleanTo know if the SQL command is a query or not.
IsolationLevel optionalStringSpecifies the transaction locking behavior for the database connection.
OpenIdClient optionalStringConnection client for the task.
OutputPath optionalStringPath to save file. Alternative definition: If TaskType is: - ProvisioningPolicyTask: Path to save the LDIF file, - CollectorTask: Path of the working directory, - CollectorChangesTask: Path of the working directory, - CollectorADDirSyncTask: Path of the working directory, - ProvisionerDownloadTask: Path of the destination directory,
Provider optionalStringThe database provider.
ProviderAssemblyQualifiedName optionalStringDatabase provider assembly qualified name.
SQLCommand optionalStringSQL Command to execute.
SQLInputFile optionalStringPath of the SQL file.
Timeout default value: 0Int32Specify the timeout if the query need more 30 sec.