[架构]201223-国产达梦数据库DM8
2021-10-28 15:36:24 22 举报
AI智能生成
国产达梦数据库初始化说明
作者其他创作
大纲/内容
服务器配置
服务器地址: 192.168.100.100
端口:22
用户名:root
密码:******
端口:22
用户名:root
密码:******
登录数据库
1. cd /opt/dmdbms/bin
2. 执行./disql SYSDBA/SYSDBA@localhost
2. 执行./disql SYSDBA/SYSDBA@localhost
测试脚本:
select * from test;
select * from test;
默认帐号密码: SYSDBA
默认端口:5236
默认端口:5236
数据导入
dminit
dmfldr
./dmfldr
userid=SYSDBA/SYSDBA@localhost:5236
control=\'/opt/data/test.ctl\'
null_mode=true
userid=SYSDBA/SYSDBA@localhost:5236
control=\'/opt/data/test.ctl\'
null_mode=true
disql
./disql
SYSDBA/SYSDBA
`D:\test.sql
SYSDBA/SYSDBA
`D:\test.sql
GB18030
注意事项
引号,单引号,双引号
开发对接
JDBC
config
jdbcDriver: dm.jdbc.driver.DmDriver
url: jdbc:dm://localhost:5236
userName: SYSDBA
password: SYSDBA
url: jdbc:dm://localhost:5236
userName: SYSDBA
password: SYSDBA
jar
\dmdbms\jdbc\
DmJdbcDriver16 .jar - JDK16
DmJdbcDriver17 .jar - JDK17
DmJdbcDriver18 .jar - JDK18
创建数据库
#
CREATE TABLESPACE TS_DATA DATAFILE 'TS_DATA01.DBF' SIZE 2048;
ALTER TABLESPACE TS__DATA ADD DATAFILE 'TS_DATA02.DBF' size 2048;
#
CREATE TABLESPACE TS_IDX DATAFILE 'TS_IDX01.DBF' SIZE 1024;
ALTER TABLESPACE TS_IDX ADD DATAFILE 'TS_IDX02.DBF' SIZE 1024;
# CREATE USER TEST_USER IDENTIFIED BY TEST_PASSWORD DISKSPACE LIMIT 50;
CREATE USER TESTDB IDENTIFIED BY "TESTDB" DISKSPACE UNLIMITED DEFAULT TABLESPACE TS_DATA DEFAULT INDEX TABLESPACE TS_IDX;
#
GRANT RESOURCE TO TESTDB;
CREATE TABLESPACE TS_DATA DATAFILE 'TS_DATA01.DBF' SIZE 2048;
ALTER TABLESPACE TS__DATA ADD DATAFILE 'TS_DATA02.DBF' size 2048;
#
CREATE TABLESPACE TS_IDX DATAFILE 'TS_IDX01.DBF' SIZE 1024;
ALTER TABLESPACE TS_IDX ADD DATAFILE 'TS_IDX02.DBF' SIZE 1024;
# CREATE USER TEST_USER IDENTIFIED BY TEST_PASSWORD DISKSPACE LIMIT 50;
CREATE USER TESTDB IDENTIFIED BY "TESTDB" DISKSPACE UNLIMITED DEFAULT TABLESPACE TS_DATA DEFAULT INDEX TABLESPACE TS_IDX;
#
GRANT RESOURCE TO TESTDB;
数据迁移
DTS (Tool)
0 条评论
下一页