2016-10-27 03:45:28 -05:00
|
|
|
.. _package_dialog:
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2018-06-15 03:14:12 -05:00
|
|
|
***********************
|
|
|
|
`Package Dialog`:index:
|
|
|
|
***********************
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2018-01-11 10:58:30 -06:00
|
|
|
Use the *Package* dialog to create a (user-defined) package specification.
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The *Package* dialog organizes the management of a package through the following
|
2019-08-02 04:25:21 -05:00
|
|
|
dialog tabs: *General*, *Header*, *Body*, and *Security*. The *SQL* tab displays the SQL
|
2019-03-08 09:29:05 -06:00
|
|
|
code generated by dialog selections.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
.. image:: images/package_general.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Package dialog general tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
Use the fields in the *General* tab to identify the package:
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Use the *Name* field to add a descriptive name for the package. The name of a
|
|
|
|
new package must not match any existing package in the same schema.
|
|
|
|
* Select the schema in which the package will reside from the drop-down listbox
|
|
|
|
in the *Schema* field.
|
2016-09-16 05:14:49 -05:00
|
|
|
* Store notes about the package in the *Comment* field.
|
|
|
|
|
2019-08-02 04:25:21 -05:00
|
|
|
Click the *Header* tab to continue.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-08-02 04:25:21 -05:00
|
|
|
.. image:: images/package_header.png
|
|
|
|
:alt: Package dialog header tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-08-02 04:25:21 -05:00
|
|
|
Use the *Header* field to define the public interface for the package.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-08-02 04:25:21 -05:00
|
|
|
Click the *Body* tab to continue.
|
|
|
|
|
|
|
|
.. image:: images/package_body.png
|
|
|
|
:alt: Package dialog body tab
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
|
|
|
|
Use the *Body* field to provide the code that implements each package object.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
Click the *Security* tab to continue.
|
|
|
|
|
|
|
|
.. image:: images/package_security.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Package dialog security tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Use the fields in the *Security* tab to to assign EXECUTE privileges for the
|
|
|
|
package to a role. Click the *Add* icon (+) to set privileges for the package:
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
* Select the name of the role from the drop-down listbox in the *Grantee* field.
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click inside the *Privileges* field. Check the boxes to the left of a
|
|
|
|
privilege to grant the selected privilege to the specified user.
|
|
|
|
* Select the name of a role from the drop-down listbox in the *Grantor* field.
|
|
|
|
The default grantor is the owner of the package.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Click the *Add* icon (+) to assign additional privileges; to discard a
|
|
|
|
privilege, click the trash icon to the left of the row, and confirm the deletion
|
|
|
|
in the *Delete Row* popup.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
Click the *SQL* tab to continue.
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Your entries in the *Package* dialog generate a SQL command that creates or
|
|
|
|
modifies a package definition:
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
.. image:: images/package_sql.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Package dialog sql tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The example shown demonstrates creating a package named *empinfo* that includes
|
2019-08-02 04:25:21 -05:00
|
|
|
two function and two procedure.
|
2018-01-11 10:58:30 -06:00
|
|
|
|
2016-09-16 05:14:49 -05:00
|
|
|
* Click the *Save* button to save work.
|
|
|
|
* Click the *Cancel* button to exit without saving work.
|
2016-10-27 03:45:28 -05:00
|
|
|
* Click the *Reset* button to delete any changes to the dialog.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
|