1,Oracle Database Server Structures
Oracle Instance
Oracle Database Files
Memory Structures
Process Stuctures
Storage Stuctures
2,Oracle内存管理ASMM (Automatic Shared Memory Mangament)
a.Automatically to manage the SGA memory;
b.Default is ON,if SGA_TARGER = 0 means disable.
c.自动管理的只有四个部分
db buffer cache
shared pool
large pool
java pool
3,多个节点管理Mangament Agent <---> Grid Control
单个节点管理Database Control
4,只有在Mount状态下,而不是Open状态下进行的操作:
Rename Datafiles;
Enable/Disable archivelog;
Perform Full Database Recovery
5,Security of Oracle Privilege
Least Privilege 权限最小原则:
Apply the principle of least privilege starting at the lowest levels, and continue at every level
6,数据库安全审核概念
强制性审计
标准审计:审计对象与权限
基于值审计:基于Trigge做的.
FGA细粒度审计:SQL语句
DBA审计
7,常见的集中审计的配置
SQL> select view_name from dba_views where view_name like 'dba%audit%'order by view_name;
(1)标准审计
开启audit_trail参数
总体审计级别设置
SQL Statment(DML)
Privilege 标准审计中Privilege审核时,SQL>audit drop any table by access;本用户drop本schema下的表不会被审计.
Objects(只能一个一个对象进行审计)
查看审计记录表sys.aud$
(2)FGA审计
创建审计策略
SQL> begin
dbms_fga.add_policy(object_schema=>'hr',object_name=>'employees',policy_name=>'audit_emp_sal',audit_column=>'salary',enable=>true,statement_types=>'insert,update,delete');
end;
/
PL/SQL procedure successfully completed.
验证创建的策略
SQL>update employees set salary = 10000 where employee_id = 197;
查看FGA审计结果sys.fga_log$
8,Oracle主动维护AWR
(1)AWR Aoutmatical Workload Repository
(2)自动收集操作:完成AWR信息收集的JOB为GATHER_STAT_JOB,执行的是Package DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT
手动收集操作:SQL>@$ORACLE_HOME/rdbms/admin/awrrpt.sql 指定snap_id统计报表
awrrpti.sql 指定数据库,snap_id统计报表
awrsqrpt.sql指定snap_id,sql语句统计报表
awrsqrpi.sql指定数据库,snap_id,sql语句统计报表
awrddrpt.sql指定2个不同时间周期,2个周期的对比统计
awrddrpi.sql指定数据库,2个不同时间周期,2个周期的对比统计
http://www.docin.com/p-82029825.html#documentinfo
(3)存放:AWR的数据存放在SYSMAN方案的SYSAUX表空间中,不支持SQL的直接访问操作,只能通过EM或DBMS_WORKLOAD_REPOSITORY包来进行处理AWR.
(4)信息组成:a.内存中的v$动态性能视图;b.永久快照,其通过EM或数据字典进行访问.
(5)在进行SQL优化时,可将collection level调整为all,来收集sql执行计划和计时统计信息,
(6)AWR迁移:
先备份
Begin
DBMS_SWRF_INTERNAL.AWR_EXTRACT (
dmpfile => 'awr_data.dmp',
dmpdir => 'TMP_DIR',
bid => 302,
eid => 305);
end;
迁移到临时方案并注册到sys模式
begin
DBMS_SWRF_INTERNAL.AWR_LOAD (
SCHNAME => 'AWR_TEST',
dmpfile => 'awr_data',
dmpdir => 'TMP_DIR');
end;
exec DBMS_SWRF_INTERNAL.MOVE_TO_AWR (SCHNAME => 'AWR_TEST');
或者通过SQL>@?/rdbms/admin/awrextr.sql导出;
SQL> @?/rdbms/admin/awrload.sql导入
Oracle主动维护ADDM Automatical Database Diagnostic Monitor
(7)查看历史AWR snapshot,视图dba_hist_snapshot
select snap_id, dbid, instance_number, to_char(begin_interval_time, 'yyyy-mm-dd hh24:mi:ss.ff') from dba_hist_snapshot;
(8)查看历史Baseline,视图dba_hist_baseline
9. ASSM (Automatical Segment Space Management)
创建表空间时,bitmap自动管理段中的空闲空间.