How to connect container database in oracle ?

Summary: in this tutorial, you will learn how to Connect the Container database in  Oracle.


Below steps:


[oracle@ggate2 ~]$ . oraenv

ORACLE_SID = [oggdb2] ? oggdb2

The Oracle base remains unchanged with value /data/app/oracle

[oracle@ggate2 ~]$

[oracle@ggate2 ~]$

[oracle@ggate2 ~]$

[oracle@ggate2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Aug 19 20:47:39 2023

Version 19.3.0.0.0

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

Connected to an idle instance.


SQL>

SQL> startup

ORACLE instance started.

Total System Global Area 1476391776 bytes

Fixed Size                  9134944 bytes

Variable Size             922746880 bytes

Database Buffers          536870912 bytes

Redo Buffers                7639040 bytes

Database mounted.

Database opened.

SQL>

SQL>

SQL> select name from v$database;

NAME

---------

OGGDB2

 Step2:



Step3:

SQL> ALTER PLUGGABLE DATABASE PDB2 open;

Pluggable database altered.


Step4:


Step5
SQL> alter session set container=PDB2 ;

Session altered.:

Step6:



SQL> sho con_name;

             CON_NAME
             -----------------------
              PDB2


********************************************************************************


Thank you!!

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