KingBase常用操作

2022-04-01 00:00:00 专区 订阅 备份 付费 企业版

Kingbase常用操作

KingbaseES在linux下的安装

[root@localhost ~]# ls
anaconda-ks.cfg install.log.syslog
Desktop kdb-7.1.2.0363-release-Linux-x86_64-installer-build0032.zip
install.log license_ee_7.1.2_企业版180L64.dat
[root@localhost kingbase]# unzip kdb-7.1.2.0363-release-Linux-x86_64-installer-build0032.zip
[root@localhost kingbase]# su - kingbase
[kingbase@localhost ~]$ cd /home/kingbase/
[kingbase@localhost ~]$ ls
kdb-7.1.2.0363-release-Linux-x86_64-installer-build0032.zip setup
license_ee_7.1.2_企业版180L64.dat setup.sh
[kingbase@localhost ~]$ mkdir /home/kingbase/kingbaseES
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host
[root@localhost ~]# xclock 出现小时中则正常
[kingbase@localhost ~]$ ./setup.sh
Now launch installer...
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...


dmp路径:

cd /home/kingbase/Kingbase/ES/V8
chown -R kingbase.kingbase /home/kingbase/Kingbase/ES/V8/

su-kingbase还原:

sys_restore  -USYSTEM -W123456 -d wendy test.dmp

备份:

sys_dump -USYSTEM -W123456 -Fc -f /home/kingbase/Kingbase/ES/V8/1.dmp wendy

备份单表:

cd /opt/Kingbase/ES/V8/SERVER/BIN
./sys_dump -USYSTEM -W123456 -h 192.168.12.75 -Fc -f person.dmp -t "ZGB_DEV"."person" -a wendy

恢复单表:

sys_restore  -USYSTEM -W123456 -d wendy test.dmp

修改char默认类型

-bash-4.2$ cat kingbase.conf |grep char
char_default_type = 'char'
-bash-4.2$ ./sys_ctl reload -D /opt/Kingbase/ES/V8/data/

修改自动刷新

vi kingbase.conf
autovacuum = on
-bash-4.2$ ./sys_ctl reload -D /opt/Kingbase/ES/V8/data/

刷新解析器:
ANALYZE zgb_dev.person;

ps:

select * from sys_stat_activity;

docker cp xxxx:/heap.bin /


END

来自:https://mp.weixin.qq.com/s/38dnyWbWRRDc8HiDQ8qhcw

相关文章