Oracle给予用户权限与查看当前用户所有的表(持续更新中)

PS:如果你用的是图形化界面,只需要随便打开一个sql窗口直接把代码写进去运行即可,看情况吧,权限够用就可以(学习使用).

说明:普通用户是无法创建其他用户并且给予权限的,需要sys用户进行下一步操作:

#创建普通用户
create user 用户名 identified by 密码;
create user Ryan identified by root;

#授予用户登录数据库的权限
grant create session to 用户名;
grant create session to Ryan;

#授予用户操作表空间的权限:
grant 权限 tablespace to 用户名;
grant unlimited tablespace to Ryan;
grant create tablespace to Ryan;
grant alter tablespace to Ryan;
grant drop tablespace to Ryan;
grant manage tablespace to Ryan;

#授予用户操作表的权限:
grant create table to 用户名;
grant create table to Ryan;

#授予用户操作视图的权限:
grant create view to 用户名;
grant create view to Ryan;

#授予用户操作触发器的权限:
grant create trigger to 用户名;
grant create trigger to Ryan;

#授予用户操作存储过程的权限:
grant create procedure to 用户名;
grant create procedure to Ryan;

#授予序列操作储存过程的权限
grant create sequence to 用户名;
grant create sequence to Ryan;

#授予用户调试权限
grant debug connect session to 用户名
grant debug connect session to study;

查看当前用户所有的表:

select * from user_tables;
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章