Subject Re: [firebird-support] Re: Rights confusion with stored procedures and triggers
Author Michael Ludwig
PenWin schrieb am 25.05.2010 um 07:27:48 (+0200):
> Dne 24.5.2010 15:30, Michael Ludwig napsal(a):
> > PenWin schrieb am 24.05.2010 um 14:25:45 (+0200):

> 1) User INTERNET calls procedure INTERNET_INSERT_ROW.
> 2) Procedure INTERNET_INSERT_ROW validates data and writes it to
> SOMETABLE.
> 3) AFTER INSERT trigger LOGTRIGGER_SOMETABLE fires.
> 4) LOGTRIGGER_SOMETABLE writes the new record from SOMETABLE to
> LOGTABLE.
>
> Unfortunately, at step #4 I am getting an error no permission for
> insert/write access to TABLE LOGTABLE, and after a number of failed
> attempts, I am at a loss what to do. I tried granting INSERT ON
> LOGTABLE to either INTERNET (the user) or INTERNET_INSERT_ROW (the
> procedure that does the inserting), but unfortunately it didn't change
> anything.

I would consider posting a ready-to-run test script for ISQL so
others can try and reproduce the error you're seeing. If it cannot
be reproduced using ISQL the error might be specific to the tool
you're using.

> >> What would be the best way of debugging the cause?
> >
> > I would write a script that drops and creates all the objects you
> > need for your setup so that you only need to call it using INPUT
> > from ISQL to have everything created. You could then call that on
> > your real database, taking care, of course, not to delete real data.

--
Michael Ludwig