“ORA-30012"故障

创建数据库时一直出现问题,多次检查和修改脚本都没用,最后google了很多案例,找到了答案。
SQL> @D:\oraclexe\app\oracle\admin\ora10g\create\createdb.sql
create database ora10g
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced           --ORACLE 实例终止。强制断开连接

查看ALERT日志:

ORA-00604: error occurred at recursive SQL level 1
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Offending statement at line 5 in file ?/rdbms/admin/dtxnspc.bsq
CREATE UNDO TABLESPACE UNDOTBS DATAFILE    '/oradata/useradl/undotbs01.dbf'
            SIZE 3000M AUTOEXTEND ON MAXSIZE 10240M
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '?/rdbms/admin/dtxnspc.bsq' near line 5
ORA-00604: error occurred at recursive SQL level 1
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type

 
解决办法:

[oracle@dg1 bdump]$  oerr ORA 30012
"undo tablespace '%s' does not exist or of wrong type"
Cause:   the specified undo tablespace does not exist or of the

//           wrong type.
// *Action:  Correct the tablespace name and reissue the statement.


察看目前参数文件的状态:
SQL> show parameter undo;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO

undo_retention                       integer     900

undo_tablespace                      string      undotbs1

因为在建立数据库的脚本中

这行undo tablespace UND001表空间名和pfile文件中undo_tablespace='undotbs1'表空间名不一致。

 

解决办法:

将建立数据库的脚本的表空间名修改成UNDOTBS1,重新执行脚本,问题解决。

附:

参数文件内容:

background_dump_dest='D:\oraclexe\app\oracle/admin/ora10g/bdump'
compatible='10.2.0.1.0'
control_files='D:\oraclexe\oradata\ORA10G\control01.ctl','D:\oraclexe\oradata\ORA10G\control02.ctl'
core_dump_dest='D:\oraclexe\app\oracle/admin/ora10g/cdump'
db_block_size=8192
db_name='ora10g'
db_recovery_file_dest='D:\oraclexe\app\oracle/flash_recovery_area'
db_recovery_file_dest_size=2147483648
pga_aggregate_target=41943040
processes=150
remote_login_passwordfile='EXCLUSIVE'
sga_max_size=167772160
sga_target=125829120
undo_management='AUTO'
undo_tablespace='undotbs1'
user_dump_dest='D:\oraclexe\app\oracle/admin/ora10g/udump'
db_create_file_dest='D:\oraclexe\oradata\'
db_create_online_log_dest_1='D:\oraclexe\oradata\'

原建库脚本内容:

create database ora10g
user sys identified by oracle
user system identified by oracle
default temporary tablespace temp
undo tablespace UND001
character set utf8
national character set al16utf16;

修改后的建库脚本内容:

create database ora10g
user sys identified by oracle
user system identified by oracle
default temporary tablespace temp
undo tablespace undotbs1
character set utf8
national character set al16utf16;
 
注:红字标出的地方建库脚本中的undo表空间名要与参数文件中的undo表空间名一致。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14184018/viewspace-690428/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14184018/viewspace-690428/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值