Hello & welcome to my blog. This place is for quality learning and professional experience on Oracle & latest Technologies. Keep reading my blog for new technology and innovation updates.
Wednesday, June 18, 2025
-bash: oraenv: No such file or directory

Tuesday, May 13, 2025
oratop and orachk powerful tool to monitor and troubleshoot the database/cluster issues
oratop and orachk powerful tool to monitor and troubleshoot the database/cluster issues
oratop:
- oratop is an interface that takes data from top and oracle databases on a host.
- The utility combines the data to OS data and session data.
- It allows the viewer to see how multiple databases are interacting with the host and identify high CPU consumers, memory consumers, and IO consumers.
orachk:
- Automates risk identification and proactive notification before your business is impacted
- Runs health checks based on critical and reoccurring problems
- Presents high-level reports about your system health risks and vulnerabilities to known issues
- Enables you to drill-down specific problems and understand their resolutions
- Enables you to schedule recurring health checks at regular intervals
- Sends email notifications and diff reports while running in daemon mode
- Integrates the findings into Oracle Health Check Collections Manager and other tools of your choice
- Runs in your environment with no need to send anything to Oracle
Installation of oratop:
Installation of oracheck:
Example 1: Running the oratop
Example 2: Running the orachk

Query to get object DDL in Oracle database
Query to get object DDL in Oracle database:
1. DBA will most commonly get request to provide the metadata information of a object in a database
2. DBA will most commonly get a request a create object on development
database similar to object which are in PROD database.
These requests may be for various purpose like
auditing,
migration,
backup purposes etc
Query to GET DDL structure:
set long 9999999
set lines 200 pages 2000
col METADATA format a180 word_wrapped
select
dbms_metadata.get_ddl(upper('&Object_type'),upper('&Object_name'),upper('&Owner'))
"METADATA" from dual;
Provide input:
Enter value for object_type: INDEX/TABLE/VIEW etc
Enter value for object_name: NAME_OF_OBJECT
Enter value for owner: OWNER_OF_OBJECT
Example:
1.
Connect to database as mallik user and create an dummy table T1
[oracle@node1 ~]$ env |grep ORA
ORACLE_SID=DEVDB1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@node1 ~]$
[oracle@node1 ~]$ sqlplus mallik/mallik
SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 13
00:18:05 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Tue May 13 2025 00:15:56 +05:30
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
Production
Version 19.3.0.0.0
SQL> select * from T1;
STNO STNAME DOA FEES
---------- --------------- --------- ----------
1 MALLIK 12-SEP-25 300
1 MALLIK 12-SEP-25 300
SQL> describe T1;
Name
Null? Type
-----------------------------------------
-------- ----------------------------
STNO
NUMBER(3)
STNAME
VARCHAR2(15)
DOA
DATE
FEES
NUMBER(3)
SQL>
2. Connect to sys user and get the DDL definition of that
dummy table T1 belongs to mallik user
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 13
00:18:38 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
Production
Version 19.3.0.0.0
SQL> set long 9999999
SQL> set lines 200 pages 2000
SQL> col METADATA format a180 word_wrapped
SQL> select
dbms_metadata.get_ddl(upper('&Object_type'),upper('&Object_name'),upper('&Owner'))
"METADATA" from dual;
Enter value for object_type: TABLE
Enter value for object_name: T1
Enter value for owner: MALLIK
old 1: select
dbms_metadata.get_ddl(upper('&Object_type'),upper('&Object_name'),upper('&Owner'))
"METADATA" from dual
new 1: select
dbms_metadata.get_ddl(upper('TABLE'),upper('T1'),upper('MALLIK'))
"METADATA" from dual
METADATA
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE TABLE "MALLIK"."T1"
(
"STNO" NUMBER(3,0),
"STNAME" VARCHAR2(15),
"DOA" DATE,
"FEES" NUMBER(3,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
DEFAULT)
TABLESPACE
"USERS"
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition
Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@node1 ~]$

-bash: oraenv: No such file or directory
-bash: oraenv: No such file or directory What Are Root.sh And OrainstRoot.sh Scripts In A Standalone RDBMS Installation? (Doc ID 1493121.1) ...
-
19c RAC Installation and Configuration 1. Prechecks (OS Checks and Network Checks) 2. GI Installation 2. Post Checks Prechecks (OS Check...
-
Copy password file from FS to ASM diskgroup: 1. Verify passwordile available on FS [oracle@oraclenode1 ~]$ ll /tmp/orapwRAC12C -rw-r----- 1...
-
PDB Export & Import - Pluggable Database: Create DUMP directory: CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/DU...
-
How to Move Temp File Location in Oracle Standalone Database: 1. Connect to the database. . oraenv sqlplus / as sysdba 2. Check the Database...
-
Database Mode - Restrict Vs Exclusive & Drop database - Standalone Vs RAC High-level steps to drop RAC Database: =======================...