问题一 当我安装成功10g时却无法正常启动,报错内容如下:
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 16 18:26:37 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-27125: unable to create shared memory segment(无法创建共享内存段)
Linux-x86_64 Error: 1: Operation not permitted (操作不被允许)
解决办法(查阅相关技术文档后得知此问题的出现是因为,已启动oracle 但是无法创建共享的内存段。简单来说的话是当我们创建oracle的组时,dba-GID大于oinstall-GID导致当我们想要已dba用户启动系统时,dba用户进程并无法优先享受内存空间,以至于以下问题,我们解决思路是现将dba用户GID放进优先执行的进程组队列中顺利启动数据库)
[oracle@oracle ~]$ exit
logout
[root@oracle ~]# id oracle
uid=501(oracle) gid=501(oinstall) 组=501(oinstall),502(dba),503(oper)
[root@oracle ~]# more /proc/sys/vm/hugetlb_shm_group
0
[root@oracle ~]# echo 502 > /proc/sys/vm/hugetlb_shm_group
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 16 18:32:56 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2020128 bytes
Variable Size 83889376 bytes
Database Buffers 184549376 bytes
Redo Buffers 6365184 bytes
Database mounted.
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 16 18:26:37 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-27125: unable to create shared memory segment(无法创建共享内存段)
Linux-x86_64 Error: 1: Operation not permitted (操作不被允许)
解决办法(查阅相关技术文档后得知此问题的出现是因为,已启动oracle 但是无法创建共享的内存段。简单来说的话是当我们创建oracle的组时,dba-GID大于oinstall-GID导致当我们想要已dba用户启动系统时,dba用户进程并无法优先享受内存空间,以至于以下问题,我们解决思路是现将dba用户GID放进优先执行的进程组队列中顺利启动数据库)
[oracle@oracle ~]$ exit
logout
[root@oracle ~]# id oracle
uid=501(oracle) gid=501(oinstall) 组=501(oinstall),502(dba),503(oper)
[root@oracle ~]# more /proc/sys/vm/hugetlb_shm_group
0
[root@oracle ~]# echo 502 > /proc/sys/vm/hugetlb_shm_group
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 16 18:32:56 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2020128 bytes
Variable Size 83889376 bytes
Database Buffers 184549376 bytes
Redo Buffers 6365184 bytes
Database mounted.
Database opened.
问题二:
以管理员身份连接数据库:
[oracle@oracle ~]$ sqlplus / as sysdba
SQL> alter user scott account unlock identified by tiger; 给scott用户解锁
ERROR at line 1:
ORA-01034:ORACLE not available (用户不存在)
SQL>
问题解决: 目前来说这个问题的前提是上面情况起不来库时 ,我以为是锁住了的做法,所以解决办法和上面一样,先检查下是否是进程优先级的问题!!!
[root@oracle ~]# id oracle
uid=501(oracle) gid=501(oinstall) 组=501(oinstall),502(dba),503(oper)
[root@oracle ~]# more /proc/sys/vm/hugetlb_shm_group
0
[root@oracle ~]# echo 502 > /proc/sys/vm/hugetlb_shm_group