I was trying to alter all of the tablespaces for all users currently using the “USERS” tablespace. The following SQL worked nicely for all but one user:
select 'ALTER USER '||username||' default tablespace USERS_01 quota unlimited on USERS_01;' from dba_users where DEFAULT_TABLESPACE = 'USERS';
This SQL dumped me the command necessary to move all users using the USERS tablespace to start using the USERS_01 tablespace. When I ran these statements I received the following error on one user
ALTER USER XS$NULL default tablespace USERS_01 quota unlimited on USERS_01; *
ERROR at line 1:
ORA-01031: insufficient privileges
To fix this you simply need to modify the default tablespace of the database with this SQL:
alter database default tablespace USERS_01;

