recreation undo tablespace
Bonjour,
Je souhaiter changer de tablespace undo car le fichier undotbs01.dbf a été effacé par mégarde.
Je voudrai faire
Citation:
create a new undo tablespace
shutdown normal
change the init.ora file to change the undo_tablespace entry to the new
tablespace.
startup
drop the old undo tablespace.
Mais je ne peux pas créer de nouveau tablespace car la base ne peut pas s'ouvrir!
Code:
1 2 3 4 5 6
| SQL> CREATE UNDO TABLESPACE "UNDOTS2" DATAFILE
2 '/u01/app/oracle/oradata/orcl/undotbs01.dbf' SIZE 512M REUSE ;
CREATE UNDO TABLESPACE "UNDOTS2" DATAFILE
*
ERROR at line 1:
ORA-01109: database not open |
Comment faire?
création d'un nouveau tablespace undo
Ce n'est pas nécessaire d'arrêter la base pour créer un nouveau undo tablespace. il suffit de le créer et puis changer le paramètre undo_tablespace grâce à l'instruction "alter system".
Néanmoins l'ancien undo tablespace doit tester suffisamment de temps pour que les transactions qui l'utilisent se terminent.
Le message donné montre que la base n'est pas ouverte or il n'est pas possible de créer un tablespace si la base n'est pas ouverte.
Ajouté par la suite:
Je viens de voir la première ligne sur la supptession du fichier du tablespace undo.
Sans le fichier la base ne pourra pas s'ouvrir.
une première tentative à essayer :
startup mount
alter database datafile 'nom_du fihcier' offline drop;
alter database open;
create undo tablespaoe ...
alter system set undo_tablespace = new_undo_tablesapce
drop undo tablespace old_undo_tablespace ...