Rebuilding a PeopleSoft temporary table means recreating the physical table object (and its indexes) so that its structure matches the current record definition in Application Designer, which is the standard fix when the database table has drifted from the PeopleTools metadata—but the safe procedure and the commands involved depend on your database platform, so no single universal recipe applies. PeopleSoft temporary tables are ordinary database tables that PeopleTools marks as "temporary" (via the TT prefix convention and the record's Type setting), and Application Designer and the build process treat them differently from permanent tables: they are usually built with special options such as "Build with no data" or "Build as temporary," and they are typically cleared or truncated between uses. The core idea of "rebuilding" is consistent across platforms, but the mechanics differ enough that you must identify your database and your PeopleTools release first.

What "temporary table" means in PeopleSoft

In PeopleSoft, a record defined in Application Designer can have its Type set to "SQL Table" or "Temporary Table." When it is a temporary table, two things happen. First, PeopleTools expects the physical name to follow the PS_ prefix plus the record name, and by convention temporary records carry a TT in the name (for example, PS_TT_PAYROLL). Second, the build process and the runtime treat it as scratch space: data is not meant to persist, and many processes truncate the table before or after use.

That is different from a database-native temporary table (for example, a SQL Server #temp table or an Oracle global temporary table). In PeopleSoft, the "temporary" designation is metadata-driven: Application Designer controls how the table is built and how the application uses it. Some PeopleSoft temporary records are built as database global temporary tables where the platform supports them, and older or platform-specific behavior varies. Because of that, "rebuilding" can mean two related but distinct operations: recreating the physical table to match metadata, or clearing its contents. The question of rebuilding usually means the former.

Why tables drift and why a rebuild is needed

The physical table in the database can diverge from the record definition for several reasons. A record definition may have gained or lost fields, changed a field's type or length, or changed key structure, and the change was never propagated with a build. An upgrade or patch may have altered the record definition. Someone may have altered the table manually in the database. Or a build failed partway, leaving the table in an inconsistent state.

When drift exists, Application Designer's "Alter" option may be unable to reconcile the differences (for example, when a change is destructive or the database rejects the alteration), and the recommended action is to rebuild: drop the object and recreate it from the current definition. The telltale signs are build errors, "table does not exist" or "column does not exist" errors at runtime, or an Alter that reports it cannot proceed.

The general rebuild procedure

The platform-independent sequence is:

1: Confirm the record definition is correct in Application Designer and that you are working in the right database and project. Building the wrong record or building into the wrong environment is the most common self-inflicted problem. 2: Save the record so the metadata is current. 3: Build the record using Application Designer's Build feature (Build > Project, or right-click the record and choose Build). Choose the appropriate build option. For a temporary table you typically want to recreate the object rather than alter it; the exact option label depends on your release, but the intent is "create/recreate" rather than "alter." 4: Choose "Build with no data" where offered, since a temporary table should start empty and you do not want to copy rows. 5: Verify by checking that the table exists, has the expected columns, and that the application process that uses it runs without error.

Two cautions apply to any platform. First, a rebuild drops and recreates the object, so any data currently in the table is lost—acceptable for a true temporary table, dangerous if someone has been using it as a permanent store. Second, if other objects depend on the table (views, synonyms, or application-specific references), know how your environment handles them before dropping.

Platform-specific mechanics

The following describes the general shape of the operation per platform. Exact menu labels and script names vary by PeopleTools release and by whether you build through Application Designer or through the platform's Data Mover/scripts, so treat these as the categories to check rather than as universal commands.

Oracle. PeopleSoft on Oracle commonly builds temporary records as global temporary tables (GTTs) when configured that way, and the build script uses CREATE GLOBAL TEMPORARY TABLE. Rebuilding means dropping and recreating that GTT with the correct ON COMMIT behavior. If a record was built as an ordinary table but should be a GTT (or vice versa), the rebuild is how you correct it. Check the record's build settings and the generated DDL before running it.

Microsoft SQL Server. Temporary records are typically built as ordinary tables (sometimes with a TT name), and PeopleSoft clears them through the application. A rebuild is a drop-and-create of the physical table plus its indexes. Because SQL Server treats #-prefixed tables as session-scoped true temporaries, PeopleSoft's TT tables are not those; they are regular tables managed by the application. That distinction matters: do not assume "temporary" means session-scoped on SQL Server.

IBM Db2 and other platforms. The same principle holds—drop and recreate the physical object and indexes from the record definition—but the DDL and any platform-specific temporary-table syntax differ. Confirm against the generated script for your release.

Application Engine and the "build" versus "clear" distinction. Many PeopleSoft processes that use temporary tables include a step that truncates or deletes from the table before use. If the problem is stale or duplicated data rather than structure, the fix is clearing the table (through the process or a controlled truncate), not rebuilding it. Rebuilding addresses structure; clearing addresses content. Confusing the two leads to unnecessary drops.

What "rebuild" does not fix

A rebuild corrects the physical object to match the metadata. It does not correct the metadata itself: if the record definition is wrong, you will faithfully rebuild the wrong structure. It does not fix application logic that fails to clear the table, and it does not resolve permission or synonym problems except insofar as recreating the object resets them (and it can actually remove grants, so re-granting may be needed). It also does not fix a build that is pointed at the wrong database or a project that omits the record.

Ambiguities to resolve before acting

The query does not specify the database platform, the PeopleTools release, or whether the goal is to fix structure or to clear data. Those unknowns change the exact steps. What is answerable without them is the principle: identify the record, confirm the definition, rebuild the physical object with no data, and verify—while distinguishing a structural rebuild from a data clear, and checking platform-specific temporary-table behavior rather than assuming one universal command. If you can state your platform and release, the procedure narrows to specific build options and DDL.

Practical checklist and pitfalls

Before building, confirm the target database and that no one is actively using the table. Build with no data, then run the dependent process to confirm. Watch for lost grants and dependent objects after the drop. Do not rebuild a table that is actually serving as a permanent store under a misleading TT name. And keep the definition and the physical table in sync going forward by building through Application Designer rather than altering tables by hand, since manual changes are the usual source of drift in the first place.