吴裕雄--天生自然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,--销售 ...
随机推荐
- zabbix-agent不能启动:配置文件出现特殊字符导致
问题如下: 定位查找问题: 命令:journalctl -xe [重点] 图中可见错误信息在zabbix_agent配置文件中的“hostname=”中不能出现特殊字符,我出错的原因是写成了:hos ...
- html input file 设置文件类型
解决方案: 使用 input 的 accept 属性指定接受文件类型 -----------更新--------------- 之前的代码有个缺点,打开文件窗口时会自动筛选文件夹下所有符合设定类型的文 ...
- javaScript中的querySelector和querySelectorAll
querySelector和querySelectorAll是W3C提供的 新的查询接口,其主要特点如下: 1.querySelector只返回匹配的第一个元素,如果没有匹配项,返回null. 2.q ...
- bootstrap fileinput上传文件
参考博客:https://blog.csdn.net/linhaiyun_ytdx/article/details/76215974 https://www.cnblogs.com/parker-y ...
- libcurl库的简介(二)
下面是使用libcurl库实现文件上传的一个实例: void CDataProcess::sendFileToServer(void) { string netIp = strNetUrl + &qu ...
- reStructuredText语法
reStructuredText 除了makedown语法这还存在另一种语法reStructuredText 相对Markdown来说,在写书方面更有优势: 使用sphnix能够自动生成目录和索引文件 ...
- ScheduledThreadPoolExecutor与Timer
首先来看一下Timer类 例子如下: package cn.concurrent.executor; import java.util.Timer; import java.util.TimerTas ...
- super this 关键字
super 关键字的三种用法: 1.在子类成员方法中,访问父类成员变量 2.在子类成员方法中,访问父类成员方法 3.在子类构造方法中,访问父类构造方法 this 关键字的三种用法: 1.在本类的成员方 ...
- Yii2.0 引入外部js css
<script src="<?= Yii::$app->request->baseUrl . '/js/jquery-2.1.1.min.js'?>" ...
- JSON.parse()处理json字符串时需要处理的特殊字符
var str= "json字符串"; str=str.replace(/\\/g,"\\\\"); str=str.replace(/\n/g,"\ ...