Table Rebuild presents a command-line environment that allows the entry of the following commands.
Command | Description |
---|---|
REBUILD AMP | Rebuilds all tables, a selected table, or all tables in a selected database for a specified AMP. |
REBUILD AMP FALLBACK TABLES | Rebuilds only tables with fallback protection. |
RESTART REBUILD | Restarts an all-table rebuild operation (REBUILD command with the ALL TABLES options specified). |
The commands are discussed in detail in the sections that follow.
Usage Notes
Normally, Table Rebuild is run interactively, as a foreground process started from a Database Window application window. Output from the program is directed to the window. Optionally, Table Rebuild can be run as a background process. Output from the program is logged to a special table, rather than being displayed on screen. All background rebuild operations continue to run to completion, even after Table Rebuild is quit. For more information, see the LOG INTO option described for REBUILD AMP and REBUILD AMP FALLBACK TABLES.
Several rebuild operations, both foreground and background rebuilds, can be run simultaneously. Up to four interactive foreground sessions can utilize the four application windows available in Database Window. Each session must rebuild tables on AMPs in different clusters.
Any number of background process rebuilds can run simultaneously, and can be launched from the same application window. Each rebuild process must rebuild tables on an AMP in different clusters.
Error Handling
Table Rebuild issues messages interactively.
The following message might be returned by Table Rebuild after processing is complete:
Bad table header on AMP ccc-p for table tablename
- The table header does not exist. This might be because the table was dropped after Table Rebuild was started.
- A header was found, but the table was rebuilt unsuccessfully on the identified AMP.
To recover the table, restore it from the latest archive. If restoring from an archive is not an option, contact the Teradata Support Center.
When a table is marked as being in an invalid state and not redistributable during a system reconfiguration, there is no guarantee that the rows in the table are where they should be. Table Rebuild cannot rebuild the table, and displays “Unable to rebuild due to pending Reconfig Abort of table tablename.” In these cases, before rebuilding the table you should first recover these tables by restoring them from the latest archive, or drop these tables.
Unable to rebuild table tablename due to table not in rebuilt AMP
For more information on contiguous and sparse maps, see
Teradata Vantage™ - Database Design, B035-1094.For more information on error messages involving AMP operations, see Teradata Vantage™ - Database Messages, B035-1096.
Getting Help
To get help information about the Table Rebuild utility, press the F7 key while in the Database Window application window. A set of second-level function keys will display as shown below:
Help The Table Rebuild utility allows you to recover the data tables on a specified AMP’s disk(s) by copying the fallback copy maintained by the other AMPs in the cluster. You may rebuild all or part of the tables on an AMP via the options listed below.> <F2> - Rebuild all tables on an AMP <F3> - Rebuild all data tables in a database <F4> - Rebuild a single table <F5> - Rebuild fallback protected tables only <F6> - Rebuild a previous rebuild after a system restart <F7> - General syntax
For information on the subjects listed on the screen, press the corresponding function key. To return to the next-higher menu level, press the F8 key. To exit the help system and return to the Table Rebuild command prompt, press F8 from the top-level menu.