Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Default/Temp tablespaces
Sid_James wrote:
>
> Hi.
>
> About a 100 of our users have been given SYSTEM as their default user
> and temporary tablespaces! Is their an automated way that can change
> these to the USER and TEMP tablespaces instead?
Simple dynamic sql script:
SQL> set pagesize 0 SQL> set linesize 132 SQL> set termout off SQL> spool /tmp/changeusers.sql SQL> select 'alter user ' || username ||
2 ' defalt tablespace user temporary tablespace temp;'
3 from dba_users
4 where username != 'SYS'
5 order by username;
SQL> spool off SQL> spool /tmp/changusers.log SQL> @/tmp/changeusers.sql SQL> spool off
Cheers,
GC
Received on Sun Jul 16 2000 - 00:00:00 CDT