You can quickly copy data from one or multiple tables to the same table or tables in another schema or database. Toad builds insert statements that use array binding in the variables to copy the data, or if you prefer, create masked data. If you set the array size to 500, then 500 rows are inserted with a single insert statement. The array size is adjustable.
Note: Toad copies data from one schema to another between tables that have the same table name. The tables must exist prior to running this command.
To copy data to another schema
Do one of the following:
Use the Tables, Where Clauses, Data Masking tab to select tables, add and test a WHERE clause, and specify data masking.
Tip: You can check your WHERE clauses by clicking (Test Where Clauses).
Use the Compare Data wizard to compare data between tables that are within different schemas or iin different databases, such as the same tables in production and test environments. Toad then generates a synchronization script that you can run as-is, save as a file, or send to the Editor to be refined.
To run the Compare Data wizard
Use the tabs of this page to specify the comparison objects and options.
Tables tab
Specify database link options as needed:
Options tab
(Optional) Click Sort Area Size to change the current sort area size and the one that Toad goes back to when the window closes. This only affects comparisons that do not go through a Database Link.
Select the columns that you want to include in the comparison. Toad notifies you of discrepancies it finds:
Toad handles primary keys as follows:
If structural differences cannot be resolved to enable valid comparison, you can compare the objects themselves. Click (Compare Objects) at the bottom of the page.
Select what you want to do with rows that match: Count them, display them, or ignore them.
Option |
Description |
---|---|
Row Count(Match | (Differ) |
Displays the total number of rows that were compared. Match means the number of rows in each table is the same. Differ means there is a difference in the row count between source and target tables. |
Source Only and Target Only |
These tabs have the same format and show the number of rows that exist only on the source and only on the target. |
Differences |
Displays the values of each compared source and target row and highlights differences. This tab displays:
|
Matches |
This result is displayed if you selected Display as the way to handle rows that match. The row values are shown, which reflect their state in both source and target. |
Do one of the following:
Select from Sync options: Synchronize the data between the tables, send the synchronization script to the Editor, or save the synchronization script to a file. If you choose to synchronize the data, you are prompted whether to commit or roll back the changes.
Notes:
From the last three windows of the Compare Data wizard you are now ready to view the differences between your data sources.
You must run the SQL code for each window as described below.
To make dataset editable
On the Review Differences page, select the Editable Dataset checkbox.
Note: In some editions of Toad, you can delete rows from one table, and insert them into the other directly in the grid.
To review rows
To delete selected rows
To delete all rows
Right-click and select Delete All Rows.
Use this dialog box to view record duplicates based on user input.
To view record duplicates
To find this: | Do this: |
---|---|
Find duplicates on all columns |
Select Find duplicates on all columns. Do not select any columns in the list. |
Find duplicates on just selected columns |
Select Find dupes of selected columns. Select one or more columns in the column list. |
On the Duplicate Data tabs, an additional column called Occurences is added to the end of the grid to display the number of resulting duplicates. |
To edit duplicate data
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center