一:oracle文件权限问题
错误表现:在执行ArcSDE命令操作时,不管是sdesetup或是sdemon报如下错误:
[arcsde@RedHat ~]$ sdemon -o start -p sde
-------------------------------------------------------
ArcSDE 9.3.1 for Oracle10g Build 1632 Thu Feb 26 12:05:37 2009
-------------------------------------------------------
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-x86_64 Error: 13: Permission denied
Could not start ArcSDE -- Check Network, $SDEHOME disk, DBMS settings and dbinit.sde.
解决方法:在Oracle安装完毕之后,在Oracle操作系统用户下,在$ORACLE_HOME/bin文件夹里面有一个文件oracle的权限非常重要,该权限不能进行任意的修改,默认的oracle文件是6751,或者-rwsr-s--x,有些用户喜欢将所有文件修改为最高权限777或者755,觉得这样修改肯定没有权限问题。所以说,在找不到问题解决方法,不妨看看这个文件的权限是否被修改?
[arcsde@RedHat ~]$ su - oracle
Password:
[oracle@RedHat ~]$ cd $ORACLE_HOME/bin
[oracle@RedHat bin]$ ll oracle
-rwxrwxrwx 1 oracle oinstall 112468376 Sep 5 2011 oracle
[oracle@RedHat bin]$ chmod 6751 oracle
[oracle@RedHat bin]$ ll oracle
-rwsr-s--x 1 oracle oinstall 112468376 Sep 5 2011 oracle
[oracle@RedHat bin]$ su - arcsde
Password:
[arcsde@RedHat ~]$ sdemon -o start -p sde
-------------------------------------------------------
ArcSDE 9.3.1 for Oracle10g Build 1632 Thu Feb 26 12:05:37 2009
-------------------------------------------------------
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): 2026
ArcSDE Instance esri_sde started Sat Jan 5 10:31:14 2013
二:环境变量问题
问题表现:
[arcsde@RedHat bin]$ sdemon -o start -p sde
sdemon: error while loading shared libraries: libsde.so: cannot open shared object file: No such file or directory
根据上面可以看出,缺少libsde.so文件,我们可以使用ldd命令来查看是否还缺少其他文件
[arcsde@RedHat bin]$ ldd sdemon
libsde.so => not found
libsg.so => not found
libpe.so => not found
libXm.so.3 => /usr/lib64/libXm.so.3 (0x00002b6d57d3c000)
libXmu.so.6 => /usr/lib64/libXmu.so.6 (0x0000003241e00000)
libXp.so.6 => /usr/lib64/libXp.so.6 (0x000000351ce00000)
libXt.so.6 => /usr/lib64/libXt.so.6 (0x0000003253800000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x000000324a200000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x000000324ae00000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x0000003244600000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003243200000)
libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x00002b6d581de000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6d58400000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003241a00000)
libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x00002b6d5861b000)
libm.so.6 => /lib64/libm.so.6 (0x0000003241600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003241200000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000324ec00000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003243a00000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x0000003243600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003240e00000)
但是这些文件是刚安装的,而且也可以查看到有这些文件
[arcsde@RedHat ~]$ find /home/arcsde -name 'libsde.so'
/home/arcsde/sdeexe93/lib/libsde.so
这时候,我们就可以看看是否是环境变量的问题
1:环境变量写错了(少分号,半角全角问题)
2:环境变量是否生效
生效环境变量
a:切换操作系统用户
b: . ./.bash_profile(点空格点斜杠点bash_profile)
可以使用echo来查看
[arcsde@RedHat ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/arcsde/bin:/home/oracle/app/product/10.2.0.4/db_1/bin:/home/arcsde/sdeexe93/bin:/usr/bin:/bin:/usr/local/bin
3:环境变量引用位置问题
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_HOME=/home/oracle/app/product/10.2.0.4/db_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin:$SDEHOME/bin:/usr/bin:/bin:/usr/local/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$SDEHOME/lib:$PATH/bin:/usr/bin:/bin:/usr/local/bin
export SDEHOME=/home/arcsde/sdeexe93
如上面就是新手比较常见的错误,在PATH引用$SDEHOME的时候已经无法找到相关路径,因为$SDEHOME应该写在PATH前面,如下:
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_HOME=/home/oracle/app/product/10.2.0.4/db_1
export ORACLE_SID=orcl
export SDEHOME=/home/arcsde/sdeexe93
export PATH=$PATH:$ORACLE_HOME/bin:$SDEHOME/bin:/usr/bin:/bin:/usr/local/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$SDEHOME/lib:$PATH/bin:/usr/bin:/bin:/usr/local/bin
三:数据库sde用户权限问题
在ArcSDE创建Schema或者升级Schema时,都需要相关的权限,如果这些权限不够,会出现如下问题:
[arcsde@RedHat ~]$ sdesetup -o install -d oracle10g -p sde
ESRI ArcSDE Server Setup Utility Sat Jan 5 11:25:08 2013
----------------------------------------------------------------
Install or update ArcSDE, GDB schema objects:
Are you sure? (Y/N): y
Creating ArcSde schema.....
Error: Underlying DBMS error (-51).
Error: SDE release install not completed.
Check SDEHOME\etc\sde_setup.log for more details.
[Sat Jan 5 11:08:38 2013] ERROR installing/upgrading ArcSDE, Error = -25
[Sat Jan 5 11:12:52 2013] Error: Invalid DBA password (-93).
[Sat Jan 5 11:12:52 2013] Error: Unable to connect
[Sat Jan 5 11:12:52 2013] ERROR installing/upgrading ArcSDE, Error = -93
[Sat Jan 5 11:22:29 2013] DB_open_instance()::db_connect (OCI8) error: 1045
[Sat Jan 5 11:22:29 2013] Error: Underlying DBMS error (-51).
[Sat Jan 5 11:22:29 2013] Error: Unable to connect
[Sat Jan 5 11:22:29 2013] ORA-01045: user SDE lacks CREATE SESSION privilege; logon d
enied
[Sat Jan 5 11:22:29 2013] ERROR installing/upgrading ArcSDE, Error = -51
一般情况下,权限问题根据错误都比较容易处理,我们需要赋予相关的权限即可,相关安装或者升级的权限如下
grant CREATE SESSION to sde;
grant CREATE TABLE to sde;
grant CREATE PROCEDURE to sde;
grant CREATE SEQUENCE to sde;
grant CREATE TRIGGER to sde;
grant CREATE TYPE to sde;
grant CREATE LIBRARY to sde;
grant CREATE PUBLIC SYNONYM to sde;
grant CREATE OPERATOR to sde;
grant CREATE INDEXTYPE to sde;
grant DROP PUBLIC SYNONYM to sde;
grant UNLIMITED TABLESPACE to sde;
grant CREATE VIEW to sde;
prompt * SELECT ANY TABLE is required for compressing the database
prompt * This privilege needs to be granted whenever a compress is run.
grant SELECT ANY TABLE to sde;
prompt * ADMINISTER DATABASE TRIGGER can be revoked after install
grant ADMINISTER DATABASE TRIGGER to sde;
prompt * * * * * * * * * * *
prompt * ArcSDE UPGRADE *
prompt * * * * * * * * * * *
prompt * If upgrading please remove rem from each grant.
prompt * Granting the required privileges to the sde user.
REM grant ADMINISTER DATABASE TRIGGER to sde;
REM grant SELECT ANY TABLE to sde;
REM grant SELECT ANY SEQUENCE to sde;
REM grant EXECUTE ANY PROCEDURE to sde;
REM grant ANALYZE ANY to sde;
REM grant ALTER ANY INDEX to sde;
REM grant ALTER ANY TABLE to sde;
REM grant CREATE ANY SEQUENCE to sde;
REM grant CREATE ANY TRIGGER to sde;
REM grant CREATE ANY INDEX to sde;
REM grant CREATE ANY PROCEDURE to sde;
REM grant DROP ANY INDEX to sde;
REM grant DROP ANY SEQUENCE to sde;
REM grant DROP ANY TABLE to sde;
REM grant DROP ANY VIEW to sde;
REM grant DROP ANY PROCEDURE to sde;
四:执行操作提示:Error: libclntsh.so.10.1(libclntsh.so.11.1): cannot open shared object file: No such file or directory
上面的区别就是如果使用oracle10g和11g出错的区别,在执行sdesetup提示
[arcsde@RedHat ~]$ sdesetup -o install -d oracle10g -p sde
ESRI ArcSDE Server Setup Utility Sat Jan 5 11:40:59 2013
----------------------------------------------------------------
Install or update ArcSDE, GDB schema objects:
Are you sure? (Y/N): y
Creating ArcSde schema.....
Error: libclntsh.so.10.1: cannot open shared object file: No such file or directory
Error: Server library could not be loaded (-324).
Error: SDE release install not completed.
Check SDEHOME\etc\sde_setup.log for more details.
libclntsh.so.10.1位于oracle的安装目录中,arcsde没有读取权限造成的,需将/home/oracle/app/oracle目录的读取权限开放给oinstall组(arcsde隶属该组)。
解决方法
[root@RedHat lib]# pwd
/home/oracle/app/product/10.2.0.4/db_1/lib
[root@RedHat lib]# ll libclntsh.so.10.1
-rwx--x--x 1 oracle arcsde 21188381 Sep 5 2011 libclntsh.so.10.1
[root@RedHat lib]# chown oracle:oinstall libclntsh.so.10.1
[root@RedHat lib]# ll libclntsh.so.10.1
-rwx--x--x 1 oracle oinstall 21188381 Sep 5 2011 libclntsh.so.10.1
[root@RedHat lib]# chmod 755 libclntsh.so.10.1
[root@RedHat lib]#
[arcsde@RedHat ~]$ sdesetup -o install -d oracle10g -p sde
ESRI ArcSDE Server Setup Utility Sat Jan 5 11:47:43 2013
----------------------------------------------------------------
Install or update ArcSDE, GDB schema objects:
Are you sure? (Y/N): y
Creating ArcSde schema.....
Successfully created ArcSde schema.
Installing locators.....
Successfully installed locators.
Creating geodatabase schema.....
Successfully created GDB schema.
Successfully installed ArcSDE components.
Refer SDEHOME\etc\sde_setup.log for more details.
五:缺包
表现形式,执行sdesetup报如下错误
"error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory"
解决方法:操作系统缺少openmotif22包
六:启动服务报典型的oracle错误
//启动ArcSDE服务时
-------------------------------------------------------
ArcSDE 10.0 for Oracle11g Build 685 Fri May 14 12:05:43 2010
-------------------------------------------------------
DB_open_instance()::db_connect (OCI8) error: 28002
init_DB DB_instance_open_as_dba: -51
DBMS error code: 28002
ORA-28002: the password will expire within 7 days
==========================================================
-------------------------------------------------------
ArcSDE 10.0 for Oracle11g Build 685 Fri May 14 12:05:43 2010
-------------------------------------------------------
init_DB DB_instance_open_as_dba: -93
DBMS error code: 1017
ORA-01017: invalid username/password; logon denied
==========================================================
-------------------------------------------------------
ArcSDE 9.3 for Oracle10g Build 546 Thu Sep 18 12:35:50 2008
-------------------------------------------------------
DB_open_instance()::db_connect (OCI8) error: 12560
init_DB DB_instance_open_as_dba: -51
DBMS error code: 12560
ORA-12560: TNS: 协议适配器错误
上面的错误,都是典型的oracle错误,这些错误根据相关描述可以进行解决。
七:执行sdesetup报:Error: Exceeded system's maximum number of mutexes (-109).
ESRI ArcSDE Server Setup Utility Wed Dec 29 15:48:59 2010
----------------------------------------------------------------
Creating ArcSde schema.....
Error: Exceeded system's maximum number of mutexes (-109).
Error: SDE release install not completed.
Check SDEHOME\etc\sde_setup.log for more details.
If giomgr is up and running, shutdown and try again.
这个是因为该环境以及有一个ArcSDE服务进行工作,在对创建另外一个ArcSDE实例的时候提示用户需要关闭已经启动的ArcSDE服务
八:执行sdesetup报:0509-022 Cannot load module SDEHOME/lib/libsdeora11gsrvr93_64.so
[sde@wlzx12 bin]$ ./sdesetup -o install -d ORACLE10G -p sde
Error 0509-130 Symbol resolution failed for SDEHOME/lib/libsdeora11gsrvr93_64.so because:
0509-136 Symbol ras_arg_t (number 294) is not exported from dependent module /ORACLEHOME/lib/libclntsh.so
0509-022 Cannot load module SDEHOME/lib/libsdeora11gsrvr93_64.so
0509--26 System error:Cannot run a file that does not have a valid format
0509-192 Examine .loader section symbols with the 'dump -Tv' command
Error:Server library could not be loaded (-324)
Error:SDE release install not completed
Check SDEHOME\etc\sde_setup.log for more details
这种情况是在AIX机器环境下,oracle11gR2的64Bit,安装ArcSDE9.3.1,如果直接执行sdesetup报上名错误,这需要用户在ArcSDE9.3.1的基础上打上SP2补丁。
九:执行Sdesetup报:Error : bad login user
//ArcSDE9.3.1在Linux 64Bit 创建/升级Schema时出错
[sde@wlzx12 bin]$ ./sdesetup -o install -d ORACLE10G -p sde Error : bad login user
Error:SDE release install not completed
Check SDEHOME\etc\sde_setup.log for more details
这种情况下主要是在Linux的64Bit环境下出现的,需要在环境变量上添加LAGN=en_US
问题解决——基础阶段
1:ArcSDE软件完全安装
2:RDBMS服务、连接
3:SDE用户必须赋予权限
4:RDBMS SDE用户创建Schema
5:ArcSDE目录存在(环境变量指定位置)
6:正确的ORACLE_SID(dbinit.sde)
7:SDE服务名和端口号(SDE和系统存在、一致)
8:Public权限(dbms_pipe、dbms_lock)
问题解决——中级阶段
1:查看SDE日志文件确定原因
2:检查Oracle警报文件(alert files)分析原因
3:Windows系统如果SDE服务启动问题,尝试先删除后创建
4:利用命令代替界面向导
ArcSDE错误信息
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ArcSDE_error_messages/00050000000s000000/
http://edndoc.esri.com/arcsde/9.2/api/capi/returncodes_incl.htm
问题解决——高级阶段
拨打Esri中国售后电话让专业的工程师解决
问题解决——终级解决
电脑格式化,重新安装
-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
-------------------------------------------------------------------------------------------------------