ORA-01157

Error: ORA-01157: cannot identify/lock data file string - see DBWR trace file

Causa: The background process was either unable to find one of the data files or failed to lock it because the file was already in use. The database will prohibit access to this file but other files will be unaffected. However, the first instance to open the database will need to access all online data files. The accompanying error from the operating system describes why the file could not be identified.

Acción: At the operating system level, make the file available to the database. Then either open the database or do an ALTER SYSTEM CHECK DATAFILES.

COMENTARIOS:

por Anónimo | 20/08/2007 12:56:47

RE: ORA-01157

Hola,
En mi caso concreto este error me dio al intentar cambiar de ubicacion todos los archivos de una base de datos a otro directorio. Los datafiles temporales simplemente fueron copiados a la nueva ubicación pero no se indicó este cambia a la base de datos.
Me di cuenta al consultar la tabla dba_temp_files en la cual obtuve el siguiente error:
The following error has occurred:
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/database/temp01.dbf'
Como se observa el fichero afectado es un temporal
Para solucionar este error lo que he hecho es crearme en la base de datos un nuevo tablespace temporal ( con la sentencia create temporary tablespace) y asignar este tablespace temporal como tablespace por defecto a todos. ( alter database defaultt temporary tablespace nombre_tablespace).
Posteriormente he borrado los tablespaces temporales que actualmente no reconoce la base de datos ( drop tablespace temp01.dbf) y luego los he vuelto a crear tal cual los tenía.
He vuelto a dejar por defecto el tablespace creado y he borrado el que me creé nuevo para hacer estos cambios.