吴裕雄--天生自然ORACLE数据库学习笔记:用户管理与权限分配
create user mr identified by mrsoft
default tablespace users
temporary tablespace temp;
create user east identified by mrsoft
default tablespace users
temporary tablespace temp
quota 10m on tbsp_1;
create user df identified by mrsoft
default tablespace tbsp_1
temporary tablespace temp
quota unlimited on tbsp_1;
connect system/1qaz2wsx;
grant connect,resource to east;
connect east/123456;
--创建用户dongfang
create user dongfang identified by mrsoft
default tablespace users
quota 10m on users;
--创建用户xifang
create user xifang identified by mrsoft
default tablespace users
quota 10m on users;
--授权
grant create session,create table to dongfang with admin option;
connect dongfang/mrsoft;
grant create session,create table to xifang;
--连接到xifang
connect xifang/mrsoft;
create table tb_xifang
( id number,
name varchar2(20)
);
connect system/1qaz2wsx;
revoke resource from east;
grant select,insert,delete,update on scott.emp to xifang;
connect system/1qaz2wsx;
revoke delete,update on scott.emp from xifang;
connect system/1qaz2wsx;
create role designer identified by 123456;
create profile lock_account limit
failed_login_attempts 5
password_lock_time 7; alter user dongfang profile lock_account;
create profile password_lift_time limit
password_life_time 30
password_grace_time 3;
alter user dongfang profile password_lift_time;
show parameter resource_limit;
alter system set resource_limit=true;
alter profile password_lift_time limit
cpu_per_session 20000
sessions_per_user 10
cpu_per_call 500
password_life_time 180
failed_login_attempts 10;
--创建用户
create user hello identified by mrsoft
default tablespace users
temporary tablespace temp;
--授权
grant connect,create table to hello;
--创建角色
create role mr identified by 123456; --授权
grant connect,create table to mr;
吴裕雄--天生自然ORACLE数据库学习笔记:用户管理与权限分配的更多相关文章
- 吴裕雄--天生自然ORACLE数据库学习笔记:管理表空间和数据文件
col tablespace_name for a10 col file_name for a50 col bytes ,, select tablespace_name,file_name,byte ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle数据备份与恢复
run{ allocate channel ch_1 device type disk format = 'd:\oraclebf\%u_%c.bak'; backup tablespace syst ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:过程、函数、触发器和包
create procedure pro_insertDept is begin ,'市场拓展部','JILIN'); --插入数据记录 commit; --提交数据 dbms_output.put_ ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:PL/SQL编程
set serveroutput on declare a ; b ; c number; begin c:=(a+b)/(a-b); dbms_output.put_line(c); excepti ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle 11g的闪回技术
alter system set db_recovery_file_dest_size=4g scope=both; connect system/1qaz2wsx as sysdba; archiv ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:数据导出与导入
create directory dump_dir as 'd:\dump'; grant read,write on directory dump_dir to scott; --在cmd下 exp ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:优化SQL语句
create or replace procedure trun_table(table_deleted in varchar2) as --创建一个存储过程,传入一个表示表名称的参数,实现清空指定的 ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle系统调优
--修改 alter system set large_pool_size=64m; --显示 show parameter large_pool_size; select sum(getmisses ...
- 吴裕雄--天生自然ORACLE数据库学习笔记:表分区与索引分区
create table ware_retail_part --创建一个描述商品零售的数据表 ( id integer primary key,--销售编号 retail_date date,--销售 ...
随机推荐
- 转载:initcall
转自:http://blog.chinaunix.net/uid-29570002-id-4387097.html Linux系统启动过程很复杂,因为它既需要支持模块静态加载机制也要支持动态加载机制. ...
- STA之AOCV
为什么要引入AOCV 为了精确性,为了剔除悲观度.用set_timing_derate来设置OCV,对于一个固定的corner,只能对data/clock, cell/net, late/early分 ...
- php 基础 二维数组以某个重复值累加
$arr = array( array('id' => 123, 'name' => '张三', 'amount'=>'1'), array('id' => 123, 'nam ...
- Django+Celery+redis kombu.exceptions.EncodeError:Object of type is not JSON serializable报错
在本文中例子中遇到问题的各种开发版本如下: Python3.6.8 Django==2.2 celery==4.4.0 kombu==4.6.7 redis==3.3.0 大概的报错如下截图: 是在开 ...
- Python2中的列表推导式存在变量泄漏问题,在Python3中不存在
列表推导式(list comprehension) Python2: >>> x = 'my homie' >>> dummy = [x for x in 'ABC ...
- Spring-boot JDBC with multiple DataSources sample
Spring-Boot's auto-configurer seems good for simple applications. For example it automatically creat ...
- Yii2框架 常用函数整合
1.使用事务添加数据: public function create() { if($this->validate()) { $trans = Yii::$app->db->begi ...
- thinkphp 3.2链接Oracle数据库,查询数据
ennnn,换工作了,开始用新的东西了,最近就是调用nc接口,数据库是Oracle,首先先把数据查出来,这个比较简单. 在网上看的其他的方法都是改数据库配置文件,然后需要修改tp核心的一个类文件,比较 ...
- 安装pyhanlp
安装pyhanlp pyhanlp是java写的,外层封装了python. 对于新手,在使用的时候稍有难度. 1. 下载源码 https://github.com/hankcs/pyhanlp git ...
- Codeforces Round #618 E
题意: 给你一个n的数组,你可以进行无数次,选择区间使得区间内的值相加,然后区间的所有的值变成平均值. 使得最后数组的字典序最小 思路: 最后的数组一定是单调递增的,只要它比之前的平均值数大,就不会操 ...