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

Toad for Oracle 2025 R3 - Getting Started Guide

Welcome to Toad Toad Resources Required Privileges Create and Manage Database Connections Editor Basics Schema Browser Basics Data Grid Basics Work with Data Work with Database Objects Work with Code
Write Statements and Scripts Work with the Query Builder Execute Statements and Scripts Save Statements (SQL Recall) Work with PL/SQL Objects Debug Analyze Code Optimize SQL
Customize your Toad Environment Use Other Quest Software Products with Toad

Compare Databases

The Compare Databases wizard provides an easy way to compare two or more databases, either live or from a snapshot. Based on your specifications, the wizard generates a script that you can save to a folder on your computer or run immediately to synchronize the two databases.

This feature is only available with the DB Admin Module, which is included in several Toad Editions or can be purchased separately.

To run the wizard

  1. (If comparing from databases) Connect to the source and target databases that you want to compare.
  2. Do either of the following:

    • From the Toad menu, select Database | CompareDatabases.
    • On the DB Misc tab of the Automation Designer, double-click (Compare Databases) to add the action to your app, then double-click the action to open the Properties dialog.
  3. Under Source, select Database or Snapshot, then select the connection or snapshot as appropriate.

  4. Click .
  5. In the Add Schema dialog, select either Database or Snapshot, then select the target database or snapshot file as appropriate.
  6. Click OK to add the selection to the Connection/File list.
  7. To add another target, click then repeat the steps.
  8. Click Next.
  9. Select options from the Choose Options window. See Choose Options
  10. Click Compare to run the comparison.
  11. See Using the Comparison Results.

Choose Options

Note: You can right-click to select Check All or Uncheck All and Expand All or Collapse All if needed.

Option

Description

Compare

Under Object types and Database settings, select the objects and settings that you want to compare and, if applicable, synchronize. Unchecked items are ignored. Note: You can right-click to select Check All or Uncheck All and Expand All or Collapse All if needed.

Output

Output is optional and can be saved later, but for multiple comparisons it is more convenient to configure output than to save the files later.

  • Base Output Folder: Specify a folder to contain the synchronization script that Toad produces and other output.
  • Snapshot Files: Theses checkboxes are only enabled when the schema being compared is from a live database, not a snapshot file. Select one or both to have snapshot files saved.
  • Comparison Results:

    Difference details and the difference summary can be output as follows:

    • Select File: to save the results in the folder specified for Base Output Folder.
    • Select Email to email the results instead of being saved to file. To use the email option, you must configure the Email Settings in Toad Options (View | Toad Options).

    The Sync Script that Toad produces to synchronize the source and target databases can be emailed or saved to file.

Options

Select additional comparison criteria for objects that you are comparing and that you want in the synchronization script.

Note: If you plan to run the synchronization script and you selected User/Role privileges under Object types, make certain Don't synchronize passwords for users and roles remains selected if you do not want the target passwords to be overwritten by the source passwords.

Filters

Further refines the object selection.

Maximum number of differences: Stops the comparison if the specified number of differences between databases is found.

Object Set: Select this option to filter the comparison to a set of specific objects.

  • Click to open a dialog that enables you to specify an object type, schema, and filter rule for that object type. You can then further refine the list by deselecting objects as needed.
  • Click to save this rule to a file as an Object Set for use in later comparisons.
  • Click to load a saved object set to this comparison.
  • To make it easy to load more than one object type, clear Close on rows loaded. It prevents Toad from closing the dialog after your first selection and then prompting to clear the grid when you click again.
  • Select View/edit query before executing to make changes to the query that runs the object selection.

If no objects of a particular type are listed here, then all objects of that type will be compared.

Using the Comparison Results

When the initial comparison is complete, the bottom half of the window shows the results for the selected pair of schemas on a series of tabs.

  • Right-click on an object on the Details tab to view additional options. Tip: Right-click an object in the list, then select Show sync script for selected items to view the DDL that is in the script for the selected object.
  • To exclude an object from the sync script, uncheck it on the Details tab.
  • You can save the selected objects to a file by clicking on the toolbar of the Details tab.
  • Use the Summary tab to view the differences in the two databases, grouped by objects that were compared. You can save this as html by clicking on the toolbar.
  • Use the Sync Script tab to view the DDL changes that will be made to the target database when you run the script. You can save this script to a variety of file types by clicking on the toolbar or by right-clicking within in the tab and then selecting Save. You can also print the script from the right-click menu.

 

 

Rebuild Objects

Toad enables you to view, add, modify, and get information about database objects. You can work with these objects quickly and without having to use SQL commands.

 

About Rebuilding Objects

Use the Rebuild Multiple Objects window to identify objects that need to be rebuilt, and then set criteria to rebuild them simultaneously.

Rebuild Multiple Objects

You can also rebuild one index or table at a time from the Schema Browser, with a simpler interface.

 

Rebuild a Table

Use this wizard to rebuild a table, including dropping and renaming columns.

Notes:

  • You can simultaneously rebuild multiple tables with the Rebuild Multiple Objects feature.
  • You must own the schema in order to rebuild a table from it.

To rebuild a table

  1. Click image\Toad0015.gif on the Standard toolbar to open the Schema Browser.
  2. Right-click the table in the left-hand side and select Rebuild | Table.

    Tip: You can also select Database | Optimize | Rebuild Table.

  3. Add, edit, or remove columns as needed, then click Next.
  4. Select Data, Table Parameters, and Index Parameters as needed to specify any new settings for the table, then click Next.

    Note: The parameters in this window are defined by Oracle. See Oracle's documentation for more information. 

  5. View the ALTER statement. On this page you can:

    • Click to save the script.
    • Click to edit the script.
    • Click Run to execute the rebuild.

Note: If the table was checked out from Team Coding, it is automatically updated after the rebuild is run.

 

 

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级