Rename tablespace in oracle db SQL❯ SELECT file_id, file_name, tablespace_name FROM dba_data_files WHERE file_id=37; FILE_ID FILE_NAME TABLESPACE_NAME ---------- -------------------------------------------------------- ------------------------------ 37 /home/oracle/app/oracle/oradata/cdb1/testin1.dbf TESTING --- Rename the tablespace_name from TESTING to PRODUCING; SQL❯ ALTER TABLESPACE TESTING RENAME TO PRODUCING; TABLESPACE altered. SQL❯ SELECT file_id, file_name, tablespace_name FROM dba_data_files WHERE file_id=37; FILE_ID FILE_NAME TABLESPACE_NAME ---------- -------------------------------------------------------- ------------------------------ 37 /home/oracle/app/oracle/oradata/cdb1/testin1.dbf PRODUCING
SQL❯ SELECT file_id, file_name, tablespace_name FROM dba_data_files WHERE file_id=37; FILE_ID FILE_NAME TABLESPACE_NAME ---------- -------------------------------------------------------- ------------------------------ 37 /home/oracle/app/oracle/oradata/cdb1/testin1.dbf TESTING --- Rename the tablespace_name from TESTING to PRODUCING; SQL❯ ALTER TABLESPACE TESTING RENAME TO PRODUCING; TABLESPACE altered. SQL❯ SELECT file_id, file_name, tablespace_name FROM dba_data_files WHERE file_id=37; FILE_ID FILE_NAME TABLESPACE_NAME ---------- -------------------------------------------------------- ------------------------------ 37 /home/oracle/app/oracle/oradata/cdb1/testin1.dbf PRODUCING