dbms_shared_pool过程锁定内存#ocp试验#
2012-12-26 12:04
253 查看
参考:http://www.cnblogs.com/zlja/archive/2011/06/24/2449313.html
1,包dbms_shared_pool的数据字典,通过它来执行过程锁定内存
2,v$db_object_cache 来查询那个过程锁定
3,在scott用户下新建一个procedure
DBA_objects查看,注意这里scott需要大写
查看scott下面的所有存储过程
4,将这个过程锁在内存
查看
解锁
试验中的系统触发器需要grant
grant execute on dbms_shared_pool to HR;
下面是将scott下面的emp表的select等权限给用户HR
1,包dbms_shared_pool的数据字典,通过它来执行过程锁定内存
2,v$db_object_cache 来查询那个过程锁定
SYS@sen>select owner,name,type from v$db_object_cache where SHARABLE_MEM>10000 AND (TYPE='PACKAGE' OR TYPE='PACKAGE BODY' OR TYPE='FUNCTION' OR TYPE='PROCEDURE') AND kept='NO';
3,在scott用户下新建一个procedure
create or replace procedure p1 as begin null; end;
DBA_objects查看,注意这里scott需要大写
SYS@sen>select owner, object_type,OBJECT_NAME from DBA_objects where object_type='PROCEDURE' and owner='SCOTT';
查看scott下面的所有存储过程
4,将这个过程锁在内存
SYS@sen>exec dbms_shared_pool.keep('SCOTT.p1','P')
查看
SYS@sen>select owner,name,type from v$db_object_cache where owner='SCOTT' AND kept='YES';
解锁
SYS@sen>exec dbms_shared_pool.unkeep('SCOTT.p1','P')
试验中的系统触发器需要grant
grant execute on dbms_shared_pool to HR;
下面是将scott下面的emp表的select等权限给用户HR
SCOTT@DB112>grant select,insert,update,delete on emp to hr;
相关文章推荐
- dbms_shared_pool.markhot标记热对象
- ASMM下查看shared_pool_size等内存大小
- 35.Oracle深度学习笔记——关于dbms_shared_pool. MARKHOT
- 关于PLSQL性能调整的一点技巧关于dbms_shared_pool缓存对象的详细用法
- Postmaster的Shared Memory中的shared buffer pool内存结构
- Oracle OCP之硬解析在共享池中获取内存锁的过程
- PostgreSQL启动过程中的那些事七:初始化共享内存和信号十三:shmem中初始化SharedInvalidationState
- Using dbms_shared_pool.purge to remove a single task from the library cache
- DBMS_SHARED_POOL.PURGE 如何让游标cursor失效,如何清除占用共享池过大的游标
- dbms_shared_pool
- ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN :EXEC_STR := SYS.DBMS...","PL/SQL MPCODE","BAMIM
- oracle 内存结构 share pool sql解析的过程
- MySQL innodb_buffer_pool 内存分配过程
- 使用dbms_shared_pool.purge清除共享池中的SQL执行计划
- 043-OCPThe memory used by Streams will be allocated from the shared pool
- How to Pin a Cursor in the Shared Pool using DBMS_SHARED_POOL.KEEP (文档 ID 726780.1)
- Oracle_dbms_shared_pool.purge 包的使用
- dbms_shared_pool.purge
- dbms_shared_pool
- PostgreSQL启动过程中的那些事七:初始化共享内存和信号十二:shmem中初始化SharedBackendStatus