2010年总结报告
今天是2010年的最后一天,这一年基本上是学习中渡过的,没有啥成绩。希望新的一年能够多做项目,另外能够找到大的培训机构讲课![@more@]20
控制文件扩展问题
今天查看数据库日志,出现下面的日志:Expanded controlfile section 11 from 28 to 56 recordsRequested to grow by 28 records; added 1 blocks of records于是估计查找跟control file有关的视图:select table_name from dict where table_name like upper('%control%');TABLE_NAME------------------------------DBA_REPRESOL_STATS_CONTROLALL_REPRESOL_STATS_CONTROLUSER_REPRESOL_STATS_CONTROLDBA_HIST_WR_CONTROLGV$DLM_TRAFFIC_CONTROLLERV$DLM_TRAFFIC_CONTROLLERV$CONTROLFILEV$CONTROLFILE_RECORD_SECTIONGV$CONTROLFILEGV$C
Create a secure application role
--创建应用角色 create role hr_read identified using hr.hr_read_check; --给角色赋权 grant select on scott.emp to hr_read;--创建角色认证过程(HR) CREATE OR REPLACE PROCEDURE hr.hr_read_check AUTHID CURRENT_USER IS BEGIN DBMS_SESSION.SET_ROLE('HR_READ') ; END; /--在sqlplus 中执行: SQL> declare i number; 2 begin 3 hr.hr_read_check; 4 select count(*) into i from hr.aa; 5 dbms_output.put_line(i); 6 end; 7 / select count(*) into i from hr.aa; * ERROR 位于第 4 行: ORA-06550: 第 4 行, 第 32 列: PL/SQL: