达梦数据库使用和常见问题
一、SQL语法
1. 表空间
"""
语法注释:
create tablespace 表空间名 datafile 数据文件存储路径 size 数据文件初始大小 autoextend on maxsize 数据文件大小最大限制
"""
create tablespace 表空间名 datafile '/home/dmdba/dmdbms/data/表空间名.dbf' size 1024;
select 表空间名 from dba_tablespaces;
select 表空间名 from user_tablespaces;
drop tablespace 表空间名;
2. 用户
"""
语法注释:
create user 用户名 identified by 密码 limit 密码策略 default tablespace 表空间名;
grant 权限类型 to 用户名;
"""
create user "TEST" identified by "TEST" limit failed_login_attemps 3, password_lock_time 1, password_grace_time 10 default tablespace 表空间名;
grant "RESOURCE", "PUBLIC" to "TEST";
drop user "TEST" cascade;
3. 模式
create schema 模式名 authorization 用户名;
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32