How to connect the oracle Database in linux enviromnets?


 The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.

1) log in to the server 
2)Confirm the DB name and services are running or not?
3)set the environment variable?
4)connect sqlplus 

1) log in to the server 










2)Confirm the DB name and services are running or not?

[oracle@ltitest ~]$ ps -ef |grep pmon
oracle    3511  3166  0 12:30 pts/0    00:00:00 grep --color=auto pmon
[oracle@ltitest ~]$

Note: services aren't running

3)set the environment variable?

[oracle@ltitest ~]$ . oraenv
ORACLE_SID = [oracle] ? Here type your database name
The Oracle base has been set to /u01/app/oracle
[oracle@ltitest ~]$

4)connect sqlplus 

[oracle@ltitest ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 22 12:32:26 2023

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

Connected to an idle instance.

SQL>


Note: in that case, DB is down so we need to start my database.

SQL> startup;

ORACLE instance started.

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

NAME      OPEN_MODE
--------- --------------------
DBNAME   READ WRITE

SQL>



Thanks for your time!!

Thanks
Rameshbabu

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...