Re: Unable to Create Package Body

From: Ken Mizuta <kmizuta_at_jp.oracle.com>
Date: 1996/07/12
Message-ID: <31E68E70.13CF_at_jp.oracle.com>#1/1


Michael Gabriel wrote:
>
> Hi there,
>
> I'm having trouble compiling a package body.
>
> PLS-00304: cannot compile body of 'SUSP_PACKAGE_BODY' without its
> specification
>
> The account has Create Procedure privilege.
>
> Is there some hidden privilege that's required?
>
> The SQL script contains the following...
>
> rem SU_PACKAGE.SQL
>
> CREATE OR REPLACE PACKAGE susp_package IS
>
> ------------
> -- OVERVIEW
> --
> -- This package provides access to SUSP transaction statements from
> -- stored procedures.
>
> ----------------------------
> -- PROCEDURES AND FUNCTIONS
> --
>
> PROCEDURE do_nothing;
> FUNCTION verify_user (username VARCHAR2) RETURN BOOLEAN;
> END susp_package;
> /
>
> GRANT EXECUTE ON susp_package TO ops$sudba;
>
> CREATE OR REPLACE PACKAGE BODY susp_package_body IS
> PROCEDURE do_nothing IS
> BEGIN
> NULL;
> END do_nothing;
>
> FUNCTION verify_user (username VARCHAR2) RETURN BOOLEAN IS
> -- Verify the user has access to the Suspension System
> t_count INTEGER;
> b_result BOOLEAN;
> t_username VARCHAR2 := username;
> BEGIN
> SELECT count(*)
> INTO t_count
> FROM hd_su_user_authorization ua
> WHERE
> ua.username = t_username;
> b_result := (t_count > 0);
> RETURN b_result;
> END verify_user;
> END susp_package_body;
> /

The name you gave for the PACKAGE specification is susp_package. The name you gave for the PACKAGE BODY is susp_package_body. These two have to match.

-- 
                  ____________________________________________ 
                 /    Kenichi Mizuta 
      ////      /     Oracle Corporation (Redwood Shores, CA) 
     |0 0|     /      Applications Division 
_ooO_ \U/_Ooo_/       email: kmizuta_at_us.oracle.com 
The comments and opinions expressed herein are mine and
do not necessarily represent those of Oracle Corporation.
Received on Fri Jul 12 1996 - 00:00:00 CEST

Original text of this message