Wednesday, May 6, 2015

Starting Up Database

Starting Up Database:


Steps to start the database:
sqlplus / as sysdba  -- login as sysdba.

after successfully login you need to start the database using startup command.

sql> Startup

After executing the command SGA will be allocated based on pfile/spfile values.
and finally database was started.


Database startup stages:

there are 3 stages in startup the database.

1. NOMOUNT STATE:
------------------ --------
"1. it will crate a file called alert log file.
 2. it contains all the database activities.
 3. it will be in diagnostics-dest.(destination).
 4. these are the things will be in the NOMOUNT stage this is called instance startup."

2. MOUNT STATE :
 -----------------------
It read the control file.
the control file location also be specified into pfile.
open the control file to obtain the name and location of data files and and redolog files.
Renaming data files will be done in this mount state.
in order to enable/disable archive log mode also will be happen in mount state.
Recovery also done in mount state.

3. OPEN STATE:
--------------------
in this stage it will check all the redo log and data-files are physically present or not.

Related views :
select status from v$instance;      --> to know the status of the instance

select name from v$database;      --> to know the database name.
select name from v$datafiles;      --> to know the data-file name and locations.
select member from v$logfiles;   --> to know the logfile name and locations.

No comments:

Post a Comment

Thanks for giving comments!!