Subject Re: [ib-support] Grants
Author Claudio Valderrama C.
"Helen Borrie" <helebor@...> wrote in message
> At 01:44 AM 25-03-02 -0400, Claudio Valderrama C. wrote:
> >""Sandeep"" <sandeep@...> wrote in message
> >news:3C9F5AD8.29216.2047A16@localhost...
> > > If I restore a database why do I lose all the grants on all its
> >
> >You shuld make sure the db you backed up has the grants you want.
> >:-)
> >
> >I never have lost the SQL rights. Gbak keeps them carefully.
> Of course, you will "lose" all the grants if you restore the DB onto a
> server where the privileged user doesn't exist. :))

This is only a temporary loss. The engine doesn't care if you grant to a
user that exists or to a user that doesn't exist. You will simply have to
create the users, but the db keeps any valid or invalid user.

IB has an ambiguity that given a set of rights given to a role, if the same
script is run on another db where that role doesn't exist, the rights are
assigned to a supposed user with such name. FB accepts the same game if you
don't put USER or ROLE in the GRANT/REVOKE command. But if you say TO USER,
it's always grant to USER and if you say TO ROLE, it's always grant to ROLE
and same for REVOKE. But this is a different story. Gbak writes directly to
the security-related system tables.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing