You can edit routines that are deployed in a database.
You deploy the updated routine to replace the original routine in
the database.
About this task
You open routines from the
Data Source Explorer view
or the
Administration Explorer view. You edit
the routine in the Routine Editor. After editing the routine, you
can deploy the routine to replace original routine in the database.
You can also save the routine as a file.
Tip: You can save
a routine that is deployed in a database to your workspace by dragging
and dropping the routine from the Data Source Explorer view
or the Administration Explorer view into a project.
Procedure
To edit a routine that is deployed to a database:
- Open the Data Source Explorer or Administration
Explorer.
- In the explorer view, navigate to the routine, right-click
the routine, and click Open with Routine Editor.
- From the Data Source Explorer, go to the Schemas folder
of the database. In each schema folder, there is a PL/SQL
packages folder, User-Defined Functions folder,
and Stored Procedures folder. Open the folder
to view the routine for the schema.
- From the Administration Explorer, open the Application
Objects folder. When you select the PL/SQL
packages folder, User-Defined Functions folder,
or Stored Procedures folder, the routines are
displayed in the Object List.
A copy of the routine opens in the Routine
Editor.
- Edit the Routine.
After you modify the routine,
you can save the routine as a file on your computer when you deploy
the updated routine.
- Deploy the routine. In the Routine Editor,
click
. The workbench
prompts you to save the modified routine. You can save the routine
as a file on your computer. The file contains the routine source code
and property information from the database. The Deploy
Routines wizard opens.
- Complete the wizard. When deploying routines,
enable debugging by selecting Enable debugging in
the Routine Options page of the wizard.
The edited routine replaces the original routine in
the module.
- Run or debug the routine from the Routine Editor.
- To run the deployed routine, click
.
- If you enabled debugging, click
to debug it.
What to do next
After deploying the routine for debugging, you can debug
or run the routine from the Routine Editor, the
Data Source
Explorer, or the
Administration Explorer.From
the workbench, you open a routine file that you saved on your computer
by selecting . When you open a routine file, you
specify database connection information. The connection that you select
is used when you deploy and run the routine.