oracle--新建表空间&&创建新用户&授权

1.创建表空间
create tablespace 表空间名
datafile '文件路径'
size 100m
autoextend on
next 10m;
2.创建用户
create user 用户名
identified by 密码
default tablespace 表空间名;
3.用户授权
grant dba to 用户名;

DBA角色:DBA是Oracle中一个强大的预定义角色,包含几乎所有系统权限,允许用户执行几乎所有数据库管理任务。

4.自定义角色
create role 角色名;
grant create table,create view to 角色名;
grant 角色名 to 用户名;

查看当前用户的角色:select * from user_role_privs

posted @ 2025-08-13 14:49  Yu-potato  阅读(10)  评论(0)    收藏  举报