Just for our
understanding and for those who are new to oracle server concept, below is the
graphical example of oracle server which will help beginners to understand it
easily. This includes only a part of database architecture explanation. We will
see the actual database architecture while we proceed further. For now, let’s
understand what oracle server is:-
In the above diagram, I have displayed images of a human being and notebook. My aim is to show you that, as we all are having pair of hands, pair of legs, brain (memory),pair of eyes, mouth etc. by which we can perform various activities like walking, reading, writing, eating etc. , similarly Oracle also has its own components to perform its activities. But when it comes to remember anything we can’t remember all the things which were happened in the past. For remembering all the important things we can write it in a notebook, so whenever we required anything we can go and read it from notebook. Sometimes it becomes difficult to recollect all the important activities from our past; hence for our future reference we save it in a diary or in a phone etc., Likewise oracle database works. As mentioned earlier, Oracle too has its own component which helps it to perform its activities. Unlike, we can write in a notebook by using hands, same way oracle can write in a data files by using database writer (DBWR) background process and likewise. If we talk about memory then we have memory to remember something which is happened, same like us, oracle has memory to remember or store something but it’s not permanent. If we talk about memory then we have memory to remember something which is happened, as we have memory to recollect our activities, similarly, oracle also has memory to remember or store its activities, but it’s not permanent. If you want to store some data permanently then oracle DBWR background process writes it in the data files and therefore data files are the actual database which contains all the permanent data. Every oracle database must have at least one data file to store data.
Therefore we
can conclude that oracle works same as we perform our activities. We can read
from textbook/notebooks or can write in notebooks, oracle also can do the same.
It can read data or write data from the data files which is the actual
database.
Internal process while connecting to
oracle database:-
Below is
the graphical example which will help to understand what exactly happens
internally when we try to connect to oracle database server:-
As per above
diagram, if C wants to go to D’s house then what are the things he
must know, first will be the name of D, second is address of D.
Address can
include Gate No., Room No. etc. C
can go by Walking, by Bike, by Bus, by Train or by any other Vehicle. After reaching
D’s home he meets D’s
gatekeeper and gatekeeper assists C where
he wish to go to. Similarly, if we want to connect to the oracle database, we
must know the IP address of the database server, Name of the Database, Port No.
on which database is operating, and off course the password. When any client
try to connect to the database (I am talking in both the cases, when both
client and database resides on different machines or same machine) by using
COMMAND PROMPT , TOAD, SQL DEVELOPER or any other tool (Similar to Bus, Bike
Train etc) it goes first to the listener. Now question is what is a listener?
Listener is a kind of gatekeeper for oracle who assists the entire connection
requests to connect to the database. For example, when I want to connect to the
database I will go to command prompt and type database name, password, it will
go to the listener to verify that the database name and password is correct, IP
address is correct, Port is opened etc. if yes, then it will allow me to
connect to the database otherwise it will throw error like if we specify wrong
name of the database then it will show you “ORA-12154: TNS:could not resolve
the connect identifier specified” or if you specify wrong user id or
password it will show “user id or password is wrong” error. Once I
connect to the database it will allow me to directly connect to the database
next time. For example, after connecting to the database, I want to fetch
(retrieve/select) data from employee table, I will counter the command and this
command will not go to listener, it will directly go the shared server (oracle
assistant, to handle multiple users at a time) and fetch the data. So the
listener will just show you the way and next time you can go directly to the
database.
So whenever
we try to connect to the database we must ensure that there is a entry in the
listener.ora file for that database and must specify the correct user name and
password while connecting from client.
Read Also:-
Read Also:-
No comments:
Post a Comment