Skip to content
Home » Oracle » How to Resolve ORA-01647: tablespace is read-only, cannot allocate space in it

How to Resolve ORA-01647: tablespace is read-only, cannot allocate space in it

ORA-01647

Tried to move a table to another tablespace, but it failed with ORA-01647.

SQL> alter table employees move tablespace example;
alter table employees move tablespace example
            *
ERROR at line 1:
ORA-01647: tablespace 'EXAMPLE' is read-only, cannot allocate space in it

ORA-01647 means that the target tablespace is in READ ONLY, there's no way to allocate space in the tablespace for your segment.

Let's see current status of the tablespace.

SQL> select status from dba_tablespaces where tablespace_name = 'EXAMPLE';

STATUS
---------
READ ONLY

OK, it's really READ ONLY.

Solution

To solve ORA-01647, we should revert the tablespace back to READ WRITE:

SQL> alter tablespace example read write;

Tablespace altered.

SQL> select status from dba_tablespaces where tablespace_name = 'EXAMPLE';

STATUS
---------
ONLINE

Now we can move the table again.

SQL> alter table employees move tablespace example;

Table altered.

We solved it.

Leave a Reply

Your email address will not be published. Required fields are marked *