南大通用GBASE移植过程中的注意事项和文档。以下内容只是应用于GBase 8s v8.7, 其他版本如GBase 8a并不适用。感谢来自原厂工程师的支持。
https://demo.doublechaintech.com/admin/retailscmgbase/
onmode -ky && oninit -v
- text 不支持用sql插入, 内容不多可以用varchar(320000)代替
- bool就是boolean,值是 'T'=true, 'F'= false
- 用database 来切换, 比如 database erpdatabase
- 约束的名字在最后面
- select * from user limit 10, 10 可以工作,但是该种模式下,位置不能通过PreparedStatement参数来设置,不要用于编程环境
- select skip 2 first 2 * from user 也可以工作,改模式可以通过PreparedStatement参数来设置,推荐在程序中使用
- Oracle那种模式也能工作,还没有测试过
- 导入文件 dbaccess - import.sql
在文件profile.gbaseserver中设置
export GL_DATE=%Y-%m-%d
- 连接字符串jdbc:gbasedbt-sqli://47.99.97.125:9088/gbasedb:gbasedbtserver=gbaseserver;db_locale=zh_cn.utf8;client_locale=zh_cn.utf8;NEWCODESET=utf-8,utf8,57372;
- 驱动类名称 com.gbasedbt.jdbc.IfxDriver
- 试用GB18030的连接字符串db_locale=zh_cn.gb18030-2000;client_locale=zh_cn.gb18030-2000;NEWCODESET=gb18030,gb18030-2000,5488;
- 用户名,安装该软件的用户名
- 密码,安装该软件的密码
先以原来身份进入
unset DB_LOCALE CLIENT_LOCALE
解决方案,要在../profile.gbaseserver 设置
export CLIENT_LOCALE=zh_cn.utf8
export DB_LOCALE=zh_cn.utf8
export SERVER_LOCALE=zh_cn.utf8
执行source ../profile.gbaseserver后,重新导入
通过 执行查询,如果出现类似下面结果相应的数据库dbs_collate=zh_CN.57372则认为正确
> database his;
Database selected.
> select * from sysmaster:sysdbslocale;
dbs_dbsname sysmaster
dbs_collate en_US.819
dbs_dbsname sysutils
dbs_collate en_US.819
dbs_dbsname sysuser
dbs_collate en_US.819
dbs_dbsname sysadmin
dbs_collate en_US.819
dbs_dbsname residentialquarter
dbs_collate zh_CN.57372
dbs_dbsname retailscm
dbs_collate zh_CN.57372
dbs_dbsname his
dbs_collate zh_CN.57372
7 row(s) retrieved.
- 这样不能工作 select date(update_time) ,count(*) as count from expense_type_data group by date(update_time) ;
- 这样可以工作 select date(update_time) as date_key, count(*) as count from expense_type_data group by date_key ;
Your evaluation license will expire on 2020-05-07 00:00:00
shared memory not initialized for GBASEDBTSERVER 'gbaseserver'
Your evaluation license will expire on 2020-05-07 00:00:00
Reading configuration file '/home/gbasedbt/gbase/etc/onconfig.gbaseserver'...succeeded
Creating /GBASEDBTTMP/.infxdirs...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 255114 kbytes...succeeded
Creating infos file "/home/gbasedbt/gbase/etc/.infos.gbaseserver"...succeeded
Linking conf file "/home/gbasedbt/gbase/etc/.conf.gbaseserver"...succeeded
Initializing rhead structure...rhlock_t 262144 (8192K)... rlock_t (239062K)... Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 32 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5