ITPub博客

首页 > 数据库 > Oracle > 初学手工建库遇到的问题记录

初学手工建库遇到的问题记录

原创 Oracle 作者:dblock 时间:2015-04-01 22:48:10 0 删除 编辑
首次按步骤手工建库碰到以下问题: 
1、ORA-00845: MEMORY_TARGET not supported on this system
来自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 的大小:

# df-h | grepshm
tmpfs                 2.0G     0  2.0G   0% /dev/shm

加大:

# vi /etc/fstab
# cat /etc/fstab | grep tmpfs
tmpfs                   /dev/shm                tmpfs   defaults,size=4G 0 0
现在可以通过重启使这个配置生效,也可以通过重新挂载来修改其大小:
# mount -o remount,size=4G /dev/shm
[root@FWDB ~]# df -h | grep shm
tmpfs                 4.0G     0  4.0G   0% /dev/shm   
再次启动数据库,就不报这个错(此处摘抄)。


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操作


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


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

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2015-04-01

  • 博文量
    5
  • 访问量
    28722