oracle手工建库卡住,初学手工建库遇到的问题记录

Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.

即 MEMORY_MAX_TARGET 的设置不能超过 /dev/shm 的大小:

加大:

# vi /etc/fstab

现在可以通过重启使这个配置生效,也可以通过重新挂载来修改其大小:

2、SQL> startup nomount

ORA-09925: Unable to create audit trail file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 9925

SQL> quit

SQL> sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 1 21:13:17 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-09925: Unable to create audit trail file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 9925

ORA-01075: you are currently logged on

Enter user-name:

这下sys用户登录也报这个错

查看参数文件 initENMOEDU1.ora

发现audit_file_dest='/u01/app/oracle/admin/orcl/adump'

在创建参数文件时,审计文件路径居然是默认的,没有改为之前创建好的路径,并且默认路径并没有创建好

解决办法:

mkdir -p /u01/app/oracle/admin/orcl/adump    -- 创建之前错误的没有创建好的路径

[oracle@rhel6 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 1 21:39:16 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

此时超级用户正常登录

修改参数文件initENMOEDU1.ora

将审计文件路径按规律改写为 audit_file_dest='/u01/app/oracle/admin/ENMOEDU1/adump'

重新创建二进制参数文件报错

SQL> create spfile from pfile;

create spfile from pfile

*

ERROR at line 1:

ORA-32002: cannot create SPFILE already being used by the instance

解决:SQL> shu immediate

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> create spfile from pfile;

File created.SQL> startup nomount

ORACLE instance started.

Total System Global Area 1068937216 bytes

Fixed Size            2220200 bytes

Variable Size          616566616 bytes

Database Buffers      444596224 bytes

Redo Buffers            5554176 bytes

3、

SQL> alter database mount

2  ;

alter database mount

*

ERROR at line 1:

ORA-00205: error in identifying control file, check alert log for more info

nomount状态成功,mount报错,找不到控制文件

原因:未创建database,即未执行create database 语句

SQL> @/home/oracle/Desktop/oracle/create_db/create_db

Database created.

SQL> alter database mount;

alter database mount

*

ERROR at line 1:

ORA-01100: database already mounted

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01531: a database already open by the instance

意思是在执行完创建数据库语句之后自动完成mount和open操作

之后按步骤创建数据库顺利完成。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值