当前位置:网站首页>GBase 8c 创建用户/角色 示例二
GBase 8c 创建用户/角色 示例二
2022-07-03 02:18:00 【大壮十二】
6、创建复制账号:repl
gbase=# CREATE USER repl REPLICATION LOGIN ENCRYPTED PASSWORD 'repl';
CREATE ROLE
7、其他说明
GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
[, ...] | ALL [ PRIVILEGES ] }
ON { [ TABLE ] table_name [, ...]
| ALL TABLES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
##单表授权:授权zjy账号可以访问schema为zjy的zjy表grant select,insert,update,delete on zjy.zjy to zjy;
##所有表授权:grant select,insert,update,delete on all tables in schema zjy to zjy;
GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( column_name [, ...] )
[, ...] | ALL [ PRIVILEGES ] ( column_name [, ...] ) }
ON [ TABLE ] table_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##列授权,授权指定列(zjy schema下的zjy表的name列)的更新权限给zjy用户grant update (name) on zjy.zjy to zjy;
##指定列授不同权限,zjy schema下的zjy表,查看更新name、age字段,插入name字段grant select (name,age),update (name,age),insert(name) on zjy.xxx to zjy;
GRANT { { USAGE | SELECT | UPDATE }
[, ...] | ALL [ PRIVILEGES ] }
ON { SEQUENCE sequence_name [, ...]
| ALL SEQUENCES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
##序列(自增键)属性授权,指定zjy schema下的seq_id_seq 给zjy用户grant select,update on sequence zjy.seq_id_seq to zjy;
##序列(自增键)属性授权,给用户zjy授权zjy schema下的所有序列grant select,update on all sequences in schema zjy to zjy;
GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [, ...] | ALL [ PRIVILEGES ] }
ON DATABASE database_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##连接数据库权限,授权cc用户连接数据库zjygrant connect on database zjy to cc;
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON DOMAIN domain_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN DATA WRAPPER fdw_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN SERVER server_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
ON { { FUNCTION | PROCEDURE | ROUTINE } routine_name [ ( [ [ argmode ] [ arg_name ] arg_type [, ...] ] ) ] [, ...]
| ALL { FUNCTIONS | PROCEDURES | ROUTINES } IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON LANGUAGE lang_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }
ON LARGE OBJECT loid [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { CREATE | USAGE } [, ...] | ALL [ PRIVILEGES ] }
ON SCHEMA schema_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##连接schema权限,授权cc访问zjy schema权限grant usage on schema zjy to cc;
GRANT { CREATE | ALL [ PRIVILEGES ] }
ON TABLESPACE tablespace_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON TYPE type_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
where role_specification can be:
[ GROUP ] role_name
| PUBLIC
| CURRENT_USER
| SESSION_USER
GRANT role_name [, ...] TO role_name [, ...] [ WITH ADMIN OPTION ]
##把zjy用户的权限授予用户cc。
grant zjy to cc;
边栏推荐
- Kotlin middle process understanding and Practice (II)
- String replace space
- [fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)
- CFdiv2-Fixed Point Guessing-(區間答案二分)
- How to deal with cache hot key in redis
- [Yu Yue education] China Ocean University job search OMG reference
- 苏世民:25条工作和生活原则
- Cancellation of collaboration in kotlin, side effects of cancellation and overtime tasks
- Awk from introduction to earth (0) overview of awk
- Thread safe singleton mode
猜你喜欢

8 free, HD, copyright free video material download websites are recommended

Visual yolov5 format data set (labelme JSON file)
![[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)](/img/fe/c053f8d116eb307733177283a26318.png)
[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)
![[fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)](/img/ac/bf83f319ea787c5abd7ac3fabc9ede.jpg)
[fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)

全链路数字化转型下,零售企业如何打开第二增长曲线

Depth (penetration) selector:: v-deep/deep/ and > > >

Comment communiquer avec Huawei Cloud IOT via le Protocole mqtt

elastic stack

微信小程序开发工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理问题

Tongda OA homepage portal workbench
随机推荐
Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
浏览器是如何对页面进行渲染的呢?
4. 类和对象
Button button adaptive size of wechat applet
苏世民:25条工作和生活原则
Missing library while loading shared libraries: libisl so. 15: cannot open shared object file: No such file
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
Storage basic operation
require.context
Cfdiv2 fixed point guessing- (interval answer two points)
微服务组件Sentinel (Hystrix)详细分析
awk从入门到入土(0)awk概述
Use go language to realize try{}catch{}finally
Ni visa fails after LabVIEW installs the third-party visa software
How do browsers render pages?
Tongda OA V12 process center
How to find summer technical internship in junior year? Are you looking for a large company or a small company for technical internship?
Redis: simple use of redis
Leetcode 183 Customers who never order (2022.07.02)
通达OA 首页门户工作台