Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> problems with lost datafile...
I presume you would want a script to rebuild all your indexes, so as
system in sqlplus, or whatever :
set lines 350
set pages 0
set trimspool on
spool rebuild.sql
select 'alter index '||owner||'.'||index_name||' rebuild;'
from dba_indexes
where owner in (list of owners affected);
spool off
@rebuild.sql
That should do it, I'm assuming you have got your tablespace back ok and it is able to be used.
have fun.
Regards,
Norman.
Norman Dunbar EMail: Norman.Dunbar_at_LFS.co.uk Database/Unix administrator Phone: 0113 289 6265 Fax: 0113 289 3146 Lynx Financial Systems Ltd. URL: http://www.Lynx-FS.com
------------------------------------------------------------------------
-----Original Message-----
From: Edvinas_at_takas.lt (Edvinas) [mailto:Edvinas_at_takas.lt]
Posted At: Wednesday, January 23, 2002 9:55 AM
Posted To: server
Conversation: problems with lost datafile...
Subject: problems with lost datafile...
hi all,
i have very interesnisg problem.
One oracle database file was lost,
it was a datafile of indexes tablespace.
i wantes to startup database, so i droped it:
alter database datafile 'xxx' ofline drop;
then: alter database open;
all is ok. database online... but of course indexes are not good. i
tried to drop tablespace, but i could not.
i tried to: alter database create datafile 'xxx';
it creates the file, but what next ?
what i must do, to rebuild all these bad indexes in new datafile ?
i have not any ARC.
Received on Wed Jan 23 2002 - 04:22:09 CST
![]() |
![]() |