Re: script to create users like existing users

From: Paul Druker <pdruker_at_metaway.com>
Date: Thu, 23 Mar 2000 01:24:04 GMT
Message-ID: <UmeC4.4895$h3.26041_at_typhoon.southeast.rr.com>


Gérard,

Actually, you can extract all information you need from the existing dba views:

dba_users -- all users in the database
dba_roles -- all roles
dba_sys_privs -- system privileges
dba_tab_privs -- object (table, etc) privileges, etc.

So, you can generate all necessary "create" or "grant" statements yourself. You can find all these scripts in "Oracle Scripts" by Lomasky & Kreines (published by O'Reilly). You probably can find these scripts on the web as well.

Regards,
Paul

"Gérard De Maeyer" <gerard.de.maeyer_at_pandora.be> wrote in message news:QiaC4.13382$ds6.42326_at_afrodite.telenet-ops.be...
> Paul,
>
> thanks for your response.
> I have to create new Oracle login to harmonize all logins ( NT, Mail,
Unix,
> Oracle, ...) ; then i have to create new Oracle users with the same
grants,
> roles, ... than the old logins, and thne remove the old login. One by one
is
> a big work ... then i search the best way to create a script to automatize
> this migration.
>
> Best regards
>
> Gérard
>
>
> "Paul Druker" <pdruker_at_metaway.com> a écrit dans le message news:
> c2VB4.773$h3.7525_at_typhoon.southeast.rr.com...
> > Gerard,
> >
> > What exactly do you need to modify?
> >
> > For example, to change temporary tablespace for all your users you might
> > write the following script:
> >
> > set echo off termout off feedback off
> > spool gen_temp_tbs.sql
> > select 'alter user '||username||' temporary tablespace NEW_TEMP_TBS;'
> > from dba_users
> > where temporary_tablespace = 'OLD_TEMP_TBS';
> > spool off
> >
> > start gen_temp_tbs
> >
> > Regards,
> > Paul Druker
> >
> >
> > "Gérard De Maeyer" <gerard.de.maeyer_at_pandora.be> wrote in message
> > news:JqSB4.9907$ds6.34742_at_afrodite.telenet-ops.be...
> > > Hi,
> > >
> > > i have to modify more than 600 logins.
> > > How to create a script to automatize it ?
> > >
> > > Best regards
> > >
> > > Gerard
> > >
> > >
> >
> >
>
>
Received on Thu Mar 23 2000 - 02:24:04 CET

Original text of this message