需求:

1.字符集不是UTF-8,请修改字符集或创建实例时设置CHARSET=1  

2.需设置大小写不敏感或创建实例时设置CASE_SENSITIVE=n  

3.LENGTH_IN_CHAR需设置成1或创建实例时设置LENGTH_IN_CHAR=1  

4.MVCC_RETRY_TIMES不能小于50,将dm.ini里面的MVCC_RETRY_TIMES修改为大于50后重启实例  

5.创建新用户和表空间






操作:


删除实例

/home/dmdba/dmdbms/script/root/dm_service_uninstaller.sh -n DmServicedmdb

删除数据库目录

cd /data/dmdata/dmdb

rm -rf ./*

初始化数据库

/home/dmdba/dmdbms/bin/dminit db_name=dmdb path=/data/dmdata page_size=32 extent_size=16 CASE_SENSITIVE=n charset=1 LENGTH_IN_CHAR=1  

注册服务

/home/dmdba/dmdbms/script/root/dm_service_installer.sh   -t  dmserver  -p   dmdb  -dm_ini  /data/dmdata/dmdb/dmdb/dm.ini

dm.ini里面的MVCC_RETRY_TIMES修改为大于50

启停服务

systemctl start DmServicedmdb.service

systemctl stop DmServicedmdb.service

创建用户

/home/dmdba/dmdbms/bin/disql sysdba/SYSDBA

SQL > create user wpsdb  identified by "wpsdb2022";

SQL > grant  DBA to wpsdb;

grant CREATE SCHEMA to wpsdb;

grant CREATE TABLE to wpsdb;

grant CREATE VIEW to wpsdb;

grant CREATE PROCEDURE to wpsdb;

grant CREATE SEQUENCE to wpsdb;

grant CREATE TRIGGER to wpsdb;

grant CREATE INDEX to wpsdb;

grant CREATE CONTEXT INDEX to wpsdb;

grant BACKUP DATABASE to wpsdb;

grant CREATE LINK to wpsdb;

grant CREATE REPLICATE to wpsdb;

grant CREATE PACKAGE to wpsdb;

grant ALTER REPLICATE to wpsdb;

grant DROP REPLICATE to wpsdb;

grant DROP ROLE to wpsdb;

grant INSERT ANY TABLE to wpsdb;

grant UPDATE ANY TABLE to wpsdb;

grant SELECT ANY TABLE to wpsdb;

grant SELECT ANY VIEW to wpsdb;

grant EXECUTE ANY PROCEDURE to wpsdb;

grant SELECT ANY SEQUENCE to wpsdb;

grant EXECUTE ANY PACKAGE to wpsdb;

grant ADMIN REPLAY to wpsdb;

grant ADMIN BUFFER to wpsdb;

grant CREATE TABLESPACE to wpsdb;

grant ALTER TABLESPACE to wpsdb;

grant DROP TABLESPACE to wpsdb;

grant CREATE MATERIALIZED VIEW to wpsdb;

grant SELECT ANY MATERIALIZED VIEW to wpsdb;