| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Migrating Userids
Debor19071 wrote:
> We have ALOT of Oracle userids we need to copy from 1 instance to another.
> The tools we are using do not copy the passwords properly.
>
> Do you know of a way to properly pass the passwords over from 1 instance
> to another in the least laborious way as possible? We don't want to export
> every user.
Not a problem! Here's the script I use to generate a "create user" script (actually this is a subset of it; the real script also handles database quotas)
HTH, -bn
-----cut here------
set termout off
set feedback off
set heading off
set pagesize 0
set pause off
set space 1
column dummy1 noprint
column dummy2 noprint
spool c_user.sql
prompt REM File: c_user.sql
prompt REM This temporary SQL script was generated by g_user.
select TO_CHAR(sysdate,'"REM Generated on" MM/DD/YYYY "at" HH24:MI')
from DUAL
/
select username dummy1, 10 dummy2,
'CREATE USER ' || username || ' IDENTIFIED BY VALUES ''' ||
password || ''''
from DBA_USERS
where username NOT IN ('SYS','SYSTEM')
UNION
select username, 20,
' DEFAULT TABLESPACE ' || default_tablespace || ' TEMPORARY TABLESPACE ' || temporary_tablespace || ' PROFILE ' || profile || ';'
![]() |
![]() |