oracle 11G undo表空间错误

简介:

1.打开数据库时提示undo表空间不存在

SQL> alter database open;                  
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-30012: undo tablespace 'UNDOTBS01' does not exist or of wrong type

Process ID: 3236
Session ID: 1 Serial number: 5


解决方法:

[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 24 10:22:24 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.

Total System Global Area  776646656 bytes
Fixed Size            2217384 bytes
Variable Size          557845080 bytes
Database Buffers      213909504 bytes
Redo Buffers            2674688 bytes
Database mounted.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/home/oracle/app/oradata/orcl/system01.dbf
/home/oracle/app/oradata/orcl/sysaux01.dbf
/home/oracle/app/oradata/orcl/undotbs01.dbf            --undo表空间的数据文件
/home/oracle/app/oradata/orcl/users01.dbf
/home/oracle/app/oradata/orcl/tong.dbf

SQL> show parameter undo
NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
undo_management              string     AUTO
undo_retention                 integer     900
undo_tablespace              string     UNDOTBS1      --undo表空间的名字
SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1    --undo表空间的名字
USERS
TEMP
TONG1
6 rows selected.
SQL>


思路:根据启动oracle的错误可以看出,错误信息的undo表空间的名字与数据库里面的名字不一至,此时要在init.orcl.ora文件中修改undo_tablespace的值,用pfile文件启动数据库.


[oracle@oracle ~]$ cd $ORACLE_HOME/dbs
[oracle@oracle dbs]$ vim initorcl.ora 
*.undo_tablespace='UNDOTBS1'              --修改这行的值

[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 24 10:26:06 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile='/home/oracle/app/product/11.2.0/dbhome_1/dbs/initorcl.ora'
ORACLE instance started.

Total System Global Area  776646656 bytes
Fixed Size            2217384 bytes
Variable Size          557845080 bytes
Database Buffers      213909504 bytes
Redo Buffers            2674688 bytes
Database mounted.
SQL> alter database open;

Database altered.
SQL> create spfile='/home/oracle/app/product/11.2.0/dbhome_1/dbs/spfileorcl.ora' from pfile;

File created.                  --pfile文件创建spfile文件
SQL> shutdown immediate           --重启数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  776646656 bytes
Fixed Size            2217384 bytes
Variable Size          557845080 bytes
Database Buffers      213909504 bytes
Redo Buffers            2674688 bytes
Database mounted.
Database opened.
SQL> 










本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/1841831,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
存储 Oracle NoSQL
Oracle 表空间、数据文件、schema的关系
Oracle 表空间、数据文件、schema的关系
32 2
|
4月前
|
Oracle 关系型数据库 数据库
使用docker安装配置oracle 11g
使用docker安装配置oracle 11g
|
1月前
|
Oracle 关系型数据库 数据库
Oracle系列之五:Oracle表空间
Oracle系列之五:Oracle表空间
|
1月前
|
存储 Oracle 关系型数据库
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
|
4月前
|
SQL Oracle 关系型数据库
Oracle查看表空间 及表空间是否需要扩展
Oracle查看表空间 及表空间是否需要扩展
26 0
|
4月前
|
SQL Oracle 关系型数据库
docker 方式安装ORACLE 11g
docker 方式安装ORACLE 11g
193 4
|
5月前
|
Oracle 关系型数据库 数据库
在Flink CDC中,使用Oracle 11g数据库的NUMBER类型作为主键
在Flink CDC中,使用Oracle 11g数据库的NUMBER类型作为主键
46 1
|
5月前
|
SQL Oracle 安全
window下Oracle 11G安装文档
window下Oracle 11G安装文档
|
SQL Oracle 关系型数据库
|
Oracle 关系型数据库 索引