**CONTROLFILE**
To move from nomount to mount state we require a controlfile.
controlfile is used to mount the database.
mounting means identifying the location of datafiles and redologfiles.
controlfile is a binary file.
size of the contrilfile is very small when comparing to datafiles and redologfiles.
controlfile is very crucial file which contains the information to control the entire database behaviour.
controlfile contains below information
--database name
--database creation of timestamp
--physical location of datafiles
--physical location of Redologfiles
--status of redologfiles
--status of datafiles
.--Archivelog mode information
--Log sequence number(LSN)
--Flashback mode information
--character set information
--RMAN backup information
--current scn imformation
--checkpoint scn
--controlfile scn
--stop scn it is zero value.
oracle will automatically update the controlfile for every structural change inside the database.
controlfile will be updated for every one second with latest scn number that is current scn number.
we can create controlfile 2 ways
By command create database
By syntax create controlfile.
Intially controlfile has to be create syntax SQL>create database ranidatafile '/E/rani/system.dbf' size 100msysaux datafile '/E/rani/sysaux.dbf' size 100mlogfilegroup 1 ('/E/rani/redolog.log) size 10m,group 2 ('/E/rani/redolog2.log) size 10mundo tablespace undotbs1 datafile '/E/rani/undotbs1.dbf'size 20m;In startup nomount to open the database.
controlfile is used to mount the database.
mounting means identifying the location of datafiles and redologfiles.
controlfile is a binary file.
size of the contrilfile is very small when comparing to datafiles and redologfiles.
controlfile is very crucial file which contains the information to control the entire database behaviour.
controlfile contains below information
--database name
--database creation of timestamp
--physical location of datafiles
--physical location of Redologfiles
--status of redologfiles
--status of datafiles
.--Archivelog mode information
--Log sequence number(LSN)
--Flashback mode information
--character set information
--RMAN backup information
--current scn imformation
--checkpoint scn
--controlfile scn
--stop scn it is zero value.
oracle will automatically update the controlfile for every structural change inside the database.
controlfile will be updated for every one second with latest scn number that is current scn number.
we can create controlfile 2 ways
By command create database
By syntax create controlfile.
Intially controlfile has to be create syntax SQL>create database ranidatafile '/E/rani/system.dbf' size 100msysaux datafile '/E/rani/sysaux.dbf' size 100mlogfilegroup 1 ('/E/rani/redolog.log) size 10m,group 2 ('/E/rani/redolog2.log) size 10mundo tablespace undotbs1 datafile '/E/rani/undotbs1.dbf'size 20m;In startup nomount to open the database.
TO KNOW LOCATION OF CONTROLFILES
SQL>select name from v$controlfile;
SQL>select status from v$instance;
SQL>select name from v$database;
once database created using manual procedure as a DBA
we need to create static datadictionary metadata tables.
Metadata tables oracle classified into 2 types.
**DYNAMIC PERFORMENCE VIEWS
**STATIC DATA DICTIONARY VIEWS.
DYNAMIC PERFORMENCE VIEWS:
These views will be created automatically by the oracleAll these views begins with 'v$'in case of RAC 'Gv$'
These views can be access in three different steps nomount,mount,openThese views can only be accessed by sys userResult data in the dynamic performence views change from one stage to stage that's reason these are called Dynamic performence
view.ex:v$instance,v$database,v$controlfile.
STATIC DATA DICTIONARY VIEWS.
These tables can be accessed when database open completely.
These tables will have an prefix DBA_,ALL_,USER_All tables which are begins with 'dba_' can only access by sys user.
The tables which are begin with 'user_' can be accessed by Normal user.
when user query all_ oracle gives the information which is only belongs to particular useras well as other information.
without the static datadictionary tables DBA cannot perform database administration task inside a database.
To create static datadictionary tables we need to run below scripts.
SQL>start?/rdbms/admin/catalog.sql
SQL>start?/rdbms/admin/catproc.sql
SQL>conn system/manager
SQL>start?/sqlplus/admin/pupbld.sql
(profiles owned by system user only)
NOTE:AS PER 10G
4000+ METADATATABLES 11G 5000+ METADATATABLES 12C 6000+ METADATATABLES
NOTE: This 3 scripts all together will create static datadictionary views and synonyms for those views based on base tables.we can view like controlfile only strings location of controlfile path and name.