Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming Tablespace?
Doug Cowles wrote:
>
> Is there a simple way to just rename a tablespace?
> I see how to rename a tablespace's datafiles, but
> not the tablespace itself. Any ideas?
>
> - Dc.
(My saying how to do it doen't mean full endorsement) You can connect as
SYS
and execute :
update ts$
set name = <new name>
where name = <old name>;
commit;
alter system flush shared_pool;
If I were you, I would then shut the database down and start it up again. Updating the dictionary is not recommended practice. In the case of tablespaces, it is relatively safe because TS$ is the only table where the name appears (tablespaces are referenced by their internal number ts# everywhere else). I have done worse but don't mention this kind of thing to the Oracle support, they are going to faint. And once again, keep this kind of operation as a last resource attempt when you have a big problem. Otherwise it would be better, if slower, to export everything in the tablespace, drop it (including contents) and recreate it under the new name.
--
Regards,
Stéphane Faroult
Oriole Corporation
![]() |
![]() |