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;
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值