Oracle dynamic display log, oracle dynamic log

Source: Internet
Author: User

Oracle dynamic display log, oracle dynamic log

 

1. view the location of the log file;

IND_USER @ PROD> select inst_id, name, value from v $ diag_info;

INST_ID NAME VALUE
--------------------------------------------------------------------------------
1 Diag Enabled TRUE
1 ADR Base/u01/app/oracle
1 ADR Home/u01/app/oracle/diag/rdbms/prod/PROD
1 Diag Trace/u01/app/oracle/diag/rdbms/prod/PROD/trace
1 Diag Alert/u01/app/oracle/diag/rdbms/prod/PROD/alert
1 Diag Incident/u01/app/oracle/diag/rdbms/prod/PROD/incident
1 Diag Cdump/u01/app/oracle/diag/rdbms/prod/PROD/cdump
1 Health Monitor/u01/app/oracle/diag/rdbms/prod/PROD/hm
1 Default Trace File/u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_or
A_00003.trc

1 Active Problem Count 0
1 Active Incident Coun 0
T

-- The alert directory is an xml file;

-- The trace directory contains text files;

[Oracle @ jibo trace] $ pwd
/U01/app/oracle/diag/rdbms/prod/PROD/trace
[Oracle @ jibo trace] $ ll-atl | grep alert *
-Rw-r ----- 1 oracle oinstall 99797 Sep 29 alert_PROD.log
[Oracle @ jibo trace] $ tail-f alert_PROD.log
Mon Sep 29 14:43:34 2014
Starting background process SMCO
Mon Sep 29 14:43:34 2014
SMCO started with pid = 28, OS id = 4709
Mon Sep 29 14:54:57 2014
Thread 1 advanced to log sequence 12 (LGWR switch)
Current log #3 seq #12 mem #0:/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_3_b22567o2 _. log
Current log #3 seq #12 mem #1:/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_3_b2256827 _. log
Mon Sep 29 14:54:58 2014
Archived Log entry 7 added for thread 1 sequence 11 ID 0x102473b1 dest 1:

 

-- View alert logs in the operating system and run the tail command;

If there are any changes to the database, log files will generate corresponding records.

It is best to view the Learning Test


How Does oracle view logs?

View Oracle logs

1. Oracle Log Path:

Login: sqlplus "/as sysdba"

View path: SQL> select * from v $ logfile;

SQL> select * from v $ logfile; (# log file path)

Ii. What content does the Oracle log file contain? (the number of logs may be slightly different)

Control01.ctl example01.dbf redo02.log sysaux01.dbf undotbs01.dbf

Control02.ctl redo03.log system01.dbf users01.dbf

Control03.ctl redo01.log SHTTEST. dbf temp01.dbf

Iii. How to view Oracle logs:

SQL> select * from v $ SQL (# View recent operations)

SQL> select * fromv $ sqlarea (# View recent operations)

All changes to the Oracle database are recorded in the log. Currently, the only way to analyze Oracle logs is to use the LogMiner provided by Oracle, we cannot understand the original log information at all. LogMiner is provided in later Oracle8i versions, and LogMiner is a tool that allows us to understand the log information. This tool can be used to find out logical changes to the database, detect and correct user misoperations, perform post-event audits, and analyze changes.

4. Use of LogMiner:

1. Create a data dictionary file)

1) First, add the UTL_FILE_DIR parameter in the init. ora initialization parameter file. The value of this parameter is the directory where the data dictionary file is placed on the server. For example: UTL_FILE_DIR = ($ ORACLE_HOME \ logs), restart the database to make the newly added parameters take effect:

SQL> shutdown;

SQL> startup;

2) create a data dictionary file.
SQL> connect/as sysdba
SQL> execute dbms_logmnr_d.build (dictionary_filename => 'dict. ora ', dictionary_location =>'/data1/oracle/logs ');

PL/SQL procedure successfully completed

2. Create a list of log files to be analyzed
1) Create an analysis list, that is, the log to be analyzed
SQL> execute dbms logmnr. add logfile (LogFileName => '/data1/oracle/oradata/akazamdb/redo01.log', Options => dbms_logmnr.new );
PL/SQL procedure successfully completeds
2). Add an analytic log file at a time.
SQL> execute dbms _ logmnr. add _ logfile (LogFileName => '/data1/oracle/oradata/akaz ...... the remaining full text>

How to make the log Content not dynamically displayed

Are you talking about QQ space or Baidu space? Or others? Your question is not clear, but I am happy to answer you. I guess you are asking about the QQ space. Let's talk about the QQ space.
If you do not set the space dynamics and do not prompt, all the updates to your space, such as logs, albums, reposts, shares, and presentations, will be displayed in the "friend Dynamics" of your space.
Next to "Dress up space", click "set" to enter, find the "other" item, and set it. Then, OK. Follow my instructions, your problem is solved. Or, if you set the permission for a space and do not have the permission to enter your space, you cannot see any dynamics in your space (the dynamics of your space will not be displayed in the space of people without permissions, do you understand ?), The setting is also in "Settings.
Are you satisfied with my answer?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.