Executing Methods

This topic describes the procedure to execute methods or functions.

Method execution in Oracle® Database Navigator tool helps in executing complex data types such as procedures or functions. The results of the executed method is displayed on the DB Execution Console window. To run a method (function or procedure):

  1. Open the database object, such as a procedure or function, from the DB Browser pane program editor window.
  2. Write or edit the method (database function or procedure).
  3. Click the Run Method icon from the toolbar menu of the program editor window.

    Run Method option in editor

    The DB Navigator - Execute Method dialog box opens with details of the target database connection, schema, and session in which the method will be run.


    DB Navigator - Execute Method dialog box

  4. Enter the value of the input parameter in the text box. The permissible character type and max character length for the input parameter displays next to the text box. Clicking the Possible values icon displays the history of parameter values used for previous method execution.
  5. In the Target Context section, you can select a different Target Schema and Target Session from the available options to execute the method.
  6. Select the Commit after execution check box to auto-commit the execution transaction in the database.
  7. Select the Enable Logging (DBMS Output) check box if you want to capture the log event for this method execution.
  8. Click Execute.

    The results of the executed method displays in the DB Execution Console window. The results include the method input and its output along with the fetched records corresponding to the output in a separate tab.


    Method execution result in DB Console window

    If Enable logging (DBMS Output) option was enabled, the DBMS Output tab displays the method execution event statistics.


    DBMS Output tab of DB Console window

    From the DB Execution Console toolbar menu options, you can edit the method (in the editor), execute the method again, open the execution dialog box to change the input parameters or target context. Furthermore, you can export the records fetched in the result and search for a specific record and view record details.