Drop a column from a table in a read-only, you got an error like this ORA-12985 Tablespace Users is Read Only, Cannot Drop Column
top of page
To see this working, head to your live site.
Edited:Â Oct 17, 2022
ORA-12985 Tablespace Users is Read Only, Cannot Drop Column in Oracle Database
ORA-12985 Tablespace Users is Read Only, Cannot Drop Column in Oracle Database
1 answer0 replies
Like
1 Comment
bottom of page
The Object which is trying to drop belongs to a table sapce is in read only mode
Step 1 : Find the tablespace of that particular table
SQL> select tablespace_name from dba_segments where segment_name='MASTER03'; TABLESPACE_NAME ------------------------------ USERS
Step 2 : Find the staus of the tablespace
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name='USERS'; TABLESPACE_NAME STATUS ------------------------------ -------------------- USERS READ ONLY
Step 3: Inorder to Drop a column ,We need to make the tablespace READ and WRITE mode only
SQL> ALTER TABLESPACE users READ WRITE; Tablespace altered. SQL> select tablespace_name,status from dba_tablespaces where tablespace_name='USERS'; TABLESPACE_NAME STATUS ------------------------------ ------------------ USERS ONLINE SQL> alter table chaitanyadba.master03 drop (OWNER,OBJECT_NAME); Table altered.