Re: Unable to Create Package Body

From: Michael Cipriani <74211.1354_at_compuserve.com>
Date: 1996/07/10
Message-ID: <31E3DA3B.6459_at_compuserve.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;
> /
 

-- 

Not real sure about this, but I do not think that the GRANT command can 
come before the CREATE PACKAGE BODY line.
Michael Cipriani
Received on Wed Jul 10 1996 - 00:00:00 CEST

Original text of this message