oracle学习记录之授权(1)
2013-01-03 14:12
375 查看
oracle学习记录,表上查询、执行存储过程的授权,grant语句的使用,供参考。
--以sys用户连接数据库,密码oracle connect sys/oracle as sysdba; --创建test1用户,密码123 create user test1 identified by 123; --建立测试表a create table a(a number(10), b varchar2(20)); --把查询a表的权限授給test1 grant select on a to test1; --建立测试存储过程spAdd create procedure spAdd (aa in number, bb in varchar2) as begin insert into a values(aa, bb); commit; end; / --sys执行存储过程 execute spAdd(123, 'aaa'); --把执行存储过程的权限授給test1 grant execute on spAdd to test1; --把create session权限授给test1 grant create session to test1; --以test1用户连接数据库 connect test1/123; --以test1用户执行sys的spAdd存储过程 execute sys.spAdd(124, 'bbb'); --以test1用户查询sys的a表 select * from sys.a;
相关文章推荐
- oracle学习记录之授权(2)
- [学习记录] oracle 给用户授权相关sql
- Oracle常见授权与回收权限(grant和revoke)学习记录
- Oracle学习记录1(单行函数,多行函数)
- Oracle学习记录2(多表查询)
- Oracle学习记录1
- oracle sql 学习记录
- linux学习记录关于tomcat,jdk,oracle,mysql安装
- ORACLE PL/SQL 记录(Record)学习笔记(二)
- Oracle-01-学习内容&安装遇到的问题记录
- Oracle SQL脚本学习记录三
- oracle学习记录之分页
- oracle学习用户和表空间的创建,授权。
- Oracle学习记录1(单行函数,多行函数)
- Oracle学习记录2(多表查询)
- Oracle 学习记录
- Oracle SQL脚本学习记录四
- Oracle学习记录1(单行函数,多行函数)
- [DB2 学习记录]4. DB2 基本安全概念-授权
- Oracle学习记录