티스토리 뷰
Auditing database changes: Oracle provides DDL triggers to audit all schema changes and can report the exact change, when it was made, and by which user.
There are several ways to audit within Oracle and the following auditing tools are provided:
SQL audit command (for DML)
Auditing with object triggers (DML auditing)
Auditing with system-level triggers (DML and DDL)
Auditing with LogMiner (DML and DDL)
Fine-grained auditing (select auditing)
DDL triggers: Using the Data Definition Language (DDL) triggers, the Oracle DBA can automatically track all changes to the database, including changes to tables, indexes, and constraints. The data from this trigger is especially useful for change control for the Oracle DBA.
DDL triggers execute every time a DDL statement is executed, and adds new entries to your new table, as shown below:
There are several ways to audit within Oracle and the following auditing tools are provided:
SQL audit command (for DML)
Auditing with object triggers (DML auditing)
Auditing with system-level triggers (DML and DDL)
Auditing with LogMiner (DML and DDL)
Fine-grained auditing (select auditing)
DDL triggers: Using the Data Definition Language (DDL) triggers, the Oracle DBA can automatically track all changes to the database, including changes to tables, indexes, and constraints. The data from this trigger is especially useful for change control for the Oracle DBA.
DDL triggers execute every time a DDL statement is executed, and adds new entries to your new table, as shown below:
connect sys/manager
create or replace trigger
DDLTrigger
AFTER DDL ON DATABASE
BEGIN
insert into
perfstat.stats$ddl_log
(
user_name,
ddl_date,
ddl_type,
object_type,
owner,
object_name
)
VALUES
(
ora_login_user,
sysdate,
ora_sysevent,
ora_dict_obj_type,
ora_dict_obj_owner,
ora_dict_obj_name
);
END;
/
create or replace trigger
DDLTrigger
AFTER DDL ON DATABASE
BEGIN
insert into
perfstat.stats$ddl_log
(
user_name,
ddl_date,
ddl_type,
object_type,
owner,
object_name
)
VALUES
(
ora_login_user,
sysdate,
ora_sysevent,
ora_dict_obj_type,
ora_dict_obj_owner,
ora_dict_obj_name
);
END;
/
'데이터베이스 > 오라클' 카테고리의 다른 글
대용량 데이터 혹은 테이블시 고려해볼 사항 (0) | 2008.01.24 |
---|---|
오라클 DEPENDANCY CHECK SQL (0) | 2008.01.22 |
오라클 DB 오브젝트 현황표 만들기 (0) | 2008.01.22 |
DBA 는 얼마나 시간을 쓰나?(오라클 PT자료 중에서..) (0) | 2008.01.20 |
LOB 타입 DB link 카피 방법 (0) | 2008.01.16 |
오라클 DDL 모니터링 오라클 시스템 트리거 이용 (0) | 2008.01.16 |
오라클 DBA VIEW (0) | 2008.01.15 |
insert 문에 values 안에 select 문이 들어 간다? (0) | 2008.01.15 |
오라클 오브젝트 사용 현황 (0) | 2008.01.10 |
import 시 분당 insert 갯수 보기 (0) | 2007.12.28 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Datapump
- 큐브리드
- 성공의길
- 프로젝트
- 오라클
- 구글
- auto increment
- oracle
- 꿈
- 아웃라이어
- shared everything
- 다짐
- 디자인패턴
- 데이터과학
- 튜닝
- 브레인피드백
- 구조주의 인류학
- 일본전산
- 카이에 소바주 시리즈
- NHN 면접
- ChatGPT
- 퇴사
- 습관의힘
- 바이오해킹
- getGeneratedKeys
- 셀프 조인
- DB
- 커뮤니케이션의 7가지 나쁜 습관들
- CUBRID
- shared all
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함