SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Anar Godjaev
LogMiner
--@?/rdbms/admin/dbmslogmnrd.sql;
-- related views
SELECT * FROM V$LOGMNR_DICTIONARY;
SELECT * FROM V$LOGMNR_PARAMETERS;
--contents of the logs
SELECT * FROM V$LOGMNR_CONTENTS;
--which redo logs are being analyzed in the current logminer session
SELECT * FROM V$LOGMNR_LOGS;
-- minimal supplemental logging
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA
(PRIMARY KEY, UNIQUE INDEX) COLUMNS;
ALTER DATABASE DROP SUPPLEMENTAL LOG DATA;
ALTER TABLE scott.emp ADD SUPPLEMENTAL LOG GROUP
emp_parttime (empno, ename, deptno) ALWAYS;
ALTER TABLE scott.emp ADD SUPPLEMENTAL LOG GROUP
emp_parttime (empno, ename, deptno) ;
ALTER TABLE scott.emp DROP SUPPLEMENTAL LOG GROUP emp_parttime;
-- to create all logminer objects in to the specified tablespace
EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE('logmnrts$');
EXECUTE DBMS_LOGMNR_D.BUILD ('dictionary.ora', '/oracle/database/',
OPTIONS =>DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);
EXECUTE DBMS_LOGMNR_D.BUILD (OPTIONS=>DBMS_LOGMNR_D.STORE_IN_REDO_LOGS);
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log1orc1.ora',
OPTIONS =>DBMS_LOGMNR.NEW);
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log2orc1.ora',
OPTIONS =>DBMS_LOGMNR.ADDFILE);
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log3orc1.ora',
OPTIONS =>DBMS_LOGMNR.REMOVEFILE);
EXECUTE DBMS_LOGMNR.START_LOGMNR(
OPTIONS =>DBMS_LOGMNR.DICT_FROM_REDO_LOGS);
EXECUTE DBMS_LOGMNR.START_LOGMNR (
OPTIONS =>DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);
-- For example, to see all the DDLs executed by user SYS, you could issue
the following query
SELECT USERNAME, SQL_REDO FROM V$LOGMNR_CONTENTS
WHERE USERNAME = 'SYS' AND OEPRATION = 'DDL';
-- filtering redo_log actions
EXECUTE DBMS_LOGMNR.START_LOGMNR(
OPTIONS =>DBMS_LOGMNR.COMMITTED_DATA_ONLY);
Anar Godjaev
EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS =>DBMS_LOGMNR.SKIP_CORRUPTION);
EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'/oracle/dictionary.ora',
STARTTIME => TO_DATE('23-OCT-2013 08:30:00', 'DD-MON-YYYY HH:MI:SS'),
ENDTIME => TO_DATE('23-OCT-2013 08:45:00', 'DD-MON-YYYY HH:MI:SS'));
EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'/oracle/dictionary.ora',
STARTSCN =>100,
ENDSCN =>150);
EXECUTE DBMS_LOGMNR.END_LOGMNR;
-- a session example
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log1orc1.ora',
OPTIONS =>DBMS_LOGMNR.NEW);
EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log2orc1.ora',
OPTIONS =>DBMS_LOGMNR.ADDFILE);
EXECUTE DBMS_LOGMNR.START_LOGMNR(
DICTFILENAME =>'/oracle/database/dictionary.ora');
EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS =>
DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.COMMITTED_DATA_ONLY);
EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS =>
DBMS_LOGMNR.DICT_FROM_REDO_LOGS + DBMS_LOGMNR.COMMITTED_DATA_ONLY);
EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'orcldict.ora',
STARTTIME => TO_DATE('23-OCT-2013 08:30:00', 'DD-MON-YYYY HH:MI:SS'),
ENDTIME => TO_DATE('23-OCT-2013 08:45:00', 'DD-MON-YYYY HH:MI:SS'));

Weitere ähnliche Inhalte

Was ist angesagt?

Perl one-liners
Perl one-linersPerl one-liners
Perl one-linersdaoswald
 
Schedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaSchedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaMaximilian Jackson
 
Writing better functional java code - devnexus
Writing better functional java code  - devnexusWriting better functional java code  - devnexus
Writing better functional java code - devnexusBrian Vermeer
 
[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)altistory
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of MakefileNakCheon Jung
 
Customizing the unix environment
Customizing the unix environmentCustomizing the unix environment
Customizing the unix environmentDr. Girish GS
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
Common mistakes functional java snyk
Common mistakes functional java snykCommon mistakes functional java snyk
Common mistakes functional java snykBrian Vermeer
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl鉄次 尾形
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTSyed SadathUllah
 
Mercurial for Kittens
Mercurial for KittensMercurial for Kittens
Mercurial for Kittensnya3jp
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0bcoca
 
Diving Into Memory Allocation to Understand Buffer Overflow Better
Diving Into Memory Allocation to Understand Buffer Overflow BetterDiving Into Memory Allocation to Understand Buffer Overflow Better
Diving Into Memory Allocation to Understand Buffer Overflow BetterOguzhan Topgul
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013sayajeff
 
2. writing MySql plugins general
2. writing MySql plugins   general2. writing MySql plugins   general
2. writing MySql plugins generalRoland Bouman
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Rupak Roy
 

Was ist angesagt? (20)

Perl one-liners
Perl one-linersPerl one-liners
Perl one-liners
 
Schedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaSchedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS Lambda
 
Writing better functional java code - devnexus
Writing better functional java code  - devnexusWriting better functional java code  - devnexus
Writing better functional java code - devnexus
 
[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
 
Customizing the unix environment
Customizing the unix environmentCustomizing the unix environment
Customizing the unix environment
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Common mistakes functional java snyk
Common mistakes functional java snykCommon mistakes functional java snyk
Common mistakes functional java snyk
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl
 
Rman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORTRman Reporting Opertions - LIST & REPORT
Rman Reporting Opertions - LIST & REPORT
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Mercurial for Kittens
Mercurial for KittensMercurial for Kittens
Mercurial for Kittens
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Diving Into Memory Allocation to Understand Buffer Overflow Better
Diving Into Memory Allocation to Understand Buffer Overflow BetterDiving Into Memory Allocation to Understand Buffer Overflow Better
Diving Into Memory Allocation to Understand Buffer Overflow Better
 
Writing MySQL UDFs
Writing MySQL UDFsWriting MySQL UDFs
Writing MySQL UDFs
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
 
2. writing MySql plugins general
2. writing MySql plugins   general2. writing MySql plugins   general
2. writing MySql plugins general
 
9. Radio1 in Laravel
9. Radio1 in Laravel 9. Radio1 in Laravel
9. Radio1 in Laravel
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
 

Andere mochten auch

Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)Anar Godjaev
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOpsFrank Munz
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and RecoveryAnar Godjaev
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4Osama Mustafa
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5Osama Mustafa
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vaultOsama Mustafa
 
Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Osama Mustafa
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productionsOsama Mustafa
 
Apache Tomcat Shutdown Startup Script Shell
Apache Tomcat Shutdown Startup Script ShellApache Tomcat Shutdown Startup Script Shell
Apache Tomcat Shutdown Startup Script ShellAnar Godjaev
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2Osama Mustafa
 
HTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive ListHTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive ListMainstreethost
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builderOsama Mustafa
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed FilesAnar Godjaev
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 

Andere mochten auch (20)

Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)
 
11 g RAC -ASM
11 g RAC -ASM11 g RAC -ASM
11 g RAC -ASM
 
Vyg monitor
Vyg monitorVyg monitor
Vyg monitor
 
Database Security
Database SecurityDatabase Security
Database Security
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOps
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
 
Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
Apache Tomcat Shutdown Startup Script Shell
Apache Tomcat Shutdown Startup Script ShellApache Tomcat Shutdown Startup Script Shell
Apache Tomcat Shutdown Startup Script Shell
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
HTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive ListHTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive List
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builder
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 

Ähnlich wie LogMiner

Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/ProxyPeter Eisentraut
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop shortNabi Abdul
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出iammutex
 
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...InSync2011
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLCommand Prompt., Inc
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
Pl python python w postgre-sql
Pl python   python w postgre-sqlPl python   python w postgre-sql
Pl python python w postgre-sqlPiotr Pałkiewicz
 
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...NETWAYS
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11EDB
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in ScalaKnoldus Inc.
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
Github.com anton terekhov-orientdb-php
Github.com anton terekhov-orientdb-phpGithub.com anton terekhov-orientdb-php
Github.com anton terekhov-orientdb-phpSan jay
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 

Ähnlich wie LogMiner (20)

Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Rman workshop short
Rman workshop shortRman workshop short
Rman workshop short
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
 
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
10a log
10a log10a log
10a log
 
Pl python python w postgre-sql
Pl python   python w postgre-sqlPl python   python w postgre-sql
Pl python python w postgre-sql
 
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...
OSMC 2023 | Making your Kubernetes-based log collection reliable & durable wi...
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
 
MariaDB workshop
MariaDB workshopMariaDB workshop
MariaDB workshop
 
Log4jxml ex
Log4jxml exLog4jxml ex
Log4jxml ex
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Github.com anton terekhov-orientdb-php
Github.com anton terekhov-orientdb-phpGithub.com anton terekhov-orientdb-php
Github.com anton terekhov-orientdb-php
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 

Mehr von Anar Godjaev

Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...Anar Godjaev
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaultAnar Godjaev
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin GüvenliğiAnar Godjaev
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden GateAnar Godjaev
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumAnar Godjaev
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon ExportAnar Godjaev
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Anar Godjaev
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Anar Godjaev
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeAnar Godjaev
 
Conditional Control
Conditional ControlConditional Control
Conditional ControlAnar Godjaev
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasiAnar Godjaev
 

Mehr von Anar Godjaev (20)

Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 

LogMiner

  • 1. Anar Godjaev LogMiner --@?/rdbms/admin/dbmslogmnrd.sql; -- related views SELECT * FROM V$LOGMNR_DICTIONARY; SELECT * FROM V$LOGMNR_PARAMETERS; --contents of the logs SELECT * FROM V$LOGMNR_CONTENTS; --which redo logs are being analyzed in the current logminer session SELECT * FROM V$LOGMNR_LOGS; -- minimal supplemental logging ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS; ALTER DATABASE DROP SUPPLEMENTAL LOG DATA; ALTER TABLE scott.emp ADD SUPPLEMENTAL LOG GROUP emp_parttime (empno, ename, deptno) ALWAYS; ALTER TABLE scott.emp ADD SUPPLEMENTAL LOG GROUP emp_parttime (empno, ename, deptno) ; ALTER TABLE scott.emp DROP SUPPLEMENTAL LOG GROUP emp_parttime; -- to create all logminer objects in to the specified tablespace EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE('logmnrts$'); EXECUTE DBMS_LOGMNR_D.BUILD ('dictionary.ora', '/oracle/database/', OPTIONS =>DBMS_LOGMNR_D.STORE_IN_FLAT_FILE); EXECUTE DBMS_LOGMNR_D.BUILD (OPTIONS=>DBMS_LOGMNR_D.STORE_IN_REDO_LOGS); EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log1orc1.ora', OPTIONS =>DBMS_LOGMNR.NEW); EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log2orc1.ora', OPTIONS =>DBMS_LOGMNR.ADDFILE); EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log3orc1.ora', OPTIONS =>DBMS_LOGMNR.REMOVEFILE); EXECUTE DBMS_LOGMNR.START_LOGMNR( OPTIONS =>DBMS_LOGMNR.DICT_FROM_REDO_LOGS); EXECUTE DBMS_LOGMNR.START_LOGMNR ( OPTIONS =>DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG); -- For example, to see all the DDLs executed by user SYS, you could issue the following query SELECT USERNAME, SQL_REDO FROM V$LOGMNR_CONTENTS WHERE USERNAME = 'SYS' AND OEPRATION = 'DDL'; -- filtering redo_log actions EXECUTE DBMS_LOGMNR.START_LOGMNR( OPTIONS =>DBMS_LOGMNR.COMMITTED_DATA_ONLY);
  • 2. Anar Godjaev EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS =>DBMS_LOGMNR.SKIP_CORRUPTION); EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'/oracle/dictionary.ora', STARTTIME => TO_DATE('23-OCT-2013 08:30:00', 'DD-MON-YYYY HH:MI:SS'), ENDTIME => TO_DATE('23-OCT-2013 08:45:00', 'DD-MON-YYYY HH:MI:SS')); EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'/oracle/dictionary.ora', STARTSCN =>100, ENDSCN =>150); EXECUTE DBMS_LOGMNR.END_LOGMNR; -- a session example ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log1orc1.ora', OPTIONS =>DBMS_LOGMNR.NEW); EXECUTE DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME =>'log2orc1.ora', OPTIONS =>DBMS_LOGMNR.ADDFILE); EXECUTE DBMS_LOGMNR.START_LOGMNR( DICTFILENAME =>'/oracle/database/dictionary.ora'); EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.COMMITTED_DATA_ONLY); EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_REDO_LOGS + DBMS_LOGMNR.COMMITTED_DATA_ONLY); EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME =>'orcldict.ora', STARTTIME => TO_DATE('23-OCT-2013 08:30:00', 'DD-MON-YYYY HH:MI:SS'), ENDTIME => TO_DATE('23-OCT-2013 08:45:00', 'DD-MON-YYYY HH:MI:SS'));