Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Renaming a Tablespace in 8i & 9i
Tom,
In the spirit of collaboration, there are a few points that I'd like to clarify from your post.
In a nutshell, for the OP to accomplish his goal, he simply would:
This procedure will also move the table segments that comprise materialized views and materialized view logs.
The outage time can be reduced by using NOLOGGING and PARALLEL for the table and index rebuilds. The only caveat is to remember to set the tables and indexes to LOGGING and NOPARALLEL after the rebuilds. The OP should also gather segment statistics with DBMS_STATS after the move, as segment sizes, high water mark, and data density may change dramatically.
Regards,
Jeremiah Wilton
ORA-600 Consulting
http://www.ora-600.net
Tom Pall wrote:
> This doesn't sound like a fun project. First off, you can look for
> objects in dba_objects or if even sys.obj$ to find what exists in the
> tablespace. Not materialized views are going to be in the SYSTEM
> tablespace. If you followed standard practice, real indexes (as opposed
> to IOTs) will be in another tablespace. They will get dropped once you
> drop the underlying tables. And they'll become invalid during the
> move. You're going to have to develop not only a list of what's in the
> tablespace but a list of dependencies. Hmm. Was it 8i or 9i where the
> dependencies view disappeared and you had to run utrlrp.sql to recompile
> invalid objects after an upgrade? It's been a while.
>
> Anyway, your biggest problem will be the need to re-validate/re-compile
> and then the loss of dependent objects, IMO.
>
> On 8/27/07, *Godwin vincent* <godwin.ror_at_gmail.com
> <mailto:godwin.ror_at_gmail.com>> wrote:
>
> I am working on renaming a tablespace. I am working on
> Oracle versions 8i & 9i (HP-UX) and would like to request your help
> in this regard. I have an idea as what process needs to be followed,
>
> 1. Create new tablespace
> 2. Move all objects in the old tablespace to the new tablespace
> 3. Drop the old tablespace.
>
> The main step here is implementing the 2nd process, that is moving
> objects. I have tables, indexes, and other objects stored in the
> same tablepsace (USERS). Suppose, I want to rename the USERS
> tablespace to PERSONAL. How can i move all the objects (tables,
> indexes, views, materialized views, packages, procedures, etc) from
> the old tablespace to new tablespace? For tables, we can issue
> "Alter table <table_name> move tablespace <tablespace_name>" but how
> can i move all other objects like indexes, views, etc.., which
> reside in this tablespace?
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Aug 27 2007 - 20:50:14 CDT
![]() |
![]() |