Change default tablespace of user - Oracle Database Script. -- Get default tablespace of a user: set lines 200 col username for a23 select username,DEFAULT_TABLESPACE from dba_users where username='SCOTT'; USERNAME DEFAULT_TABLESPACE ----------------------- ------------------------------ SCOTT USERS -- Change default tablespace of a user: ALTER USER SCOTT DEFAULT TABLESPACE DATATS; select username,DEFAULT_TABLESPACE from dba_users where username='SCOTT'; USERNAME DEFAULT_TABLESPACE ----------------------- ------------------------------ SCOTT DATATS
-- Get default tablespace of a user: set lines 200 col username for a23 select username,DEFAULT_TABLESPACE from dba_users where username='SCOTT'; USERNAME DEFAULT_TABLESPACE ----------------------- ------------------------------ SCOTT USERS -- Change default tablespace of a user: ALTER USER SCOTT DEFAULT TABLESPACE DATATS; select username,DEFAULT_TABLESPACE from dba_users where username='SCOTT'; USERNAME DEFAULT_TABLESPACE ----------------------- ------------------------------ SCOTT DATATS