Transcript
Page 1: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)
Page 2: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)

N O T EAn Oracle TNS connection is shown in Figure C-1, but you have other connection options, such asdirect or LDAP.

2. Next, click the Connect button to open the main TOAD window(see Figure C-2).

FIGURE C-1 Connecting to Oracle in TOAD

Statementarea

Resultsarea

FIGURE C-2 The main TOAD window

C2

Appendix C

Page 3: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)

To view database objects, click the Schema Browser button to open a window in thework area with available objects listed in the left pane. After you select an object, tabs inthe right pane display information about the object. For example, in Figure C-3, a tablehas been selected in the left pane, and the right pane includes tabs for columns, indexes,constraints, and so forth.

EXECUTING STATEMENTS

You can enter SQL statements or PL/SQL blocks in the statement area. In Figure C-4, anSQL statement has been entered in the statement area. Clicking the Execute Statementbutton runs the statement and displays its output in the lower pane.

Schema Browserbutton

Object type tabs

Information for theselected object isdisplayed in tabs

FIGURE C-3 Using the schema browser to view database object information

Execute Statement button

SQL statement and output

FIGURE C-4 Executing an SQL statement

C3

TOAD (Tool for Oracle Application Developers)

Page 4: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)
Page 5: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)

To run the procedure, right-click it in the left pane and click Action Console. In theAction Console dialog box, click Execute Procedure, and then click OK. The SetParameters window shown in Figure C-7 opens with an anonymous block createdautomatically to test the procedure. This block contains a call to the procedure. To testit, you need to set values for any IN parameters and add DBMS_OUTPUTstatements todisplay values. Figure C-7 shows how the supplied block is modified.

The Turn OutputOn button

FIGURE C-6 Enabling DBMS output

FIGURE C-7 Testing a procedure

C5

TOAD (Tool for Oracle Application Developers)

Page 6: TOAD (TOOL FOR ORACLE APPLICATION DEVELOPERS)

Click OK to run the procedure. Processing returns to the statement area, and theresults area displays values for OUT parameters (see Figure C-8).

SUMMARY

This appendix has shown you how to get started with TOAD software, including creating aconnection and executing SQL and PL/SQL statements. TOAD has more advancedfeatures to help with PL/SQL development; for example, you can set breakpoints duringprogram unit debugging to view information, such as variable values, while a program isrunning. To explore these features, review product information on the Quest SoftwareWeb site.

Result of test run

FIGURE C-8 Displaying test output

C6

Appendix C


Recommended