Error explanation help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Stearns

    Error explanation help

    Running the following shell script (DB2 8.1.5, LINUX):
    db2 <<END
    connect to animals
    set schema is3
    SET PATH = CURRENT PATH, IS3@
    call make_angus_anim als()
    commit
    quit
    END

    I am getting the following message (among other innocuous ones):
    SQL0440N No authorized routine named "MAKE_ANGUS_ANI MALS" of type
    "PROCEDURE" having compatible arguments was found. SQLSTATE=42884

    I ran the following shell script (with many lines elided) to create the
    procedure, which completed without error:
    -- vim: set ai sw=4 ts=4:
    --
    -- Create the animals, awards, herdid and gene_defects tables from
    angus_in and animals_in;
    -- tattoo is the link.
    --
    connect to animals@
    --
    set schema is3@
    --
    SET PATH = CURRENT PATH, IS3@
    --
    drop procedure make_angus_anim als@
    --
    CREATE PROCEDURE make_angus_anim als()
    LANGUAGE SQL
    BEGIN
    -- variables for checking record read or not
    DECLARE SQLSTATE CHAR(5);
    DECLARE v_at_end INT DEFAULT 0;
    ..
    .. lots of code omitted
    ..
    END LOOP;
    CLOSE c1;
    INSERT INTO is.debugging VALUES (CURRENT_TIMEST AMP,v_program,
    'Routine ended');
    END @
    --
    GRANT EXECUTE ON PROCEDURE make_angus_anim als TO PUBLIC@

    I don't understand! I have read the manual's relevant parts (CALL,
    CREATE PROCEDURE, GRANT EXECUTE, etc.) and I can't see my error. I must
    be missing something obvious. Any pointers to the cause of the problem
    would be greatly appreciated.

  • Robert Stearns

    #2
    Re: Error explanation help

    I realize both top posting and self replying are frowned on, but this is
    a special case: Ignore the original message; I found the problem! It was
    the '@' left over from a cut-and-paste operation. Amazing what you can't
    see when you're looking right at it!
    Robert Stearns wrote:
    [color=blue]
    > Running the following shell script (DB2 8.1.5, LINUX):
    > db2 <<END
    > connect to animals
    > set schema is3
    > SET PATH = CURRENT PATH, IS3@[/color]
    ^ problem![color=blue]
    > call make_angus_anim als()
    > commit
    > quit
    > END
    >
    > I am getting the following message (among other innocuous ones):
    > SQL0440N No authorized routine named "MAKE_ANGUS_ANI MALS" of type
    > "PROCEDURE" having compatible arguments was found. SQLSTATE=42884
    >
    > I ran the following shell script (with many lines elided) to create the
    > procedure, which completed without error:
    > -- vim: set ai sw=4 ts=4:
    > --
    > -- Create the animals, awards, herdid and gene_defects tables from
    > angus_in and animals_in;
    > -- tattoo is the link.
    > --
    > connect to animals@
    > --
    > set schema is3@
    > --
    > SET PATH = CURRENT PATH, IS3@
    > --
    > drop procedure make_angus_anim als@
    > --
    > CREATE PROCEDURE make_angus_anim als()
    > LANGUAGE SQL
    > BEGIN
    > -- variables for checking record read or not
    > DECLARE SQLSTATE CHAR(5);
    > DECLARE v_at_end INT DEFAULT 0;
    > .
    > . lots of code omitted
    > .
    > END LOOP;
    > CLOSE c1;
    > INSERT INTO is.debugging VALUES (CURRENT_TIMEST AMP,v_program,
    > 'Routine ended');
    > END @
    > --
    > GRANT EXECUTE ON PROCEDURE make_angus_anim als TO PUBLIC@
    >
    > I don't understand! I have read the manual's relevant parts (CALL,
    > CREATE PROCEDURE, GRANT EXECUTE, etc.) and I can't see my error. I must
    > be missing something obvious. Any pointers to the cause of the problem
    > would be greatly appreciated.
    >[/color]

    Comment

    Working...