Re: Problem executing grant into a procedure
Posted in 1998
PROJECT Yakov Berkovitch 5055 wrote:
>
> Hi,
>
> i have the following problem:
> i defined a procedure that has only one parameter that
> is a user name
> the body of procedure performs a grant connect to the user
> passed as paramtere.
[SNIP]
> WHen i run the procedure, Informix gives the connect permission
> to the fname and not the user.
>
> How can i write this ???
Shell script (in ksh'ese):
cat >grant_to <<!!
#! /usr/bin/ksh
dbase=$1
user=$2
dbaccess $1 - <<EOF
grant connect to $user;EOF
!!
Then:
grant_to mydatabase someuser
will grant connect privelege to user 'someuser' in database 'mydatabase'
It useless to tilt at windmills with a lance. Just change tools and
use a grenade.
Art S. Kagel