Sunday, 1 July 2018

Interview Q and A for Oracle Architecture Part - 3

191. What is ROWID?
The ROWID is a unique database-wide physical address for every row on every table. Once assigned (when the row is first inserted into the database), it never changes until the row is deleted or the table is dropped. The ROWID consists of the following three components, the combination of which uniquely identifies the physical storage location of the row. Oracle database file number, which contains the block with the rows. Oracle block address, which contains the row The row within the block (because each block can hold many rows). The ROWID is used internally in indexes as a quick means of retrieving rows with a particular key value. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID

192. What is Oracle Block? Can two Oracle Blocks have the same address?
Oracle "formats" the database files into a number of Oracle blocks when they are first created—making it easier for the RDBMS software to manage the files and easier to read data into the memory areas.
The block size should be a multiple of the operating system block size. Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block. This block header has a minimum size,but it can grow.
These Oracle blocks are the smallest unit of storage. Increasing the Oracle block size can improve performance, but it should be done only when the database is first created.
Each Oracle block is numbered sequentially for each database file starting at 1. Two blocks can have the same block address if they are in different database files.

193. Name the three major set of files on disk that compose a database in Oracle
There are three major sets of files on disk that compose a database. All the files are binary. These are Database files. Control files. Redo logs. The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one.

194. What is an Oracle Instance?
The Oracle system processes, also known as Oracle background processes, provide functions for the user processes—functions that would otherwise be done by the user processes themselves
Oracle database-wide system memory is known as the SGA, the system global area or shared global area. The data and control structures in the SGA are shareable, and all the Oracle background processes and user processes can use them. The combination
of the SGA and the Oracle background processes is known as an Oracle instance

195. What is Undo?
Oracle maintains information to nullify changes made to the database. Such information consists of records of the actions of transactions, collectively known as undo. Oracle uses the undo to do the following:
- Rollback an active transaction
- Recover a terminated transaction
- Provide read consistency
- Recovery from logical corruptions

196. What is AUM / SMU?
Automatic Undo Management(AUM) is introduced in Oracle 9i, which replaces the rollback segments. This is also called System Managed Undo(SMU) as the undo is managed by oracle. Automatic undo management is undo-tablespace based. You allocate space in the form of an undo tablespace, insteadof allocating many rollback segments in different sizes.
Oracle strongly recommends their customers to use Automatic Undo Management (AUM).

197. Which are the major initialization parameters that controls AUM?
UNDO_MANAGEMENT Initialization Parameter . UNDO_MANAGEMENT specifies which undo space management mode the system should use. When set to AUTO, theinstance starts in automatic undo management mode. In manual undo management mode, undo space is allocatedexternally as rollback segments.
By default, this parameter is set to MANUAL. Set this parameter to AUTO to enable automatic undo managementmode.
This is a static parameter and cannot be modified dynamically using alter system command. So if you wish to switch between Rollback Segments and AUM, then you need to restart the instance. In RAC, multiple instances must have the same value.
UNDO_TABLESPACE Initialization Parameter . When an instance starts up in automatic undo management mode, it attempts to select an undo tablespace for storage of undo data.
UNDO_RETENTION Initialization Parameter. This parameter specifies (in seconds) the low threshold value of undo retention.
The UNDO_RETENTION parameter can only be honored if the current undo tablespace has enough space. If an active transaction requires undo space and the undo tablespace does not have available space, then the system starts reusing unexpired undo space. This action can potentially cause some queries to fail with a "snapshot too old" message.
The amount of time for which undo is retained for the Oracle Database for the current undo tablespace can be obtained by querying the TUNED_UNDORETENTION column of the V$UNDOSTAT dynamic performance view.

198. How to set the undo_retention value ?
In case you are using Automatic tuning of undo retention (_undo_autotune=TRUE), The best way to set your undo retention is to determine the average value of maximum query length in your database as follow :
a. Let the database run without bounce for at least one week or more for your normal DB workload.
b. Run the following query to determine the average maximum query in your database and set undo_retention to that value.
SQL> select avg(maxquerylen) from v$undostat;
In case you are not using Automatic tuning of undo retention (_undo_autotune=FALSE), You will need to setundo_retention to a value larger than the maximum query length in your database.
NOTE: If you have very long running queries or you set undo_retention to large value, this will require/allocate large undo space. So it is highly recommended to tune your long running queries and set undo_retention to a reasonable value.

199. What is the Fast Ramp-up Routine ?
The concept of Fast Ramp-Up indicates the following: "In previous versions, when the instance was restarted or when you switched undo tablespaces, the ramp-up time for the system to grow the number of online undo segments could be several minutes. Generally, this time delay was unacceptable. After an instance startup or a switch of undo tablespaces in Oracle Database 10g, the database decides how many segments to place online, based on existing data stored in the AWR.
The algorithm to compute the # of undo segments to online for "Fast Ramp Up" is: Has the instance been up for more than 7 days?
Yes- use max(maxconcurrency) from v$undostat
No- Is this he first time this function is called?
Yes - Is there select_workload_repository function (SWRF) snaphot data?
No- online minimal # of undo segs
Yes- attempt to get the max(maxconcurrency) from wrh$_undostat for the last 7 days.
If we cannot find that information, attempt to get the max(rbscnt) from wrh$_rollstat
for the last 7 days.
Store the value in internal variable.
No- use an internal variable.
SMON decides on the # of undo segs to offline and drop based on the max transaction concurrency over a 12 hourperiod in 9i. This behavior is altered in 10g where the max concurrency is maintained over a 7-day period. Moreover,in 10g SMON doesn't drop the extra undo segs, but simply offlines them.
SMON uses the same values with "fast ramp up" to adjust the number of undo segments online.
The 10511 event is actually used as a workaround to avoid excessive onlines of undo segments.
The 10511 event does not skip "Fast Ramp Up", it only disables SMON's workload for undo segments. Once the 10511event is set, we leave all undo segments created at that point online.
With 10g, "Fast Ramp Up" avoids problems seen in earlier releases with waits/performance issues associated withSMON and undo segments.
The fast startup can be bypassed by setting following parameter in the parameter file: _rollback_segment_count=10
This will place 10 segments online at startup. You can change the value as per your requirement on undo segments.

200. How many Undo tablespaces can we have for a database?
We can have many undo tablespaces in a database, but only one can be Active per instance.
In Oracle Real Application Clusters (RAC) environment, we need to have one Active undo tablespace per instance. TheUNDO_TABLESPACE parameter will be used for assigning a particular undo tablespace to an instance.

201. How to switch to a new undo tablespace?
You can switch from using one undo tablespace to another. Because the UNDO_TABLESPACE initialization parameter isa dynamic parameter, the ALTER SYSTEM SET statement can be used to assign a new undo tablespace.
The following statement switches to a new undo tablespace:
ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02;
Assuming undotbs_01 is the current undo tablespace, after this command successfully executes, the instance usesundotbs_02 in place of undotbs_01 as its undo tablespace.
If any of the following conditions exist for the tablespace being switched to, an error is reported and no switchingoccurs:
The tablespace does not exist
The tablespace is not an undo tablespace
The tablespace is already being used by another instance (in a RAC environment only)
The database is online while the switch operation is performed, and user transactions can be executed while this command is being executed. When the switch operation completes successfully, all transactions started after the switch operation began are assigned to transaction tables in the new undo tablespace.
The switch operation does not wait for transactions in the old undo tablespace to commit. If there are any pending transactions in the old undo tablespace, the old undo tablespace enters into a PENDING OFFLINE mode (status) mode, existing transactions can continue to execute, but undo records for new user transactions cannot be stored in this undo tablespace.
An undo tablespace can exist in this PENDING OFFLINE mode, even after the switch operation completes successfully. APENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. Eventually, after all active transactions have committed, the undo tablespace automatically goes from the PENDING OFFLINE mode to the OFFLINE mode. From then on, the undo tablespace is available for other instances (in an Oracle Real Application Cluster environment).
If the parameter value for UNDO TABLESPACE is set to '' (two single quotes), then the current undo tablespace is switched out and the next available undo tablespace is switched in. Use this statement with care because there may be no undo tablespace available.
The following example unassigns the current undo tablespace:
ALTER SYSTEM SET UNDO_TABLESPACE = '';

202. What is UNDO Retention?
Undo Retention refers to duration of retaining the undo data after a transaction. After a transaction is committed, undo data is no longer needed for rollback or transaction recovery purposes. However, for consistent read purposes, long-running queries may require this old undo information for producing older images of data blocks. Furthermore, the success of several Oracle Flashback features can also depend upon the availability of older undo information. For these reasons, it is desirable to retain the old undo information for as long as possible.
Automatic undo management eliminates the complexities of managing rollback segment space and lets you exert control over how long undo is retained before being overwritten.
You can set the UNDO_RETENTION parameter to a low threshold value so that the system retains the undo for at least the time specified in the parameter.

203. What is Automatic UNDO Retention (10g New Feature)? Explain.
There is no parameter for this, Automatic UNDO Retention is enabled by default in 10g.
In Oracle Database 10g when automatic undo management is enabled, there is always a current undo retention period, which is the minimum amount of time that Oracle Database attempts to retain old undo information before overwriting it - Which means the undo information for committed transactions can be overwritten. The database collects usage statistics and tunes the undo retention period based on these statistics and on undo tablespace size.
Oracle Database automatically tunes the undo retention period based on undo tablespace size and system activity. You can specify a minimum undo retention period (in seconds) by setting the UNDO_RETENTION initialization parameter. The database makes its best effort to honor the specified minimum undo retention period, provided that the undo tablespace has space available for new transactions
The current value for tuned undo retention can be viewed by following query.
SELECT TO_CHAR(BEGIN_TIME, 'MM/DD/YYYY HH24:MI:SS') BEGIN_TIME, TUNED_UNDORETENTION FROM V$UNDOSTAT;
For AUTOEXTEND undo tablespaces, the system retains undo for at least the time specified in this parameter, and automatically tunes the undo retention period to satisfy the undo requirements of the queries.
This could lead to excessive undo generation, to honor undo retention For fixed- size undo tablespaces, the system automatically tunes for the maximum possible undo retention period, based on undo tablespace size and usage history, and ignores UNDO_RETENTION unless retention guarantee is enabled.
Automatic tuning of undo retention is not supported for LOBs. Because we don't store any undo information in undo tablespace for transactions on LOBs.

204. Why TUNED_UNDORETENTION is calculated so high making undo space grow fast ?
When non-auto extensible undo space is used, tuned_undoretention is calculated based on a percentage of the undotablespace size. In some cases especially with large undo tablespace, This will make it to be calculated so large.To fix this behaviour, Set the following instance parameter:
_smu_debug_mode=33554432With this setting, TUNED_UNDORETENTION is not calculated based on a percentage of the fixed size undo tablespace. Instead it is set to the maximum of (MAXQUERYLEN secs + 300) and UNDO_RETENTION.

205. What is Guaranteed UNDO Retention? Explain.
Oracle Database 10g lets you guarantee undo retention. In Oracle 10g Release 2, you can enable and disable undo retention. When you enable this option, the database never overwrites unexpired undo data. That is undo data whose age is less than the undo retention period.
This option is disabled by default, which means that the database can overwrite the unexpired undo data to avoid failure of DML operations if there is not enough free space left in the undo tablespace.
By enabling the guarantee option, you instruct the database not to overwrite unexpired undo data even if it means risking failure of currently active DML operations. Therefore, use caution when enabling this feature. To enable do the following against the undo tablespace.
ALTER TABLESPACE UNDOTBS RETENTION GUARANTEE;
A typical use of the guarantee option is when you want to ensure deterministic and predictable behavior of Flashback Query by guaranteeing the availability of the required undo data.

206. Explain V$UNDOSTAT, and usage?
This view is a replacement / enhancement for V$ROLLSTAT.This view contains statistics for monitoring and tuning undo space. Use this view to help estimate the amount of undospace required for the current workload. The database also uses this information to help tune undo usage in thesystem. This view is meaningful only in automatic undo management mode.
The V$UNDOSTAT view is useful for monitoring the effects of transaction execution on undo space in the currentinstance. Statistics are available for undo space consumption, transaction concurrency, the tuning of undo retention,and the length and SQL ID of long-running queries in the instance.
Each row in the view contains statistics collected in the instance for a ten-minute interval. The rows are in descendingorder by the BEGIN_TIME column value. Each row belongs to the time interval marked by (BEGIN_TIME, END_TIME).Each column represents the data collected for the particular statistic in that time interval.
SELECT TO_CHAR(BEGIN_TIME, 'MM/DD/YYYY HH24:MI:SS') BEGIN_TIME,TO_CHAR(END_TIME, 'MM/DD/YYYY HH24:MI:SS') END_TIME,UNDOTSN, UNDOBLKS, TXNCOUNT, MAXCONCURRENCY AS "MAXCON",MAXQUERYLEN, TUNED_UNDORETENTIOFROM v$UNDOSTAT;
The following table explains other useful columns of V$UNDOSTAT view
UNXPSTEALCNT The number of attempts when unexpired blocks were stolen from other undo segments to satisfy spacerequests
UNXPBLKRELCNT The number of unexpired blocks removed from undo segments to be used by other transactions
UNXPBLKREUCNT The number of unexpired undo blocks reused by transactions
EXPSTEALCNT The number of attempts when expired extents were stolen from other undo segments to satisfy a spacerequests
EXPBLKRELCNT The number of expired extents stolen from other undo segments to satisfy a space request
EXPBLKREUCNT The number of expired undo blocks reused within the same undo segments
SSOLDERRCNT The number of ORA-1555 errors that occurred during the interval
NOSPACEERRCNT The number of Out-of-Space errors
When the columns UNXPSTEALCNT through EXPBLKREUCNT hold non-zero values, it is an indication of space pressure.
If the column SSOLDERRCNT is non-zero, then UNDO_RETENTION is not properly set.
If the column NOSPACEERRCNT is non-zero, then there is a serious space problem.
In 10g DBA_HIST_UNDOSTAT view contains statistical snapshots of V$UNDOSTAT information.
Note: If the parameter _undo_autotune=FALSE, there will be no data generated in table X$KTUSMST2 which is thesource table of view dba_hist_undostats

207. Explain the DBA_UNDO_EXTENTS View, and usage?
DBA_UNDO_EXTENTS describes the extents comprising the segments in all undo tablespaces in the database. This view shows the status and size of each extent in the undo tablespace.

208. What are the various statuses for Undo Extents? Explain.
Transaction Status of the undo in the extent can be any of the following:
SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*) FROM DBA_UNDO_EXTENTS GROUP BY STATUS;
ACTIVE - Undo Extent is Active, Used by a transaction.
EXPIRED - Undo Extent is expired (Exceeded the Undo Retention).
UNEXPIRED - Undo Extent will be required to honor UNDO_RETENTION.

209. Explain V$TRANSACTION, and usage?
V$TRANSACTION lists the active transactions in the system.
(a) The following columns together points to a transaction. (ie) The combination of the following should give uniquetransaction id for that database.
XIDUSN - Undo segment number
XIDSLOT - NUMBER Slot number
XIDSQN - NUMBER Sequence number
(b) The following columns explains the number of undo blocks / undo records used per transaction.
USED_UBLK - Number of undo blocks used
USED_UREC - Number of undo records used
In the case of transaction rollback, the above columns will give estimation about the number of undo blocks that needs to be rolled back.
The number of undo records and undo blocks (USED_UREC and USED_UBLK) decrease while the transaction is rolling back. When they reach 0, the transaction disappears from v$transaction.
The following query can be used to monitor the transaction rollback.
SELECT A.SID, A.USERNAME, B.XIDUSN, B.USED_UREC, B.USED_UBLKFROM V$SESSION A, V$TRANSACTION BWHERE A.SADDR=B.SES_ADDR;
(c) The STATUS following column explains the status of a transaction.
ACTIVE - Explains the transaction is active.
Before performing a normal/transactional shutdown, we can check this view to understand if we have any ACTIVEtransactions.
SELECT XIDUSN, XIDSLT, XIDSEQ , SES_ADDR, STATUS FROM V$TRANSACTION;

210. Explain DBA_ROLLBACK_SEGS, and usage?
This view explains the various status of Undo Segments. In RAC, we can also see the Instance number, and its associated tablespaces.
SELECT INSTANCE_NUM,TABLESPACE_NAME,SEGMENT_NAME,STATUS FROM DBA_ROLLBACK_SEGS;
In AUM DBA's don't have privileges to offline/online undo segments. And this is controlled by SMON process. So this will be useful only in few scenarios, where we have internal errors with undo segments.

211. Do we have scripts to monitor the undo growth/usage of the database?
To understand the free space with undo tablespace.
SELECT SUM(BYTES) FROM DBA_FREE_SPACE WHERE TABLESPACE_NAME='&UNDOTBS';
To understand state of the extents, space-used in the current undo tablespace.
SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*)FROM DBA_UNDO_EXTENTS GROUP BY STATUS;
To understand the no of active transactions and its undo usage.
SELECT XIDUSN, XIDSLOT, XIDSQN, USED_UBLK FROM V$TRANSACTION WHERE STATUS='ACTIVE' ;

212. What are the possible causes for excessive undo growth?
There could be various causes for excessive undo growth. To start the diagnosis we need to understand the following.
Transactions with huge undo It is obvious to see high undo usage when there are huge transactions. If that is going to be the case this growth should be expected behavior.
UNDO RETENTION   Higher undo retention will cause higher undo growth. Because we won't mark the undo extents as EXPIRED till theduration of undo retention.
Disabling auto extend on datafiles of active undo tablespace will reuse the UNEXPIRED extents when it has spacecrunch. It is a trade-off between undo retention and undo space. If you wish to satisfy Undo Retention, switch on auto extend in undo tablespace datafiles.
SELECT FILE_ID, AUTOEXTENSIBLE FROM DBA_DATA_FILES WHERETABLESPACE_NAME='&UNDOTBS';
To make those datafile auto extensible, run the following command.
ALTER DATABASE DATAFILE '&FILE_ID' AUTOEXTEND ON;
If you wish to switch off auto extend and to reuse the UNEXPIRED space, do the following
ALTER DATABASE DATAFILE '&FILE_ID' AUTOEXTEND OFF;
State of undo extents
The status of the undo extents needs to be closely monitored.
There are few bugs with different releases where EXPIRED extents are not being reused.
If good number of extents in UNEXPIRED status, it could be due to high undo_retention.
SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*)FROM DBA_UNDO_EXTENTS GROUP BY STATUS;
There are few bugs associated with undo usage,

213. How to resize the undo datafile?
It is possible to increase an undo datafile. For example, to increase the undo datafile size from 2000 MB to 3000MB we can do the following ALTER DATABASE DATAFILE 39 RESIZE 3000M;
But it may not be possible to resize to lesser value, when a undo datafile got auto extended to higher value. Even after the transactions are completed those undo extents will remain in EXPIRED status.
As the blocks are being used by undo extents, oracle will not allow you to resize

214. Can the Undo Tablespace be set to Autoextend?
It should be noted that by default Oracle will not auto extend the undo tablespace unless in GUARANTEE mode, as extending the undo tablespace is an expensive operation and would lock all undo segments in the database. This would thereby effectively hang the database, and so the default is to re-use all unexpired undo extents first which can therefore result in ORA-1555 errors when customers expect the tablespace to have auto extended.

215. What is In Memory Undo?
In Oracle 10g and higher, some of the top level DML's were performed in memory without any disk undo data. Which is termed as In Memory Undo (IMU). This can be controlled by an Underscore Parameter.

216. What is difference between oracle SID and Oracle service name?
Oracle SID is the unique name that uniquely identifies your instance/database where as the service name is the TNS alias can be same or different as SID.

217. What are the steps to install oracle on Linux system? List two kernel parameter that effect oracle installation?
Initially set up disks and kernel parameters, then create oracle user and DBA group, and finally run installer to start the installation process. The SHMMAX & SHMMNI two kernel parameter required to set before installation process.

218. What are bind variables?
With bind variable in SQL, oracle can cache queries in a single time in the SQL cache area. This avoids a hard parse each time, which saves on various locking and latching resource we use to check object existence and so on.
219. What is the difference between data block/extent/segment?
A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.

220. What is the difference between PGA and UGA?
When you are running dedicated server then process information stored inside the process global area (PGA) and when you are using shared server then the process information stored inside user global area (UGA).

221. What is the difference between SMON and PMON processes?
SMON (System Monitor) performs recovery after instance failure, monitor temporary segments and extents; clean temp segment, coalesce free space. It is mandatory process of DB and starts by default.
PMON (Process Monitor) failed process resources. In shared server architecture monitor and restarts any failed dispatcher or server process. It is mandatory process of DB and starts by default.

222. What is a system change number (SCN)?
SCN is a value that is incremented whenever a dirty read occurs.
SCN is incremented whenever a deadlock occurs.
SCN is a value that keeps track of explicit locks.
SCN is a value that is incremented whenever database changes are made.

223. What is the main purpose of ‘CHECKPOINT’ in oracle database? How do you automatically force the oracle to perform a checkpoint?
 A checkpoint is a database event, which synchronize the database blocks in memory with the datafiles on disk. It has two main purposes: To establish a data consistency and enable faster database Recovery.
The following are the parameter that will be used by DBA to adjust time or interval of how frequently its checkpoint should occur in database.
LOG_CHECKPOINT_TIMEOUT = 3600;  # Every one hour
LOG_CHECKPOINT_INTERVAL = 1000; # number of OS blocks.

224. What happens when we fire SQL statement in Oracle?
First it will check the syntax and semantics in library cache, after that it will create execution plan. If already data is in buffer cache it will directly return to the client. If not it will fetch the data from datafiles and write to the database buffer cache after that it will send server and finally server send to the client.

225. What is the use of large pool, which case you need to set the large pool?
You need to set large pool if you are using: MTS (Multi thread server) and RMAN Backups. Large pool prevents RMAN & MTS from competing with other sub system for the same memory. RMAN uses the large pool for backup & restore when you set the DBWR_IO_SLAVES or BACKUP_TAPE_IO_SLAVES parameters to simulate asynchronous I/O. If neither of these parameters is enabled, then Oracle allocates backup buffers from local process memory rather than shared memory. Then there is no use of large pool.

226. What does database do during the mounting process?
While mounting the database oracle reads the data from controlfile which is used for verifying physical database files during sanity check. Background processes are started before mounting the database only.

227. What are logfile states?
“CURRENT” state means that redo records are currently being written to that group. It will be until a log switch occurs. At a time there can be only one redo group current.
If a redo group containing redo’s of a dirty buffer that redo group is said to be ‘ACTIVE’ state. As we know log file keep changes made to the data blocks then data blocks are modified in buffer cache (dirty blocks). These dirty blocks must be written to the disk (RAM to permanent media).
And when a redolog group contains no redo records belonging to a dirty buffer it is in an "INACTIVE" state. These inactive redolog can be overwritten.
One more state ‘UNUSED’ initially when you create new redo log group its log file is empty on that time it is unused. Later it can be any of the above mentioned state.

228. Why do you run orainstRoot and ROOT.SH once you finalize the Installation?
orainstRoot.sh needs to be run to change the Permissions and groupname to 770 and to dba.
Root.sh (ORACLE_HOME) location needs to be run to create a ORATAB in /etc/oratab or /opt/var/oratab in Solaris and to copy dbhome, oraenv and coraenv to /usr/local/bin.
orainstRoot.sh
[root@oracle11g ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete
root.sh
[root@oracle11g ~]# /u01/app/oracle/product/11.1.0/db_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
For Oracle installation on unix/linux, we will be prompted to run a script 'root.sh' from the oracle inventory directory. this script needs to run the first time only when any oracle product is installed on the server. 
It creates the additional directories and sets appropriate ownership and permissions on files for root user.
 File type
Extension
Default  location (when created with OMF)
Pfile :
ORA
C:\oracle\product\10.2.0\admin\orcl\pfile
Spfile:
ORA
C:\oracle\product\10.2.0\db_1\database
Control file:  
CTL
C:\oracle\product\10.2.0\oradata\orcl
Redo log file:
LOG
C:\oracle\product\10.2.0\oradata\orcl
Archive log file:
LOG
C:\oracle\product\10.2.0\flash_recovery_area\ORCL\ARCHIVELOG
Data file:
DBF
C:\oracle\product\10.2.0\oradata\orcl
Alert log files:
LOG
C:\oracle\product\10.2.0\admin\orcl\adump
Trace log files:
TRC
C:\oracle\product\10.2.0\admin\orcl\udump|bdump|cdump
Password file: 
ORA
C:\oracle\product\10.2.0\db_1\database

229. What is oraInventory ?
oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format & called as binary Inventory. There are basically two kind of inventories,
One is Local Inventory (also called as Oracle Home Inventory) and other is  Global Inventory (also called as Central Inventory).

230. What is Global Inventory ?
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventoryPlease note if you have multiple global Inventory on machine check all oraInventory directories)
You will see entry like
HOME NAME=”ORA10g_HOME” LOC=”/u01/oracle/10.2.0/db” TYPE=”O” IDX=”1?/


No comments:

Post a Comment