Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to alter several users
Le Thu, 28 Nov 2002 15:13:42 -0000
"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> écrivait:
> "Frantz de Germain" <Frantz.de-Germain_at_univ-angers.fr> wrote in message
> news:20021128150443.019cd34c.Frantz.de-Germain_at_univ-angers.fr...
> > Hello,
> >
> > I can change quota for one user (alter user foo quota 1M on users;), but
> is it
> > possible to alter several users in one query, for example, those I can
> > retrieve in the following one :
> >
> > select GRANTEE from DBA_ROLE_PRIVS where GRANTED_ROLE = 'TOTO';
> >
> > I think yes, but I don't know the syntax.
>
> easiest thing to do is use sql to write sql
>
> select 'alter user '||grantee||' quota 0 on system;' from DBA_ROLE_PRIVS
> where GRANTED_ROLE = 'TOTO';
> for example.
>
I made a test on one user and one role and I had the following result :
SQL> select 'alter user '||grantee||' quota 1m on users ;' from DBA_ROLE_PRIVS SQL> where GRANTED_ROLE = 'ROLETEST';
'ALTERUSER'||GRANTEE||'QUOTA1MONUSERS;'
As you can see the user SYSTEM has been altered and this could be a problem.
Furthermore, where can I find the oracle doc about this kind of query.
Thanks.
-- Frantz de GERMAIN E-mail : Frantz.de-Germain_at_info.univ-angers.fr Web : http://frantz.free.fr Membre de la Société d'Astronomie de Nantes : http://www.san-fr.com/Received on Fri Nov 29 2002 - 03:34:32 CST