更新SDE的license的简便方法

   很多同事和客户在使用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'"

PostgreSQL:

update sde.sde_server_config set char_prop_value = 'arcsdeserver,100,ecp6411231313,none,1234567843223343252342424243' where prop_name='AUTH_KEY';


  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值