一种更新SDE的license的简便方法

0
分享 2015-12-05
很多同事和客户在使用SDE的工具(向导或者命令)都碰到这个或者那个问题,其中大部分的问题都是环境设置有问题,为了减少这种出错的机会,给大家提供一种更简洁的使用数据库工具更新SDE license的办法 。在此之前先介绍一下SDE更新license的原理。

更新原理:
1. SDE的license信息实际上存储在SDE的server_config(根据数据库的不同表名可能有所不同,如SQLSerer的表名为sde_server_config)表中一行中,可以通过
C:/Documents andSettings/liufeng>sqlplus sde/sde
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Dec13 10:10:06 2010
Copyright (c) 1982, 2007, Oracle. AllRights Reserved.
Connected to:Oracle Database10g Enterprise Edition Release 10.2.0.4.0 - Production 10:
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select char_prop_value from server_config where prop_name='AUTH_KEY';
CHAR_PROP_VALUE
--------------------------------------------------------------------------------
arcsdeserver,100,ecp6411231313,none,1234567843223343252342424243


红色部分为license(当然了,这个例子中的license我是修改过的了,大家不用下载,因为是无法使用的 )信息。
2. 使用向导或者sdesetup –o upgrade命令实际上后台执行的就是一个insert into server_config或者update server_config的sql语句。
更新办法:
从esri公司所提供的ecp文件中找到以arcsdeserver打头的一行,并将其拷贝下来
Oracle:
第一次安装,可以使用:

C:/Documents and Settings/liufeng>sqlplus sde/sde
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Dec 13 10:29:58 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
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> insert into server_config values ('AUTH_KEY','
arcsdeserver,100,ecp6411231313,none,1234567843223343252342424243',NULL);
commit;
DB2:

[sde@testserver ~]$ db2 connect to sde
Database Connection Information
Database
server = DB2/LINUX 9.5.0
SQL authorization
ID = SDE
Local database alias = SDE
[sde@testserver ~]$ db2 "inert into server_config values('AUTH_KEY','licenseinfo',null)'


如果lincese过期了,可以使用下面的sql更新
oracle:
SQL> update server_config set char_prop_value=
'arcsdeserver,100,ecp6411231313,none,1234567843223343252342424243'
where prop_name='AUTH_KEY';
commit;


DB2:
db2 "update server_config set char_prop_value='license info' where char_prop_value='AUTH_KEY'"

文章来源:http://blog.csdn.net/liufeng1980423/article/details/6074523

0 个评论

要回复文章请先登录注册