采用arcgis平台做GIS应用的人,可能偶尔碰到sde用户锁定(Arccatalog 或应用程序异常退出的时比较多)的问题,往往咱们解决的办法是重启sde服务。如果一个服务器上有多个连接时,重启服务会影响别人。下面小罗介绍另外二种办法:
方法一:
1, 用sde用户身份登录到Oracle(如:PLSQL developer之类的东东),找到sde用户下面的process_information 表;
2, 然后执行查询select t.sde_id,t.owner from process_information t , sde_id 是sde的进程ID, owner 是连接的oracle用户
3, 从owner中找到你要解除锁定的用户以及所对应的sde_id ;
4, 进入ArcSDE安装的服务器(如:192.9.100.185),进入cmd ,执行sdemon如下:(下面这些就是sdemon常用操作,感兴趣的同事可以自己去摸索,当然也可以直接执行第5步,第4步主要是防止出错)
C:/Documents and Settings/Administrator>sdemon
ESRI ArcSDE System Monitor Utility Thu Mar 05 16:15:26 2009
----------------------------------------------------------------------
sdemon -o status {[-i <service>] [-s <server_name>] | [-H <sde_direc [-q]
sdemon -o start {[-i <service>] [-s <server_name>] | [-H <sde_direc [-p <DB_Admin_password>]
sdemon -o shutdown {[-i <service>] [-s <server_name>] | [-H <sde_direc [-p <DB_Admin_password>] [-N]
sdemon -o pause {[-i <service>] [-s <server_name>] | [-H <sde_direc [-p <DB_Admin_password>]
sdemon -o resume {[-i <service>] [-s <server_name>] | [-H <sde_direc [-p <DB_Admin_password>]
sdemon -o info -I {users | config | stats | locks | vars | insta] {[-i <service>] [-s <server_name>] | [-H <sde_direc
sdemon -o kill -t {all | <pid>} [-p DB_Admin_password>] [-N] {[-i <service>] [-s <server_name>] | [-H <sde_direc
5, 然后执行 sdemon -o kill -t 5459 这里的5459 是上面从process_information表中查询出来的sde_id,然后要你输入sde的密码,完了之后确认ok,如下所示:
Please enter ArcSDE DBA password:
ArcSDE Instance esri_sde Process Management on testserver185 at Thu Ma:42 2009
-------------------------------------------------------Kill Server Task 5459? ARE YOU SURE (Y/N)?: y
6, 搞定收工;
方法二:直接在Arcsde空间服务器上面,运行
sdemon -o info -I users -i esri_sde (sde服务名),如下所示:
C:/>sdemon -o info -I users -i esri_sde
ArcSDE Instance esri_sde Registered Server Tasks on hzgt-dbcenter at Sun Dec 13
17:39:46 2009
-------------------------------------------------------------------------
S-ID User Host:OS Started
----- -------- -------------------------------- ------------------------
635 SJZX hzgt-appsrv:Win32 Sun Dec 13 17:36:24 2009
625 CJ_SGYX hzgt-appsrv:Win32:XDR Sun Dec 13 16:14:13 2009
626 SJZX hzgt-appsrv:Win32 Sun Dec 13 16:14:15 2009
633 SJZX hzgt-appsrv:Win32 Sun Dec 13 17:31:26 2009
636 SJZX hzgt-appsrv:Win32 Sun Dec 13 17:37:06 2009
622 CJ_SGYX hzgt-appsrv:Win32:XDR Sun Dec 13 13:45:50 2009
然后kill掉某个连接进程:
C:/>sdemon -o kill -t 622
Please enter ArcSDE DBA password:
ArcSDE Instance esri_sde Process Management on hzgt-dbcenter at Sun Dec 13 17:41
:55 2009
-------------------------------------------------------------------------
Kill Server Task 622? ARE YOU SURE (Y/N)?:y
原文:http://blog.csdn.net/luowangjun/article/details/4596849
来源:https://www.cnblogs.com/wenwu/p/3198197.html