Running the Build Process

This section provides an overview of the Build menu and discusses how to:

  • Select the build scope.

  • Select build options and run the Build process.

Access all of the commands and options that are associated with building tables, views, indexes, triggers, and altering tables from the Build menu. When you choose to build an item from the Build menu, the tasks for creating or running SQL scripts that define the underlying database components are included in the Build dialog box.

Image: Build dialog box

This example illustrates the fields and controls on the Build dialog box. You can find definitions for the fields and controls later on this page.

Build dialog box

The settings for the Build process in the Build Settings dialog box enable you to configure various aspects of the process. Depending on which build option you are running, your settings vary. The Build Settings that you select are stored on your workstation so that they can be reused during future PeopleSoft Application Designer sessions. Access the Build settings by selecting Settings from the Build menu in PeopleSoft Application Designer or click theSettings button in the Build dialog box.

Image: Build Settings dialog box

This example illustrates the fields and controls on the Build Settings dialog box. You can find definitions for the fields and controls later on this page.

Build Settings dialog box

When you select the Create Tables, Create Indexes, or Create Views options in the Build dialog box, specify the appropriate options on the Create tab of the Build Settings dialog box. For example, you might need to specify whether an existing table, view, or index is skipped or dropped and then recreated.

If you modify your record definitions, the tables in your production database should reflect those changes to maintain your data integrity. When you alter a table, select the appropriate options, such as the options in the Drop Column Options area on the Alter tab of the Build Settings dialog box.

You can monitor the Build process by reviewing the log files that it automatically generates. Keep in mind that the log file is entirely separate from the script file. The amount of information that the log file contains is up to you. You can set up logging so that all statuses (both good and bad) appear in the log, or you can specify that only errors or warnings appear in the log. Control the settings for the Build log file (such as the logging level and the location for the output log file) on the Logging tab of the Build Settings dialog box.

If you build a script file, then the Build process generates a script file that contains all of the CREATE and ALTER SQL statements so that you can review them before running the SQL through another SQL command processor. If the generated script file meets your requirements, a database administrator (DBA) can run the script later. The Build process can produce multiple scripts during a single run—one for each build option—depending on the script settings that you specify at runtime. For example, you can specify that the Build process generate a separate script for your tables, views, indexes, triggers, and alters, or you can have all of the SQL for each action contained in one script. Use the Scripts tab of the Build Settings dialog box to specify where the SQL script is written, whether you want multiple scripts generated for each definition type, and whether you want previous scripts overwritten.

The Build feature includes three different scopes that determine the size of your build project. Depending on what you actually want to build—one record or an entire project—you can determine the scope by selecting one of the scopes described in the following topics.

Current Definition

Select Current Definition from the Build menu to build or alter the active record definition. Active definition means the definition that is currently active in the definition workspace.

Project

Select Project from the Build menu to build or alter all of the records, indexes, triggers, and views in the current project—that is, all of the records that appear in the project workspace. You typically find numerous record definitions in the Build Scope list box.

To build all definitions in a database, create a new project and insert all of the appropriate records. For example, insert records of a particular type, such as views. If you create another record after the all records project is built, you must manually add the new record to the project.

You may also build a project using the command line and specific parameters. The prerequisites for using the command line to build a project are:

  • The project exists with all objects.

  • The build settings need to be set in the Windows registry.

Note: The Build Project process accesses every single record that is in the project, including work records, even if they are marked to be deleted.

Select Definitions Into Project

In some situations, you might want to build a subset of the records in the project that is currently open. If you do not want to build an entire project or even the current project, you can build only the definitions that you select in the project workspace by pressing the ctrl key and selecting multiple records in the project workspace. After you select the appropriate records, right-click and select Build from the pop-up menu. Only the definitions that are selected in the project workspace appear in the Build Scope list box.

Note: You must invoke the Build process from the pop-up menu; you cannot build selected definitions from an open project using the Build menu.

Access the Build dialog box.

Field or Control

Definition

Build Scope

This list box displays all of the definitions that are included in the current Build process. The records that appear in this list box cannot be selected or deselected. If you must narrow the scope of your build, do so before accessing the Build dialog box.

Build

Click this button to start the Build process. While the Build process is running, the Build Progress dialog box appears, showing the current record being processed, the record number being processed in the series, and the total number of records that comprise the build. To stop a running Build process, click the Cancel button. When the Build process completes, the Cancel button is unavailable, and the Close button is the only valid button.

Settings

Click this button to open the Build Settings dialog box, where you can view or change your options.

Note: After the Build process begins, no runtime prompts appear until the process is complete. All events are written to the Build log.

Build Options

The Build Options group box enables you to specify what action you want to occur: Create Tables, Create Indexes, Create Views, Alter Tables, or Create Trigger. If you select Create Tables or Alter Tables, Create Indexes is automatically selected by default. Also, if you select Alter Tables, Create Indexes and Create Trigger are automatically selected by default.

Note: You can select both Alter Tables and Create Tables to run concurrently if the Skip table if it already exists option is enabled on the Create tab in the Build Settings dialog box. Otherwise, the system cannot determine whether you want to alter or recreate a table that already exists.

Build Execute Options

Field or Control

Definition

Build script file

Select this option to review and update the SQL before running the script. This method is the safest.

Execute SQL now

Select this option if you do not want to invoke another program to run the SQL; the SQL runs as part of the Build process. The disadvantage of running the SQL immediately is that you have no opportunity to review the SQL before it is committed to the database.

Execute and build script

Select this option to review the SQL that the Build process just ran.

To run the SQL script file that the Build process generates, you must use a third-party SQL interpreter, such as Oracle SQL*Plus or Microsoft ISQL/W. Most database vendors include a native command processor that you can run on the client or the server.

Note: The Execute SQL now option is unavailable if you use the Alter Tables Build option. However, you can use the Execute and build script option when using Alter Tables. Selecting this option builds a script with the entire altered SQL. This script may help if errors are encountered during the alter process. However, if an alter process has multiple tables and an error occurs, the errors are reported to a log file and the process continues to the next table.