吴裕雄--天生自然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,--销售 ...
随机推荐
- Go_type
1. type的定义和使用 Go语言支持函数式编程,可以使用高阶编程语法.一个函数可以作为另一个函数的参数,也可以作为另一个函数的返回值,那么在定义这个高阶函数的时候,如果函数的类型比较复杂,我们可以 ...
- 每天进步一点点------FPGA 静态时序分析模型——reg2reg
2. 应用背景 静态时序分析简称STA,它是一种穷尽的分析方法,它按照同步电路设计的要求,根据电路网表的拓扑结构,计算并检查电路中每一个DFF(触发器)的建立和保持时间以及其他基于路径的时延要求是否满 ...
- LOJ#6713. 「EC Final 2019」狄利克雷 k 次根 加强版
题目描述 定义两个函数 \(f, g: \{1, 2, \dots, n\} \rightarrow \mathbb Z\) 的狄利克雷卷积 \(f * g\) 为: \[ (f * g)(n) = ...
- JavaScript 推箱子游戏
推箱子游戏的 逻辑非常简单,但是如果不动手的话,还是不太清楚.我在这里讲一下自己的思路. 制作推箱子,首先要有自己的设计素材.如下我也是网上找的素材 第二步,理清游戏的规则. 游戏规则: 1.小人将箱 ...
- ScheduledThreadPoolExecutor与Timer
首先来看一下Timer类 例子如下: package cn.concurrent.executor; import java.util.Timer; import java.util.TimerTas ...
- ubuntu mysql新增用户并开启远程连接
1.首先用root用户登录mysql mysql -u root -p 输入密码后登录成功 2.新建用户 use mysql; select host,user from user;(查看现有用户) ...
- vs2013编译soui并创建一个项目
1.soui.10.sln改为soui.13.sln 2.用nodepad++打开soui.13.sln,作如下修改 注:第一行我是改为13.00,编译后似乎自己变为12.00了 编译结果: 注:这是 ...
- PHP 站内消息的表结构设计
1)添加全站通知:信息存入到 tb_message 2)用户点开信息或者设置信息为已阅读:插入记录到 tb_message_readlog 如何设计存储的表?求最佳方案 CREATE TABLE `m ...
- Node.js 服务端处理图片
Node 服务端处理图片 服务端进行图片处理是很常见的需求,但是Node在这一块相对来说比较薄弱.找了几个比较常见的模块来解决问题. gm GraphicsMagick for node 使用Open ...
- 如何查看本机的oracle数据库的IP地址 和 数据库名
1,如果是本机的oracle数据库,ip就为127.0.0.1,数据库名看tnsname.ora文件 LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST ...