使用 geoscene pro 在人大金仓下创建企业库
- 在人大金仓 KingbaseESV8 (PG)下创建企业库
- 安装对应版本的补丁包:V008R006C007B0024PS008 ,非常重要,否则无法创建成功
- 拷贝GeoScene下的 st_geometry.so 到人大金仓的安装目录下
- KingbaseESV8对应的PG版本是12,所以需要12的so文件;
- 参考下面的说明,将so文件拷贝到对应的目录;
- 在GeoScene Pro中中创建企业库
- 一个KingbaseESV8下,sde角色只能创建一次,即第一次是创建企业库,后面其他的库则使用启用企业库;
- 若第一次创建时失败,则可改用手动创建sde角色,参考: https://www.jianshu.com/p/dfab1bde7d93 ;
- 若手动创建sde角色,则创建完成后使用启用企业库来创建;
- GeoScene Pro中启用企业库的方式
- 创建KingbaseESV8的连接:
- 数据库平台: Postgresql、
- 实例: Ip,端口 如 127.0.0.1,1234
- 用户名: sde
- 密码: sde的密码,如sde
- 数据库: 要启用企业库的数据库名称,如 test
- 右键点击连接,选择启用企业库;
- 选择sde的许可文件 ecp 文件(官方说的好像只能用ecp文件);
- 运行等待完成即可;
- 创建KingbaseESV8的连接:
- 手动创建sde角色
#在kingbase中使用ksql新建一个gisdata
ksql -U system -dtest -p54321
#创建空间数据库
create database gisdata;
#登录新创建的gisdata数据库实例
ksql -U system -d gisdata -p 54321
#创建sde用户和schema
create user sde superuser;
create schema sde;
alter schema sde owner to sde;
alter user sde password '********';
create user rds_superuser superuser;
#启用空间数据库插件
create extension postgis;
#修改pg_proc表的一个参数
alter system set allow_system_table_dml=on;
update pg_proc set proisstrict=false where proname ilike '%addgeo%' and proargtypes = '1043 1043 1043 1043 23 1043 23 16';
alter system set allow_system_table_dml=off;
select oid,proname,proargtypes,proisstrict from pg_proc where proname ilike '%addgeo%';
- st_geometry文件拷贝的目录
Be sure you copy the correct st_geometry library for the version of PostgreSQL and operating system you will be using. For example, for PostgreSQL 10 on Windows, please use the 10\Windows64\st_geometry.dll.
The location of the lib directory on Linux can vary depending on how you installed PostgreSQL. To determine the correct location for your PostgreSQL installation, execute pg_config as the postgres user. The value that is returned for PKGLIBDIR is the lib directory where you need to place the st_geometry library. Log in as the root user to copy the file to the lib location.
If PostgreSQL is installed on a Windows server, place the st_geometry.dll file in the %PostgreSQL%\lib directory.
If you have PostgreSQL installed on a Windows server, you must have the Microsoft Visual C++ 2017 Redistributable Package (x64) installed on the server. If it is not present on the PostgreSQL server, download it from the Microsoft site and install it.
浙公网安备 33010602011771号