5/15/2019

Toad For Oracle Tutorial

I just start working on oracle and using Toad for Oracle but it is not as simple to use any good,simple and easy reference material/manual/tutorial or how to use Toad for oracle efficiently? Particularly I am using Toad for Oracle 10.6

Kind Note: If you feel question is not constructive then you can please ignore it because such questions really matters for beginners.

Thanks

ElvinElvin

closed as off-topic by Ken White, David Cain, ChrisFApr 2 '14 at 20:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Ken White, David Cain, ChrisF
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

ToadForOracle.com redirects to ToadWorld here:http://www.toadworld.com/products/toad-for-oracle/default.aspxThe getting-started videos provide orientation.The user guide (this one specific to v11.6) is here:http://documents.quest.com/Toad%20for%20Oracle/11.6.1/User%20Guide/to view online, or download the pdf in the top-right corner.Regards,DonnaTfO tech-writer

DonnaDonna

Not the answer you're looking for? Browse other questions tagged oracle10gtoad or ask your own question.

Learn more about Toad Data Point
at Quest Software

Find solutions and downloads at the
Toad Data Point Support Portal

Toad Data Point 4.3

Summary

This tutorial helps you get started with Automation by giving you an overview of the Automation module and then guiding you through the process of creating a basic script.

In this tutorial you will learn:

  • How to use the Automation window
  • How to create a basic script using the Select to File activity
  • How to test and run a script
  • How to schedule a script
  • How to create an activity template to reuse an Automation activity

Watch a video version of this tutorial: Getting Started with Automation.

Introduction

Toad provides an Automation utility that allows you to easily script database activities and schedule them using the windows scheduler. In this way, database tasks can be automated to save you time. Toad Automation can increase your productivity by allowing you to automate tasks that you perform repeatedly.

The Benefits of Using Automation

  • Automating repeatable tasks allows you to be more productive and increases your efficiency.
  • Toad Automation scripts are very flexible and extensible, allowing you to customized them to your needs.
  • You can create and use variables in Automation scripts. Variables allow you to make your scripts flexible and to customize your scripts to different audience and company needs.
  • You can incorporate a variety of templates into Automation scripts. Using templates in your scripts can help you get the most out of automating your tasks. Templates include: Microsoft Excel® files, Export Wizard templates, or Toad Report templates. You can even create an Automation activity template allowing you to reuse an activity.
  • There is no limit to the number of tasks you can include in an automation script.
  • Toad Automation scripts are conveniently scheduled and run by the Windows scheduler. You can track and manage your scheduled scripts using Toad or the Windows Scheduler interface.

* Did You Know *

Opening the Automation Window

There are several ways to open an Automation window.

  • To build a script from scratch, use one of the following methods to open an Automation window:
    • Select Tools Automation.
    • Click the Automate button in the main toolbar.
    • Click Automation in the Launch window.
  • To build a script incorporating your current workflow, use the following steps:
    1. In the Query Builder or Editor, build or enter your SQL statement.
    2. Click Send to Automation in the Wizard bar. Toad sends your SQL to the Automation Tutorial (Guided Tour) which opens in a separate window.

    3. Select a task and complete the wizard.
    4. After you click Finish in the wizard, an Automation window opens containing your new script. The script incorporates your SQL statement and the settings you specified in the wizard.

The Automation Window

  1. To get started with Automation, open an Automation window by selecting Tools Automation.

    The Automation window consists of a Toolbox pane (along the left side of the window), a design pane (top half of the window), and a details pane (bottom half of the window).

    Toolbox—Stores the Automation activities. Click an activity in the Toolbox to add it to the script design pane. Activities are listed by category: Database, File, or System.

    Script Design Pane—Graphically displays the script as a workflow. Use the script design pane to build an Automation script. Drag an activity to the design pane to add the activity to a script.

    Note: You must drag the activity to one of the Add Activity icons in the Automation workflow, then release the mouse button after you see the activity's icon displayed in the workflow.

    Details Pane—Displays an activity’s settings. Click an activity in the design pane to display its configurable settings in the details pane. Use the details pane to specify the settings for each activity in the script.

  2. In the Toolbox, in the Database Activities category, single-click the Select to File activity to add it to the script design pane.
  3. With the Select to File activity still selected in the script design pane, view the details pane. The details pane allows you to configure settings for the selected activity. The input fields change depending on which activity is currently selected in the design pane.

    Note: The Activity Input tab is the tab where you will specify most of an activity's settings.

  4. Click next to the Select to File activity. Toad uses this icon to indicate that more information is required to complete the activity. Click or hover over the icon to display the missing information. Use this icon to help you determine which input fields are required.

    Note: This icon is also used to indicate a validation error, for example, when referencing a variable that has not been created yet.

  5. Now click the Settings icon in the design pane. The details pane changes to display input fields for the script’s settings. You can use this area to specify script error handling, logging level, and run mode settings.

  6. Click the Stop on Error button, if not already selected. This instructs the script to stop if an error is encountered.

    Note: You can also enable or disable the Stop on Error option for each individual activity. If you know that a particular activity will have an error, you can disable the Stop on Error option for just that activity. This option is located on the Activity Info tab for each activity.

  7. In addition to selecting the Stop on Error option, enabling the Send email when error occurs and Attach log file to email options is also preferred. This can be very useful if your script encounters an error. Enabling your script to send an email notification on error, as well as on success, helps you to feel confident that your processes are running as expected.

    If you choose to enable these options, you must specify email settings. To specify email settings, click the Compose Email button.

  8. Keep this Automation script window open, and proceed to the next section.

Create a Basic Script

  1. If you kept the previous Automation window open, you will have a basic script consisting of one activity, the Select to File activity. Click on the Select to File activity in the design pane.
  2. In the Activity Input tab, in the first text box, select a database connection, or use the default. The default database connection for each database activity is always the currently-active open connection. To select a different database connection, click and browse to a different connection.

    Note: If you schedule a script to run against a password-protected database for which you did not save the password in Toad, the script will error. To save the password, right-click the connection in the Connection/Navigation Manager and select Properties. Enter the password and select the Save Password option.

  3. Now select an input. Most activities require an input, and in the Select to File activity the input is a SQL statement. You can input a SQL statement using one of the following methods:
    • Manually enter a SQL statement in the editor box (deselect the Link SQL file option).
    • Click to browse to and select a SQL file.
    • Select Link SQL file, then click to browse to and select a SQL file. This option retains a link to the SQL file.
    • Click to open the SQL file (you previously selected) in the Editor where you can modify the SQL.
    • Select Link SQL file, then click the drop-down list to select a file from the currently open project in the Project Manager.
  4. After selecting or entering your SQL statement, now select an output. Select Excel File in the Type field in the Export File section.
  5. Click in the Name field and select a location and enter a name for your new Excel file.
  6. You can also add a suffix to the file name. In the Suffix field, click the drop-down to add a previously-used suffix, or click to build an expression. You can use this method to add a variable or a datetime stamp. Appending a datetime stamp to the file name allows you to create a unique file with each script execution.
  7. You now have a complete activity, with input, output, and database connection specifications. You can save and reuse this activity in other scripts by saving the activity as a template. To do this, right-click the activity (after configuring all the settings) and select Save As Template. Enter a name for your template and click OK to save it.

    Your template now appears in the Toolbox in the Templates category.

  8. Keep the Automation script window open and proceed to the next section.

Test and Run Your Script

  1. To test your script, click Run in the Wizard bar.
  2. Toad will prompt you to save your script (if you have not already done so). In the Save As dialog, select a location, enter a file name, and click Save.
  3. Toad then validates your entries and compiles the script. If these processes are successful, the script runs.
  4. While the script is running, Toad displays your script’s execution progress in the Log tab. The message “Done” indicates script execution is finished.

  5. When a script produces an output file, a hyperlink to the output file is included in the Log. If your script ran successfully, click the output file hyperlink to view the new Excel file created by your script.
  6. Click the Settings icon to return to the script’s settings.
  7. If you require a more detailed Log, you can change the logging level. In the Settings’ Activity Input tab, select Verbose from the Logging level drop-down list to create a more detailed log.

    Note: If you want to change the location of the Log file, select a new location in the Logging folder input field.

  8. Toad allows you to specify both a Test database connection and a Production database connection for each script. Toad also allows you to specify which connection to run your script against when the script executes. Both of these settings are made in the script’s settings. This feature allows you to easily test your script in a test environment before running your script in the production environment.

    To specify a test and a production database, make the selections in the Connection text box under Test environment and Production environment in the Settings’ Activity Input tab. To select which of these databases to run your script against, select Test or Production from the Select environment drop-down list.

  9. Click the Select to File activity to return to its settings. Then select the Activity Info tab.
  10. If you remember from the overview of the Automation window, Toad allows you to enable or disable each activity in a script. This can be helpful when building a script, as it allows you to test one particular activity at a time by disabling the other activities.

    In the Activity Info tab, click Disabled to disable the Select to File activity. Notice that the activity now appears shaded in the design pane. To enable the activity again, click Enabled, or right-click the activity in the design pane and select Enabled.

Schedule Your Script

Once you have thoroughly tested your script, you can schedule it.

  1. To schedule your script, click Schedule in the Wizard bar.
  2. The Job Manager window opens and a task properties dialog displays. The task properties dialog is pre-populated with the information required to run your script as a scheduled task. You only need to schedule it. (The Job Manager uses the Windows Scheduler.)

  3. To schedule the script, select the Triggers tab. Then select the scheduling trigger and click Edit. In the Edit Trigger dialog, ensure that the On a schedule trigger type is selected. Then specify a frequency, start time, interval, etc.
  4. Click OK to save your schedule. Click OK to save and close the task properties dialog.
  5. Your task (script) is now listed in the Task List in the Job Manager. Double-click your task in the list to open the task properties dialog again where you can make modifications, such as re-scheduling or changing the script location. Use the Task List to review the status of your tasks (scheduled scripts).
  6. By default, the scheduled task runs under your Windows account. If you change your Windows password, you may also need to update the password in your scheduled task (depending on your version of Windows). Click and select the task to update. Click OK and then enter your password when prompted.
  7. After upgrading to a new version of Toad, you must migrate the scheduling tasks to the newer version. See Upgrade Automation Scripts and Scheduling Tasks for more information.
  8. Script Execution and Status. When Toad is in the process of executing a scheduled script, you will see the Toad icon in the lower right corner of the Windows taskbar. To check the status of your scheduled scripts, open the Job Manager (Tools Administer Job Manager) and select the Task List.

Now you have learned how to increase your productivity by using Toad Automation to handle your repetitive reporting and deployment tasks!

Learn More

Other Toad Automation tutorials are available. To see more examples and to learn how to build other types of scripts to automate everyday tasks, start with the following: