Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Default/Temp tablespaces

Re: Default/Temp tablespaces

From: GC <assistant_madman_at_hotmail.com>
Date: 2000/07/16
Message-ID: <397249F3.1252FBAC@hotmail.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US