How to find the alert log location oracle Database?

 Summary: in this tutorial, you will learn how to find the Alert log location in the oracle database,


There are two options:

Option1:

  • Login to the server

[oracle@ltitest ~]$ ps -ef |grep pmon
oracle    7096  3395  0 11:46 pts/0    00:00:00 grep --color=auto pmon
[oracle@ltitest ~]$
[oracle@ltitest ~]$ . oraenv
ORACLE_SID = [ltitest1] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@ltitest ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 7 11:46:46 2023

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  713031680 bytes
Fixed Size                  2928488 bytes
Variable Size             553648280 bytes
Database Buffers          150994944 bytes
Redo Buffers                5459968 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
LTITEST1  READ WRITE


SQL> show parameter core_dump_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/lti
                                                 test1/ltitest1/cdump

[oracle@ltitest ~]$ cd /u01/app/oracle/diag/rdbms/ltitest1
[oracle@ltitest ltitest]$
[oracle@ltitest ltitest]$ cd ltitest1
[oracle@ltitest ltitest]$ cd trace
[oracle@ltitest trace]$
[oracle@ltitest trace]$ pwd
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/trace
[oracle@ltitest trace]$
[oracle@ltitest trace]$ ls -lrth
total 6.5M
-rw-r-----. 1 oracle oinstall   90 Jan 30 18:04 ltitest_vktm_16718.trm
-rw-r-----. 1 oracle oinstall 1.3K Jan 30 18:04 ltitest_vktm_16718.trc
-rw-r-----. 1 oracle oinstall   73 Jan 30 18:04 ltitest_vkrm_16732.trm
-rw-r-----. 1 oracle oinstall  958 Feb 27 13:32 ltitest_mmnl_3593.trc
-rw-r-----. 1 oracle oinstall  128 Feb 27 16:01 ltitest_vktm_3555.trm
-rw-r-----. 1 oracle oinstall 1.6K Feb 27 16:01 ltitest_vktm_3555.trc
-rw-r-----. 1 oracle oinstall 151K Feb 27 16:01 alert_ltitest.log
[oracle@ltitest trace]$ tail -f alert_ltitest.log
Default pga_aggregate_limit value is too high for the
amount of physical memory in the system
pga_aggregate_limit is 2048 MB
limit based on physical memory and SGA usage is 1162 MB
Mon Feb 27 13:13:25 2023
Warning: VKTM detected a time drift.
Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
Mon Feb 27 16:01:24 2023
Warning: VKTM detected a time drift.

Option 2:

[oracle@ltitest ~]$ . oraenv
ORACLE_SID = [oracle] ? ltitest1
The Oracle base has been set to /u01/app/oracle
[oracle@ltitest ~]$
[oracle@ltitest ~]$
[oracle@ltitest ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Mar 8 09:24:13 2023

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  713031680 bytes
Fixed Size                  2928488 bytes
Variable Size             553648280 bytes
Database Buffers          150994944 bytes
Redo Buffers                5459968 bytes
Database mounted.
Database opened.
SQL> select value from v$diag_info;

VALUE
--------------------------------------------------------------------------------
TRUE
/u01/app/oracle
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/trace
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/alert
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/incident
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/cdump
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/hm
/u01/app/oracle/diag/rdbms/ltitest1/ltitest1/trace/ltitest1_ora_3556.trc
0
0

11 rows selected.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@ltitest ~]$
[oracle@ltitest ~]$
[oracle@ltitest ~]$ cd /u01/app/oracle/diag/rdbms/ltitest1/ltitest1/trace
[oracle@ltitest trace]$ ls -lrtrh
total 5.9M
-rw-r-----. 1 oracle oinstall  974 Mar  8 09:24 ltitest1_arc2_3570.trc
-rw-r-----. 1 oracle oinstall   73 Mar  8 09:24 ltitest1_tt00_3574.trm
-rw-r-----. 1 oracle oinstall  955 Mar  8 09:24 ltitest1_tt00_3574.trc
-rw-r-----. 1 oracle oinstall   84 Mar  8 09:24 ltitest1_arc1_3568.trm
-rw-r-----. 1 oracle oinstall 1.1K Mar  8 09:24 ltitest1_arc1_3568.trc
-rw-r-----. 1 oracle oinstall   84 Mar  8 09:24 ltitest1_mmon_3540.trm
-rw-r-----. 1 oracle oinstall 1.2K Mar  8 09:24 ltitest1_mmon_3540.trc
-rw-r-----. 1 oracle oinstall  125 Mar  8 09:24 ltitest1_aqpc_3582.trm
-rw-r-----. 1 oracle oinstall 1.1K Mar  8 09:24 ltitest1_aqpc_3582.trc
-rw-r-----. 1 oracle oinstall   95 Mar  8 09:25 ltitest1_dbrm_3516.trm
-rw-r-----. 1 oracle oinstall 2.8K Mar  8 09:25 ltitest1_dbrm_3516.trc
-rw-r-----. 1 oracle oinstall  241 Mar  8 09:25 ltitest1_ora_3556.trm
-rw-r-----. 1 oracle oinstall 2.9K Mar  8 09:25 ltitest1_ora_3556.trc
-rw-r-----. 1 oracle oinstall 403K Mar  8 09:25 alert_ltitest1.log
[oracle@ltitest trace]$

Thanks for your time!









0 Comments

DELETE Statement in ORACLE DB— Step by Step Internal Flow with classroom example.

Imagine your Oracle database like a school, and you’re Teacher decides to remove a student (row) from the classroom(table). Let’s see how the journey works step by step: 1)Classroom = Oracle Table 2)Students = Rows (Records) 3)Class Teacher = Oracle Server Process 4)Attendance Register = Data Dictionary User fires DELETE statement: DELETE FROM students WHERE grade = 'D'; Internal Processing Steps: Client Process Sends DELETE Statement to Server Process The teacher receives a request to remove a student from the classroom. Syntax Check (Parsing) The teacher checks if the request is grammatically correct — proper command, keywords, and a semicolon. Semantic Check Teacher verifies if the classroom exists and whether the condition (like grade = 'D') makes sense. Object Resolution Teacher confirms that the ‘students’ classroom (table) exists in the school records (data dictionary). Optimization Decides the fastest way to find those students — by roll number, grade, or al...