Lock and Latch
Lock and Latch
Control file function Control file is the heart of database which contain:
The name of database
Date and time of the creation of database
All the meta data
when your script is executed we will find that our database is already up
and running, >
so first thing we started our database in nomount, >
then first thing our scrip does it create a control file and it transfer our
database into mount state >
then it creates all the datafiles and after creating all the datafile opens the
database
Metadata metadata refers to the data that describes the structure and properties
of the actual data within the database. It provides information about the
organization, storage, and manipulation of the data. In an Oracle
database, metadata includes various types of information
Table Definitions
View Definitions
Index Information
Stored Procedures and Functions
Trigger Definitions
User and Role Information
Database Objects and Relationships
Data Dictionary Views
System and Session Information
User Preferences
Database Parameters and Initialization Files
System Statistics
Data File Information
Redo Log Information
Control File Metadata
Dictionary Cache
Error in database There are certain tool like log file called alert log (If there is any error
occurs in database it will start writing into the file)
How will I monitor
database as DBA Cd /u01/app/oracle/rdbms/dev/dev/trace/ >>> ls -l
In the above directory there are .trc files are there. This file contain all
the information of errors in details
Location of Alart log Desc v$diag_info
It will not hamper your database but if there is any new error in database
it will create a new alert file
Lock situation in "lock situation" refers to a scenario where one session (or transaction)
oracle holds a lock on a resource (such as a table or a row) and another session
is trying to access or modify that same resource.
AND
To know the exact location of blocked session
Blocking
Blocking
Row-level Locks: These locks are placed on individual rows in a table. They
can be shared (multiple sessions can read the row simultaneously) or
exclusive (only one session can write to the row at a time)
Table-level Locks: These locks are placed on an entire table. They can also
be shared or exclusive. A shared table lock allows multiple sessions to
read from the table simultaneously, but only one session can write to the
table at a time with an exclusive table lock.
Finding out the 1.26
query due to which
session Blocking
happened
Dead lock situation A deadlock in Oracle occurs when two or more transactions are unable to
proceed because each is waiting for the other to release a lock on a
resource. This creates a circular dependency where none of the
transactions can proceed.
For example, consider two transactions:
1. Transaction A holds a lock on Resource X and needs a lock on
Resource Y.
2. Transaction B holds a lock on Resource Y and needs a lock on
Resource X.
In this situation, Transaction A cannot proceed because it's waiting for
Resource Y, which is locked by Transaction B. Similarly, Transaction B
cannot proceed because it's waiting for Resource X, which is locked by
Transaction A. This creates a deadlock.
note that the listener itself doesn't store any data. Its primary function is
to manage the connections between clients and the database instances.
Listener creation Listener should be created in $ prompt but environment must be created
ls-l
Create a clone of
your server