Send Sql string to the tenant database

Use this step to send a SQL query to a tenant database.

Last published at: July 3rd, 2023

clsSendSQLToTenantDB Step


Send SQL statement to tenant database.


  • Tnconnection – Select Tenant manager connection string
  • Tnnameid – Tenant/Host Name or ID
  • Lstsqlstring – List of SQL strings



  • True – step executed successfully
  • False – step failed to execute




Let’s build and execute the SendSQLToTenantDef example.                 

  • Create a new definition called “SendSQLToTenantDef”
  • Select the definition and click the “design” button
  • Drag a "clsSendSQLtoTenantDB" step to the canvas
  • Connect the dots between the start and "clsSendSQLtoTenantDB" step
  • Click on the "clsSendSQLtoTenantDB" step to configure its "Settings" properties. Provide a name to the step. Select the connection string. Provide the Tenant Name or GUID value. Click on the button to provide the SQL string. 
  • Provide the SQL string and click on "Add Row" to include more. Click on "Save" to confirm the changes. 
  • Click on the "clsSendSQLtoTenantDB" step to configure its "Logging" properties (optional). Provide the description, log message and documentation info. Click on "Save" to confirm the changes.
  • Save the process definition, create a new process instance and execute. The process step should execute the list of SQL strings in the TenantDB.