What is Glogin in oracle database.

 Summary: in this tutorial, you will learn what is glogin Oracle Database.


What is Glogin?


The glogin is nothing but quick monitoring of the database when we are login to the database.

Example below:

  • Actually, glogin.sql files are already stored in DBS location in the database.
  • if example your environment has multiple databases really you need to verify the database every time.
  • If you want to add any queries monitor the tablespace size as well I will show you the real-time scenario. 

Sample 1:( without adding the SQL queries in glogin)


[oracle@oracle admin]$ pwd

/u01/app/oracle/product/12.1.0/dbhome_1/sqlplus/admin---->This is the location of glogin.sql

[oracle@oracle admin]$

[oracle@oracle admin]$

[oracle@oracle admin]$ ll

total 16

-rw-r--r--. 1 oracle oinstall  342 Jan 12  2006 glogin.sql

drwxr-xr-x. 2 oracle oinstall   77 Mar 24 21:35 help

-rw-r--r--. 1 oracle oinstall  226 May 22  2014 libsqlplus.def

-rw-r--r--. 1 oracle oinstall  813 Mar  7  2006 plustrce.sql

-rw-r--r--. 1 oracle oinstall 2614 Feb 23  2014 pupbld.sql

[oracle@oracle admin]$


 

Now I am trying to log in the without adding the SQL queries in glogin in below.


[oracle@oracle admin]$

[oracle@oracle admin]$ . oraenv

ORACLE_SID = [prod] ?

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

[oracle@oracle admin]$

[oracle@oracle admin]$

[oracle@oracle admin]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 18:46:40 2023


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



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> select name from V$database;--> we need to type and find it manually


NAME

---------

PROD


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

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

Sample 2:( with adding the SQL queries in glogin)




[oracle@oracle admin]$ . oraenv

ORACLE_SID = [prod] ?

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

[oracle@oracle admin]$

[oracle@oracle admin]$

[oracle@oracle admin]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 19:09:07 2023


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



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options



NAME      OPEN_MODE

--------- --------------------

PROD      READ WRITE


SQL>



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