Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - Oracle (Server)  »  Recover index tablespace...
Page 1 of 1    

Recover index tablespace...

Author Message
Fabrice...
Posted: Mon Oct 19, 2009 11:00 pm
Guest
Hello

How to recover index tablespace ?
I have A tablespace for the data and an onother for indexes.

.. Can I restore the datafile of my index tablespace and do an un recover
tablespace. The redologs archivied will be replayed ?
and Do my base will become consistent ?

.. Or do I add a new datafile in my tablespace, drop the old one and rebuild
all the indexes ?
How to rebuild all the indexes ?


thanks a lot
fabrice
 
ddf...
Posted: Mon Oct 19, 2009 11:00 pm
Guest
Comments embedded.

On Oct 19, 2:00 pm, Fabrice <t... at (no spam) test.com> wrote:
Quote:
Hello

How to recover index tablespace ?

What has happened to the index tablespace? Are there any non-index
objects in this tablespace?

Quote:
I have A tablespace for the data and an onother for indexes.

. Can I restore the datafile of my index tablespace and do an un recover
tablespace. The redologs archivied will be replayed ?
and Do my base will become consistent ?

If all objects in that tablespace are indexes you could simply build a
new tablespace and rebuild the indexes into that new tablespace.

Quote:

. Or do I add a new datafile in my tablespace, drop the old one and rebuild
all the indexes ?

What happened to this datafile that raises this question?

Quote:
How to rebuild all the indexes ?

Query the data dictionary for all indexes in that tablespace and
generate the rebuild statements:

select 'alter index '||owner||'.'||index_name||' rebuild;'
from dba_indexes
where tablespace_name = '.....';

Replace '.....' with your index tablespace name.
Quote:

thanks a lot
fabrice


David Fitzjarrell
 
Fabrice...
Posted: Tue Oct 20, 2009 5:16 am
Guest
Hello

Thanks for your answer.
today, It happens nothing. It just a question for me.
I had to restore my datafiles (index and data) there was some days. Problem
with hardware. And now I'm looking for answers to somme questions.
And what about corrupt or loss of the index tablespace (for example hardware
failure or datafile corruption).

And I down't know the best way to resolve this issue :

- Can I just restore index datafile from my last cold backup and replay
redolog archivied to get all my data and indexes consistents. (recover
tablespace "tbs_index";)

- Or do I have to recreate (by adding a new datafile) my index tablespace
from nothing and launch a global rebuild of all the indexes. Can we do
thant in production ?

I would like to test the issue.
Thanks for your help.



ddf wrote:

Quote:
Comments embedded.

On Oct 19, 2:00 pm, Fabrice <t... at (no spam) test.com> wrote:
Hello

How to recover index tablespace ?

What has happened to the index tablespace? Are there any non-index
objects in this tablespace?

I have A tablespace for the data and an onother for indexes.

. Can I restore the datafile of my index tablespace and do an un recover
tablespace. The redologs archivied will be replayed ?
and Do my base will become consistent ?

If all objects in that tablespace are indexes you could simply build a
new tablespace and rebuild the indexes into that new tablespace.


. Or do I add a new datafile in my tablespace, drop the old one and
rebuild all the indexes ?

What happened to this datafile that raises this question?

How to rebuild all the indexes ?

Query the data dictionary for all indexes in that tablespace and
generate the rebuild statements:

select 'alter index '||owner||'.'||index_name||' rebuild;'
from dba_indexes
where tablespace_name = '.....';

Replace '.....' with your index tablespace name.

thanks a lot
fabrice


David Fitzjarrell
 
Robert Klemme...
Posted: Tue Oct 20, 2009 1:16 pm
Guest
Please do not top post.

On 20.10.2009 07:08, Fabrice wrote:
Quote:
today, It happens nothing. It just a question for me.
I had to restore my datafiles (index and data) there was some days. Problem
with hardware. And now I'm looking for answers to somme questions.
And what about corrupt or loss of the index tablespace (for example hardware
failure or datafile corruption).

And I down't know the best way to resolve this issue :

- Can I just restore index datafile from my last cold backup and replay
redolog archivied to get all my data and indexes consistents. (recover
tablespace "tbs_index"Wink

If you have a proper DB backup basically it should not matter what
tablespace is broken (apart from system maybe) - the backup will restore
either properly.

Quote:
- Or do I have to recreate (by adding a new datafile) my index tablespace
from nothing and launch a global rebuild of all the indexes. Can we do
thant in production ?

I don't think so - unless your backup is fried, of course.

Btw, Richard Foote had a few interesting articles about the topic of
separating data and index tablespaces on his blog. With reasonably
sized databases thinking of index tablespaces as redundant information
which can _easily_ be restored might buy you a ton of downtime (the
rebuild likely is sufficiently slower than the restore).

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Nov 24, 2009 4:55 am