环境:
OS: Redhat 4.0 AS
DBMS:oracle10.2.0.4.0
ArcSDE9.3 for oracle 10g
启动错误提示如下:
在sde用户下:
------------------------------------------------------- ArcSDE 9.3 for
Oracle10g Build 508 Thu Apr 17 12:23:18 2008 -------------------------------------------------------
DB_open_instance()::db_connect (OCI8) error:
1034 init_DB DB_instance_open_as_dba: -51
DBMS error code: 1034 ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment Linux Error: 13: Permission denied
Could not start ArcSDE -- Check Network, $SDEHOME disk, DBMS settings and dbinit.sde.
使用sqlplus连接,出现如下错误,和启动sde服务错误一致
[sde@test1 ~]$ sqlplus sde/sde
SQL
*Plus: Release 10.2.0.4.0 - Production on
Mon Jan 18 17:27:41 2010
Copyright (c) 1982, 2007, Oracle. All
Rights Reserved.
ERROR:
ORA-01034: ORACLE not
available
ORA-27123: unable to
attach to
shared memory segment
Linux Error: 13: Permission denied
查看oracle的共享内存:
[sde@test1 ~]$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0xccc7f63c 360449 oracle 640 1260388352 19
共享内存已经开辟出来,然后切换到oracle用户下:
[oracle@test1 ~]$ sqlplus sys as
sysdba
SQL
*Plus: Release 10.2.0.4.0 - Production on
Mon Jan 18 17:21:46 2010
Copyright (c) 1982, 2007, Oracle. All
Rights Reserved.
Enter password:
Connected to
:
Oracle Database
10g Enterprise Edition Release 10.2.0.4.0 - Production
With
the Partitioning, OLAP, Data
Mining and
Real
Application Testing options
SQL
> select
open_mode from
v$database
;
OPEN_MODE
----------
READ
WRITE
数据库的处于打开状态,现在基本上确定了是sde用户没有权限访问oracle的共享内存,问题应该出现在启动oracle实例的文件上,该文件为$ORACLE_HOME/bin/oracle,查看该文件的权限
1:
[oracle@test1 ~]$ cd $ORACLE_HOME/bin
2:
[oracle@test1 bin]$ ls -l oracle
3:
-rwxrwxrwx 1 oracle oinstall 96789104 11-25 12:47 oracle
4:
[oracle@test1 bin]$
文件的权限为777,缺少s权限,把s权限赋给oracle文件
chmod a+s oracle
重启oracle实例:
[oracle@test1 bin]$ sqlplus sys as
sysdba
SQL
*Plus: Release 10.2.0.4.0 - Production on
Mon Jan 18 17:25:07 2010
Copyright (c) 1982, 2007, Oracle. All
Rights Reserved.
Enter password:
Connected to
:
Oracle Database
10g Enterprise Edition Release 10.2.0.4.0 - Production
With
the Partitioning, OLAP, Data
Mining and
Real
Application Testing options
SQL
> shutdown
immediate
;
Database
closed.
Database
dismounted.
ORACLE instance shut down.
SQL
> startup
ORACLE instance started.
Total System Global
Area 1258291200 bytes
Fixed Size
1267236 bytes
Variable
Size
318769628 bytes
Database
Buffers 922746880 bytes
Redo Buffers 15507456 bytes
Database
mounted.
Database
opened.
SQL
>
再次启动sde服务,成功
[sde@test1 ~]$ sdemon -o start
-p sde
-------------------------------------------------------
ArcSDE 9.3 for
Oracle10g Build 508 Thu Apr 17 12:23:18 2008
-------------------------------------------------------
ST_Geometry Schema
Owner: (SDE) Type Release: 1007
Instance initialized for
((sde)) . . .
Connected to
instance . . .
DBMS Connection
established...
RDBMS: "Oracle"
Instance Name: "esri_sde"
IOMGR Process ID (PID): 19128
ArcSDE Instance esri_sde started Mon Jan 18 17:26:04 2010
[sde@test1 ~]$