2.2. Database architechture ‐ Datafiles locations,parameter files locations ‐‐ sp and p files, startup processes, - sayanbhattacharya1234/Oracle_DBA GitHub Wiki

1. Location of the datafiles in database architechture

Oracle Base and Oracle Home

Oracle Base - Oracle base is the path that is used to store the binary files in databse. We can have multiple Oracle base location in one server. But the standard practice of oracle is to keep one oracle.

Oracle Home - Oracle home is the location where the Oracle application is installed.[ oracle version 12c , 19c etc. ] . We can have multiple Oracle home location in one server.

2. Location of the parameter/binary files

here under this location /u01/app/oracle/product/19.0.0/dbhome_1/dbs

the sp file [ spfileprod.ora ] and p file [ initprod.ora ] are located

if we write ' show spfile ' in SQL prompt we can see that as the database has already started with spfile.

We can't create it as the database has already started with spfile.

Now shutdown the database and start databse again then, we will see status is null as the spfile. It means my database has started with pfile not spfile.

The database would need to start at least either spfile or pfile .

Create spfile from pfile; If both spfile and pfile got deleted then we can create them from the memory as they exist in the database memory when it got started.

3. create pfile from spfile and view it

if p file is not there . for understand we remove the p file to this location. so pfile is not here

want to create p file .so in sql promt after database started " Create pfile from spfile; "

then in $ promt we check p file created. and we view the pfile. so " vi initprod.ora "

4. If Db is closed also we create spfile from pfile

Startup process:

Startup has got 3 processed

Startup nomount: In this state database server either search or read the parameter files [ sp file or pfile].By default server reads sp file , if spfile is not present then it reads p file and start. Then it create a black structure of SGA in memory. then it starts all background processes . if no file is exist then database will not started.

startup mount:

alter database mount : this state reads control file. Parameter has their path. From there it will read the control files. If the multiple control files has different contents then the database will also not start. From there the server learns that what data files are present in database as the control files has the metadata of the data files.

alter database open : in open state server reads the data files. If any data file is missing physically which are written in control file then it will also not start

parameter file location and control file locations