admin管理员组

文章数量:1654038

错误信息:
ORA-01157: cannot identify/lock data file 12 - see DBWR trace file
ORA-01110: data file 12: '/d01/oramtest/proddata/undo01.dbf'

问题诊断:undo表空间损坏

解决办法:
--查看系统使用的undo表空间
show parameter undo;
NAME                     TYPE                   VALUE
------------------------------------ --------------------------------- ------------------------------
undo_management              string                   AUTO
undo_retention                 integer                   10800
undo_tablespace              string                   UNDOTBS2

--创建pfile文件
create pfile='/home/oracle/initorcl.ora' from spfile;

--修改pfile文件
#*.undo_management='AUTO'
*.undo_retention=10800
#*.undo_tablespace='UNDOTBS2'
undo_management='MANUAL'
undo_tablespace='SYSTEM'

--启动数据库到mount状态
shutdown immediate;
startup mount pfile='/home/oracle/initorcl.ora';

--打开数据库
alter database open;

--使undo表空间脱机
alter tablespace UNDOTBS2 offline;

--删除undo表空间
drop tablespace UNDOTBS2 including contents and datafiles;

--创建新的undo表空间
create undo tablespace undotbs1 datafile '/oracledb/datafile/app_tfzq_iea01.dbf' size 10m autoextend on maxsize unlimited;

--shutdown数据库,并改回pfile的参数设置
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS2'
#undo_management='MANUAL'
#undo_tablespace='SYSTEM'

--用改回后的pfile启动数据库,并创建spfile
startup pfile='/home/oracle/initorcl.ora';
create spfile from pfile='/home/oracle/initorcl.ora';

--再次重新启动数据库
shutdown immediate;
startup;

本文标签: identifyLockORADatadbwr