oracle 创建用户需知

建议放入plsql中查看,可以直观的查看关键字

 /*1.创建表空间*/
create tablespace pro_test logging datafile 'D:\oracleXE\oradata\pro_test\pro_test.dbf'
size 32m autoextend on next 32m maxsize 2048m  extent management local;
/*2.创建用户*/
create user pro identified by pro default tablespace pro_test; -- 如果密码是数字,请用双引号括起来
/*3.授以权限*/
grant create session to pro; --是否允许登陆
grant create table,create view,create trigger,create sequence,create procedure to pro; --分配创建表,视图,触发器,序列,过程 权限
grant debug connect session to pro; --给用户debug权限
GRANT debug any procedure to pro;--给用户debug权限
grant create any table,create any procedure to pro;--不知道 why ?? debug存储过程一定要这样付权限
/*4.设置表空间*/
alter user pro default tablespace pro_test; -- 设置 user's tablespace
grant unlimited tablespace to pro ; -- 无配额 限制,(配额:限额是指定标空间中允许的空间容量)
revoke unlimited tablespace  from pro;




/*=================附1:角色===================*/
/*1.建角色*/
create role pro_role;
/*2.授以权限*/
grant create procedure to pro_role;
/*3.把角色付给用户*/
grant pro_role to pro;
/*=================附2:综合===================*/
select * from role_sys_privs; --获取角色所包含权限
create role role_test identified by password_test; -- 在生效带有口令的角色时必须提供口令
/*修改角色:是否需要口令*/
alter role role1 not identified;
alter role role1 identified by password1;



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值