Few Basics from architecture part for ORACLE DBA

Diffrence between Nomount,mount,open

Nomount – The database instance has been started (processes and memory structures have been allocated, but control file is not yet accessed).
Mount – Instance has accessed the control file, but has not yet validated its entry or accessed the datafiles.
Open – Instance has validated the entries in the control files and is accessing the datafiles – it is now open for business.
The startup process is Nomount -> Mount -> Open.

Diffrence Between listener.ora and tnsname.ora

******************************************

Oracle acts as a Client-Server software. That means you have two main ends, the Client who must somehow get to the server, and the server who must accept connexion requests from clients.

When the client attempts to connect to the server, you give him a "Service". The service is mainly 4 info: Host for the server, Protocol and port (the language to speak) ad SID (name of the instance/database). Those 4 infos are usually and by default locates in a tnsnames.ora. This is called: Translation Named Server - errrrrr Service - errrr Ser* :)

On the server side you must have one or more active processes (daemons) who are waiting for the client to attempt a connection. Those services are called Listeners. In most cases only one listener is required. This listener is configured via a listener.ora file. This file includes the process config, mainly: Host for which it listens, protocol and port, list of SID for which the process can establish a connexion.

Furthermore, if you're connecting to the database on the server computer, and it's the default database, you don't need to tell where you're going when you're the client. Default Database. You don't even need to have a listener.

***********************************************************************************


 Diff between sqlnet & tnsnames.ora

******************************

>
This tnsnames.ora file is a configuration file that contains net service names mapped to connect descriptors for the local naming method, or net service names mapped to listener protocol addresses.


sqlnet.ora:
>
The sqlnet.ora file is the profile configuration file. It resides on the client machines and the database server. Profiles are stored and implemented using this file. The database server can be configured with access control parameters in the sqlnet.ora file. These parameters specify whether clients are allowed or denied access based on the protocol.


Diffrence between PMON and SMON


Eduardo LegattiExplorer

Process Monitor (PMON): If a background process fails, the PMON process performs the cleanup operations by performing the following tasks:
• Rolls back the user’s current transaction
• Releases all the locks that are held on tables or rows
• Frees other resources used by the users
• Restarts the dead dispatcher

System Monitor (SMON): If an Oracle instance crashes, any changes that are made in the SGA are not written to the data files. When you restart the instance, the SMON background process automatically performs instance recovery by performing the following tasks:
• Rolling forward changes that are made in the online redo log files but not in the data files. Since all the committed transactions are written to the online redo log files, these are successfully recovered as result of rolling forward changes from the online redo log files to the data files.
• Opening the database. After the database is opened, users can log on and access any data that is not locked by un-recovered transaction.
• Rolling back all the uncommitted transactions.

When a transaction reads or writes information to the database, this occurs in memory. The Oracle memory structure that holds the blocks of data is called the Buffer Cache. So a transaction that performs an INSERT, UPDATE or DELETE operation will modify the block in the buffer cache. Periodically, Oracle flushes the changes in the cache to disk. This is done so that when the database is terminated (normally or abnormally), changes to data will be there when the instance is started again. The activity of writing changed blocks to disk is called a "checkpoint."
PMON and SMON are two required background processes. PMON is the Process Monitor which is responsible for recovering processes when the user process fails. PMON does the process cleanup. SMON is the System Monitor which is responsible for recovering the system after a failure.

What is archive log file?

• In archive log mode, the database will makes archive of all redo log files that are filled, called as archived redo logs or archive log files.

• By default your database runs in NO ARCHIVE LOG mode, so we can’t perform online backup’s (HOT backup).
• You must shut down database to perform clean backup (COLD backup) and recovery can be done to the previous backup state.
• Archive log files are stored in a default location called FRA (Flash Recovery Area).
• We can also define our own backup location by setting log_archive_dest parameter.

Comments

Popular Posts