Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming Tablespace?

Re: Renaming Tablespace?

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Tue, 16 Mar 1999 20:53:19 -0800
Message-ID: <36EF353F.67AA@oriolecorp.com>


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



 http://www.oriolecorp.com, the site created by Oracle DBAs for Oracle DBAs
Received on Tue Mar 16 1999 - 22:53:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US