立即与支持人员聊天
与支持团队交流

Toad Data Point 6.4 - User Guide

Introduction Connect Understand Query Report Automate How to configure Toad to use Auth for sending SMTP Emails

Execute/Schedule Automation Scripts

You can execute automation scripts on demand from the Automation window or the Project Manager. You can also schedule scripts to run on a recurring basis at a specific time. For example, schedule a script that performs long-running tasks to run when database activity is light.  

When you schedule a script in Toad, the Job Manager creates a Windows scheduling task. Scheduled scripts run in batch mode. If using another scheduling application, specify "-batch=true" in the command. This executes the script in non-visual (batch) mode. See the procedure below.

Tip: To learn about sharing and scheduling scripts in Toad Intelligence Central, see Publish Automation Scripts to Intelligence Central .

To execute a script from the Automation window

  1. Click Run in the Wizard bar. The script is compiled and executes immediately.

  2. To view the script's execution log, select the Log tab.

  3. If you want to schedule the script, first resolve any problems that caused activities to fail or disable failed activities. An activity can be disabled from its Activity Info window.

    Tip: To execute a script from the Project Manager, right-click the script and select Execute.

To schedule an automation script

  1. With a script open in Automation, click Schedule in the Wizard bar. A Windows Scheduler task is created for the script and a task properties dialog opens.
  2. To schedule the script, select the Triggers tab. Select the scheduling trigger for this task and click Edit.
  3. In the Edit Trigger dialog, specify scheduling details. Click OK to save your changes and close the dialog.
  4. To run the script when you are not logged on, in the General tab select Run whether user is logged on or not. Then enter your Windows credentials when prompted.
  5. When finished, click OK to save your changes and close the task properties dialog. For detailed information about the task properties dialog, see Schedule Windows Tasks.

Note: To run a scheduled script against a password-protected database, the password must be saved in the Connection Properties dialog.

To execute a script in batch mode

  • To start Toad and execute a script in batch mode (non-visual mode), enter the following command and arguments:

    <path to the toad.exe application> -batch=true “<path to Automation script>”

    For example:

    C:\Program Files\Quest Software\Toad Data Point 6.4\toad.exe -batch=true "<path\scriptfilename.tas>"

Notes:

  • Automation scripts are compatible with the version of Toad in which they are created. To learn how to upgrade your scripts and migrate scheduled tasks that were created in a previous version of Toad, see Upgrade Automation Scripts and Scheduling Tasks.
  • The Automation module is disabled if Toad was installed with the Prohibit saving passwords option selected.

 

Related Topics

Automate Tasks

How to configure Toad to use Auth for sending SMTP Emails

To configure Toad to use SMTP Emails, we need to get the main data from the following third parties:

  • Azure Portal where we register our application
  • O365 Admin Center with at least one O365 License E5 where we register the O365 user
  • Microsoft Exchange to configure our settings at a higher level

Configuration Steps:
  1. First, we register our application in Azure Portal | App Registration.



  2. In the O365 Admin Center, let’s go to create the user (toad in this case) that will use the application.



  3. In Exchange Admin Center | Settings, make sure the Mail Flow has the settings below at the organization level.


  4. At this point, Microsoft Documentation states that the application registered has to interface and use the SMTP server.

    This refers to the setting from the MS Entra ID | Enterprise Application registration, NOT from App Registration. To do this it’s necessary to run these PowerShell commands in the order below:

     

    NOTE: The OBJECT_ID is the Object ID from the Overview page of the Enterprise Application node (Azure Portal) for the application registration. It is not the Object ID from the Overview page of the App Registrations node. Using the incorrect Objec ID will cause an authentication failure.

     

    New-ServicePrincipal -AppId d41b4835-027d-4efd-99be-82607a675c5c -ObjectId 779826e8-397c-4c74-b3a5-c874c82ed4af    <-- This is the Object_ID from Enterprise Application
    Add-MailboxPermission -Identity "toad@questmail.onmicrosoft.com" -User d41b4835-027d-4efd-99be-82607a675c5c -AccessRights FullAccess
    Get-ServicePrincipal | fl
    Set-CASMailbox -Identity toad@questmail.onmicrosoft.com -SmtpClientAuthenticationDisabled $false
    Get-CASMailbox -Identity toad@questmail.onmicrosoft.com | Format-List SmtpClientAuthenticationDisabled
  5. In Toad Data Point (this example), let’s set the email server specification (TenantID, ObjectID, and Secret_key).


Even if there is something small issue to define, the email is sent and received in my inbox.

 

相关文档
Toad Data Point - 6.4
Installation Guide
Release Notes
User Guide
Showing 1 to 3 of 3 rows

The document was helpful.

选择评级

I easily found the information I needed.

选择评级