ORACLE学习第三天

1、创建oracle用户:create user test identified by test;

使用select * from dba_users可以查询到所有的用户

2、创建用户时指定表空间:create user test identified by test default tablespace test temporary tablespace temp;

3、查看数据库的默认表空间: select * from database_properties

其中:

     DEFAULT_PERMANENT_TABLESPACE                             USER                                 Name of default permanent tablespace

     DEFAULT_TEMP_TABLESPACE                                       TEMP                                 Name of default temporary tablespace

4、修改默认表空间:

     alter database dafault tablespace test;

5、使用户口令过期:alter   user test password expire;

6、锁定用户:alter user test account lock;

7、解锁:alter user test account unlock;

8、查看数据库状态:select status from v$instance

9、给用户分配表空间限额:alter user test  quota 10m on test(表空间名称) 50m on users;

 或者在摸个表空间上不限制配额:alter useer test quota unlimited on test(表空间名称);

10、配额相关视图:select * from dba_ts_quota

11、oracle的五种基本权限:connect 、resource 、imp_full_database 、exp_full_database和dba

12、特殊授权unlimited tablespace 只能授权给用户不能授权给角色

13、查看用户具有哪些角色:select * from dba_role_privs

       修改用户的角色时需要重新登录后才会生效

14、查看用户具有哪些系统权限:select * from dba_sys_privs

15、查看登录用户的权限:select * from session_privs

16、授予用户权限:grant  create session to test;

17、授予用户可以继续向下授权的权限:grant  create session to test with admin option;

18、回收用户权限:revoke create session from test;

19、

转载于:https://www.cnblogs.com/cangos/archive/2012/02/20/2360232.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值