Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Convert 7.3 users to 8.17 users
Try this:
files included:
dup_user.sql
clears.sql
clear_for_spool.sql
Jared
@clears
col colduser new_value uolduser noprint
col cnewuser new_value unewuser noprint
col cspoolfile new_value uspoolfile noprint
prompt Old Username:
set term off feed off
select upper('&1') colduser from dual;
set term on feed on
prompt New Username:
set term off feed off
select upper('&2') cnewuser from dual;
select '_' || lower('&unewuser') || '.sql' cspoolfile from dual;
set term on feed on
@clear_for_spool
spool &uspoolfile
prompt set echo on
select 'create user &unewuser identified by values ' || '''' || password || '''' ||
' default tablespace ' || default_tablespace || ' temporary tablespace ' || temporary_tablespace || ';'from dba_users
select 'alter user &unewuser quota ' ||
decode(max_bytes, -1, ' UNLIMITED ', max_bytes ) || ' on ' ||
tablespace_name || ';'
from dba_ts_quotas
where username = upper('&uolduser')
/
select 'grant ' || granted_role || ' to &unewuser;'
from dba_role_privs
where grantee = upper('&uolduser')
union
select 'grant ' || privilege || ' to &unewuser;'
from dba_sys_privs
where grantee = upper('&uolduser')
union
select 'grant ' || privilege || ' on ' || owner || '.' || table_name || ' to
&unewuser;'
from dba_tab_privs
where grantee = upper('&uolduser')
--order by 1, 2, 3, 4, 5
/
prompt set echo off
spool off
@clears
prompt
prompt The file '&uspoolfile' will create the new user '&unewuser'
prompt
set pause off
set echo off
set trimspool on
set feed on term on echo off verify off
set line 80
set pages 24 head on
clear col
clear break
clear computes
btitle ''
ttitle ''
btitle off
ttitle off
@@clears
set pages 0 lines 200 term on feed off
"Bartolo, David" To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> <bartolo_at_USCOL cc: O.edu> Subject: Convert 7.3 users to 8.17 users Sent by: root_at_fatcity.c om 08/28/01 02:07 PM Please respond to ORACLE-L
Hi all
Can I take all the users created in a 7.3 database and somehow import them
into a 8.1.7 database
with the original passwords and roles/access to tables?
TIA
David
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Bartolo, David
INET: bartolo_at_USCOLO.edu
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Jared.Still_at_radisys.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Aug 28 2001 - 18:37:46 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |