|
-
To move all the tables from wherever they are now to one tablespace:
spool move_schema.sql
select 'alter table '||table_name||
' move tablespace users;'
from user_tables;
SQL> conn scott/tiger
Connected.
SQL> /
'ALTERTABLE'||TABLE_NAME||'MOVETABLESPACEUSERS;'
-------------------------------------------------
alter table BONUS move tablespace users;
alter table DEPT move tablespace users;
alter table EMP move tablespace users;
alter table SALGRADE move tablespace users;
spool off
Edit the spool file, save it, run it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|