Monday, 7 November 2016

ORACLE DATABASE ARCHITECTURE

ORACLE DATABASE  ARCHITECTURE:
·        Oracle database is a combination of oracle instance and datafiles on the file system.
·     Oracle instance is the combination of SGA and background process.with the help of instance only    we can acess the database objects.without database instance have no meaning.

What is Database?
Database is the collection of oraganized data.every running oracle database is assosciated with oracle instance.database consists of 2 phases.
                        1)logical phase--->objects-->tables
                        2)physical phaseàfiles-->filesystem-->os--->devicedrivers(harddisk)
                                                                        1)controlfiles
                                                                        2)redolog files
                                                                        3)datafiles
                                                                        4)archive redo log files(optional)
·        The purpose of physical phase is for storing
·        The purpose of logical phase is to access the database.

SGA: [System global area or shared global area]

When instance startsup memory structure called SGA is allocated.The total memory allocated to the oracle database can be broadly categorized into SGA and PGA[program global area].
SGA contains following data structure:
 1)DBBC[database buffer cache]
2)shared pool.
3)RLBC[redolog buffer cache]
4)Java Pool
5)large pool
6)streams pool
SGA can be categorized into 2 types:
1)Fixed SGA:- is a component of the SGA that varies in size from platform to platform and release to release. The size of the fixed SGA is something over which we have no control and it is generally very small.we cannot alter the size of fixed SGA.
2)Variable SGA:- Variable SGA contains 4 main components as listed above, those are “Database Buffer Cache”, “Redo Log Buffer”, “Shared Pool” and “Large Pool”. We call it variable SGA because we can alter the size of each of these components manually using ALTER SYSTEM command. The size of each of the components of variable SGA is determined by INIT.ORA parameters. Following are the INIT.ORA parameter for each of the component.
Database Buffer Cache – db_block_buffers
Redo Log Buffer – log_buffer
Shared Pool – shared_pool_size
Large Pool – Large_pool_size

Database Buffer Cache – This is used to hold the data into the memory. When ever a user access the data, it gets fetched into database buffer cache and it will be managed according to LRU (Least recently used) algorithm. Advantages – If a user is requesting data, which gets fetched into the buffer cache, then next time if he ask for same data with in a short period of time, the data will be read from buffer cache and Oracle process does not have to fetch data again from disk. Reading data from buffer cache is a faster operation. Another advantage is that if a user is modifying the data, it can be modified in the buffer cache which is a faster operation then modifying the data directly on the disk.

Redo Log Buffer – This memory block hold the data which is going to be written to redo log file. Why do we need this data? To rollback the changes if the need be. But instead of writing the data directly to the redo log files, it is first written to log buffer which improves performance and then with the occurrence of certain event it will be written to redo log file.

Shared Pool – This contains 2 memory section, 1) Library Cache 2) Dictionary Cache. Library cache hold the parsed SQL statement and execution plans and parsed PLSQL codes. Dictionary cache hold the information about user privileges, tables and column definitions, passwords etc. These 2 memory components are included in the size of shared pool.

Large Pool – If defined then used for heavy operations such as bulk copy during backup or during restore operation.
The total size of SGA is determined by a parameter SGA_MAX_SIZE. Below is the simple calculation of memory sizes.
SQL> show sga
Total System Global Area  577574308 bytes
Fixed Size                   452004 bytes
Variable Size             402653184 bytes
Database Buffers          163840000 bytes
Redo Buffers               10629120 bytes

This will show fixed and variable size SGA. Fixed size SGA, as I said is not in our control. However we can verify the size of variable SGA and other memory values shown above.
Database Buffers          163840000 bytes
SQL> show parameters db_block_buffer
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_block_buffers                     integer     20000

This value is in terms of blocks. we can find the size of a block using DB_BLOCK_SIZE parameter
SQL> show parameters db_block_size
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_block_size                        integer     8192
So Database Buffers = db_block_buffers X db_block_size = 20000 X 8192 = 163840000 bytes
Also Variable size = “Shared Pool Size” + “Large Pool Size” + “Java Pool size” (some times defined)
SQL> SELECT pool, sum(bytes) from v$sgastat group by pool;
POOL        SUM(BYTES)
java pool     50331648
shared pool  352321536

PGA:-[program global area]   sga is allocated when oracle instance startsup
And PGA is allocated when server process startsup.

BACKGROUND PROCESSES:   will starts when oracle instance startsup.

1)SMON:[system monitor]

The system monitor process (SMON) performs recovery, if necessary, at instance startup. SMON is also responsible for cleaning up temporary segments that are no longer in use and for coalescing contiguous free extents within dictionary managed tablespaces. If any terminated transactions were skipped during instance recovery because of file-read or offline errors, SMON recovers them when the tablespace or file is brought back online. SMON checks regularly to see whether it is needed. Other processes can call SMON if they detect a need for it.

2)PMON:[process monitor]

The process monitor (PMON) performs process recovery when a user process fails. PMON is responsible for cleaning up the database buffer cache and freeing resources that the user process was using. For example, it resets the status of the active transaction table, releases locks, and removes the process ID from the list of active processes.
PMON periodically checks the status of dispatcher and server processes, and restarts any that have stopped running (but not any that Oracle has terminated intentionally). PMON also registers information about the instance and dispatcher processes with the network listener.
Like SMON, PMON checks regularly to see whether it is needed and can be called if another process detects the need for it.

3)LGWR[log writer]

The log writer process (LGWR) is responsible for redo log buffer management.writing the redo log buffer to a redo log file on disk. LGWR writes all redo entries that have been copied into the buffer since the last time it wrote.

4)DBWN[database writer]

The database writer process (DBWn) writes the contents of buffers to datafiles. The DBWn processes are responsible for writing modified (dirty) buffers in the database buffer cache to disk. Although one database writer process (DBW0) is adequate for most systems, you can configure additional processes (DBW1 through DBW9) to improve write performance if your system modifies data heavily.

5)CKPT[check point]

When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn always performs that work.

6)RECO[recoverer]

The RECO process is present only if the instance permits distributed transactions and if the DISTRIBUTED_TRANSACTIONS parameter is greater than zero. If this initialization parameter is zero, RECO is not created during instance startup.

7)ARCN[archiver process]

The archiver process (ARCn) copies online redo log files to a designated storage device after a log switch has occurred. ARCn processes are present only when the database is in ARCHIVELOG mode, and automatic archiving is enabled.
An Oracle instance can have up to 10 ARCn processes (ARC0 to ARC9). The LGWR process starts a new ARCn process whenever the current number of ARCn processes is insufficient to handle the workload. The ALERT file keeps a record of when LGWR starts a new ARCn process.


1)startup and shutdown modes?

STARTUP MODES:
         
1)nomount--->instance creation-->oracle is going to read the p-file[parameter file].from the parameter file it will find how much is the memory allocation for SGA and it will allocate those memory structure and background process will be created.instartup nomount we can modify the controlfile.

2)mount----->instance will read the controlfile and locates the datafiles and redologfiles.in mount we can rename datafiles,enable or disable archive redolog,full database recovery.

 3)open------->it will open the datafiles and redologfiles.if the database is in mount state.we can open by alter database open;

SHUTDOWN MODES:

1)normal shutdown---->during normal shutdown before the oracle database is shutdown oracle will wait for all the active users to disconnect their sessions.As the parameter name suggests use this option to shutdown the database under normal conditions.
            
2)shutdown immediate---->during shutdown immediate before the oracle database is shutdown oracle will rollback active transaction and disconnect all active users.use this option  when there is a problem with your database and you dont have enough time to request users to log off.
           
3)shut abort---->during shut abort before the the oracle database is shutdown all user sessions will be terminated immediately.uncommited transactions will not be rolledback.use this                 option only during emergency situations when the shutdown and shut immmediate does not work.
           
2)what happens in background when we enter select statement?
user process cannot directly interact with the instance.so user process will send to server process.server process makes use of data dictionary cache.the data dictionary cache will check whether the user has the proper privileges are not.If the user has the proper privileges the pl/sql statements by the user will send to library cache.the parsing of sql and pl/sql statements are done in shared pool.parsing is of two types
            1)hard parsing--->if the statement is executing for the first time.
            2)soft parsing--->if the statement is not there it will fetch from dbf.
parsing consists of 3 steps
            1)syntax check-->it will check whether the statement by the user is correct or not it will check.
            2)schemantic check-->it will check whether the user has proper privilges to access the table or not.
            3)hash value generation-->hash value is created on the basis of adding all the ASCII values of the statement.it is stored in cursor.and then there is an execution plan that also made             for each sql statement which is also created by optimizer.optimizer generates n number of execution plan among them it will take the best execution plan which consumes less system             resources.
this execution plan will be stored in library cache and goes TO dbbc if it is not there it will fetch from userdata1,dbf and sends to userprocess.

TABLESPACES and DATAFILES:
Tablespaces:- An Oracle database consists of at least two logical storage units called tablespaces, which collectively store all of the database's data. You must have the SYSTEM and SYSAUX tablespaces and a third tablespace, called TEMP, is optional.

Datafiles:- Each tablespace in an Oracle database consists of one or more files called datafiles.datafiles contains actual business data.The extensions for datafiles is .dbf. The size of datafile will be in MB’S or GB’S depends up on the company.

Controlfiles:-
It contains the crucial information of the database.i.e
1)database name.
2)timestamp of db creation.
3)names and locations of assosciated datafiles and redologfile.
4)datafile offline ranges.
5)the log history.
6)archive log information.
7)backup set and backup piece information.
8)backup datafile and redologfile information.
9)datafile copy information.
10)the current log scn.[system change number-A SCN is a logical,internal time stamp used by oracle db.every transaction has a scn.for example if a transaction updates a row then database records the SCN at which this update occurred.]

Redologfiles:-
it contains the latest transactions for recovery.
Restore--->getting yesterdays data.
Recovery--->getting todays data.
The extension for redologfile is .log.

The size of redologs is in mb’s.The redologfiles are used to recover the database in the event of application program failures,instance failures and other minor failures.                                   

Wednesday, 2 November 2016

SQL*LOADER

sqlloader loads data from external files into tables of an oracle database.we use sqlloader to load data from multiple datafiles during the same load session,loads data into multiple tables during the same load session,load data from disk,tape or named pipe.It will be in the location of

                    [subbu@subbuapps bin]$ ls sqlldr
                             sqlldr
                    [subbu@subbuapps bin]$ pwd
                    /u01/app/subbu/product/11.2.0.4/bin


USING SQL loader:-

steps:- 1)create a flat file(eg .dat file)
           
            [subbu@subbuapps ~]$ vi product.dat
           
             100,kkk,9000
             101,ppp,8970
             102,ttt,1900
:wq

            2)SQL> grant connect,resource to u1 identified by u1;

            Grant succeeded.

              SQL> conn u1/u1
             Connected.
             SQL> sho user;
              USER is "U1"

              3)SQL> create table emp(id number(10),name varchar2(10),sal number(10));

               Table created.

             4)create a controlfile product.ctl
             
               vi product.ctl
             
                load data
                infile '/u01/app/product.dat'
                into table emp
                fields terminated by ","
                (id,name,sal)
:wq
           
        Here we loading the data from product.dat file to database table.
           
              5)[subbu@subbuapps ~]$ sqlldr userid=u1/u1 control=product.ctl log=product.log

               SQL*Loader: Release 11.2.0.4.0 - Production on Wed Nov 2 17:40:05 2016

              Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

              Commit point reached - logical record count 3

           6)SQL> conn u1/u1
             Connected.
             SQL> sho user;
            USER is "U1"
            SQL> select * from emp;

             ID NAME              SAL
      ---------- ---------- ----------
             100 kkk              9000
             101 ppp              8970
             102 ttt                 1900
       
              7)SQL> commit;

               Commit complete.

              8)SQL> alter database add supplemental log data;

               Database altered.
             
               9)[subbu@subbuapps ~]$ mkdir demo


             10)SQL> show parameter utl_file_dir

                 NAME                                 TYPE        VALUE
             ------------------------------------ ----------- ------------------------------
              utl_file_dir                         string
             
            11)SQL> alter system set utl_file_dir='/u01/app/demo' scope=spfile;

            System altered.

             12)SQL> conn u1/u1
            Connected.

             SQL> select * from emp;

                ID NAME              SAL
           ---------- ---------- ----------
            100 kkk              9000
            101 ppp              8970
             102 ttt              1900

           SQL> delete from emp;

           3 rows deleted.

           SQL> commit;

          Commit complete
         
          13)SQL> show user;
          USER is "U1"
           SQL> conn / as sysdba
          Connected.
          SQL> exec dbms_logmnr_d.build('dfile','/u01/app/demo');
          PL/SQL procedure successfully completed.
       
           14)SQL> select member from v$logfile;

           MEMBER
        --------------------------------------------------------------------------------
      /u01/app/subbu/redlog1a.log
      /u01/app/subbu/redolog1b.log
      /u01/app/subbu/redlog2a.log
       /u01/app/subbu/redolog2b.log

    SQL> exec dbms_logmnr.add_logfile('/u01/app/subbu/redlog1a.log');

     PL/SQL procedure successfully completed.
   
        15)SQL> exec dbms_logmnr.add_logfile('/u01/app/subbu/redlog2a.log');

     /SQL procedure successfully completed.


.








Wednesday, 26 October 2016

OEM(oracle enterprise manager)

OEM:-ORACLE ENTERPRISE MANAGER

Oracle enterprise manager provides a web based interface that you can use to manage your oracle instance and database.

SQL> alter user sysman identified by manager;

User altered.

SQL> alter user dbsnmp identified by manager;

User altered.

Go to cd $ORACLE_HOME/bin and check emca file exists are not.
[subbu@subbuapps ~]$ cd $ORACLE_HOME/bin
[subbu@subbuapps bin]$ ls emca
emca

[subbu@subbuapps ~]$ emca -config dbcontrol db -repose create

STARTED EMCA at Oct 26, 2016 5:15:15 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: subbu
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/subbu/product/11.2.0.4 ]: 
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/subbu/product/11.2.0.4

Local hostname ................ subbuapps.erp.com
Listener ORACLE_HOME ................ /u01/app/subbu/product/11.2.0.4
Listener port number ................ 1521
Database SID ................ subbu
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 26, 2016 5:37:24 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/subbu/cfgtoollogs/emca/subbu/emca_2016_10_26_17_36_49.log.
Oct 26, 2016 5:37:39 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 26, 2016 5:40:13 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 26, 2016 5:40:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 26, 2016 5:41:20 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 26, 2016 5:41:20 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 26, 2016 5:43:09 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 26, 2016 5:43:09 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://subbuapps.erp.com:1158/em <<<<<<<<<<<
Oct 26, 2016 5:43:15 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/subbu/product/11.2.0.4/subbuapps.erp.com_subbu/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. 

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 26, 2016 5:43:15 PM

****
if we get any errors like password file may be missing or configured incorrectly.
it means password file is missing in cd $ORACLE_HOME/dbs location so create it.
[subbu@subbuapps dbs]$ orapwd file=orapw$ORACLE_SID entries=10

Enter password for SYS: (here enter sys password)
****
copy the link https://subbuapps.erp.com:1158/em  and open it in browser.








login with username and password and connect as sysdba.
username: sys
password : manager






pfile vs spfile?

  p-file(parameter file)
                                    It is located in cd $ORACLE_HOME/dbs
                                    It is named as init$ORACLE_SID.ora
                                    It is ASCII file.
                                    we can change the parameters in pfile.

sp-file(server parameter file)
                                     It is located in cd $ORACLE_HOME/dbs
                                     It is named as spfile$ORACLE_SID.ora
                                     sp-file is binary file.
                                     we cannot change the parameters by opening sp-file.
To chack whether the instance is started with p-file or sp-file

SQL> sho parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                                     string      /u01/app/subbu/product/11.2.0.4/dbs/spfilesubbu.ora

If in the value it doesnt showed anything means then the instance is started with p-file.

NOTE:if there are 2 files pfile and spfile then by default instance will start with sp-file

To check whether the parametes is static or dynamic:
SQL> select name,issys_modifiable from v$parameter where name='sga_target';
NAME                           ISSYS_MOD
------------------------------ ---------
sga_target                     IMMEDIATE

If issys_mod = immediate we can modify.so it comes under dynamic parameters.
If issys_mod = false we cannot modify.so it comes under static parameters.

SQL> sho parameter sga_target;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_target                           big integer  412M

since instance is started with pfile and sga_target parameter is static.we cannot change it through alter command.so go to cd $ORACLE_HOME/dbs/init$ORACLE_SID.ora and edit value here and restart the database.

SQL> startup force                    (internally it will shutdown and startup)
ORACLE instance started.

Total System Global Area  523108352 bytes
Fixed Size                  1365740 bytes
Variable Size             138414356 bytes
Database Buffers          377487360 bytes
Redo Buffers                5840896 bytes
Database mounted.
Database opened.
SQL> sho parameter sga_target 

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_target                           big integer 500M

If our instance is started with spfile there are 3 scopes.
                         1)both
                         2)memory
                         3)spfile
oracle provides 2 options to change the parameters of spfile
                        1)Alter System
                         2)Alter Session
Alter system set resource_limit=true scope=_________________
   1)Both---changes will be applied for current instance and future instance.
   2)memory---changes will be applied only for current instance.
   3)spfile--changes will be applied after restarting the database.











Monday, 24 October 2016

How to Check the installed Oracle Software is 32/64 bit ?

You can check the Oracle Bit by 2 methods
Method 1:
Go to ORACLE_HOME/bin
$ file oracle
oracle: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
Method 2:-
Login to sqlplus,
use the following query,
SQL> select metadata from sys.kopm$ ;
-----------------------
METADATA
-----------------------
0000006001240F050B0C030C0C0504050D06090708050F0505050F05
050505050A050505050504050607080823472323081123081141B0230
083001F07D01300000000000000000000000000000000000000000
000000000000000000000000000000000

If the output has 'B023' string then the database is 32 bit else if it is B047 then it is 64 bit

Friday, 21 October 2016

apps dba basic interview questions?


1) Describe the architecture of Oracle Applications?

• Oracle Applications follow a 3 Tier architecture

- Database Tier
- Middle Tier
- Desktop Tier

• Database tier contains RDBMS database called as oracle database server.
• Database tier stores all the data needed by oracle applications.
• Middle tier or Application Tier containing various servers configured with listeners like web server, forms server, admin server, reports server.
• Database server communicates with middle tier, doesn’t directly communicate with desktop tier.
• Desktop tier contains client desktop where users access oracle applications through web browsers.

2) How do you delete a responsibility from oracle applications?

• Responsibility is a level of authority given to Oracle Applications users.
• It is a collection of requests, forms and menus attached to user.
• Records are used for monitoring and security purpose so we can’t disable responsibilities.
• However, responsibilities can be disabled by assigning an end date to the effective period.
• We can delete a responsibility from both backend and frontend.

3) What are the components of Oracle Applications technology layer?

Oracle Applications technology layer comprises the following products
• Oracle Applications DBA (AD)
• Oracle Applications object library (FND)
• Oracle Common Modules (AK)
• Oracle Applications Utilities (AU)
• Oracle Alert (ALR)
• Oracle Workflow (WF)
• Oracle Applications Framework (FWK)
• Oracle XML Publisher (XML)

4) How many Oracle Homes are there in Oracle Applications and what is the importance of each one of them?

Oracle Applications have three Oracle Homes

• Oracle Home is an environment where oracle products run.
• Database Oracle Home in the database tier that acts as the Oracle Home for the Oracle database.
• Oracle Home in the application tier called as 8.0.6 Oracle Home. It is called the technology stack Oracle Home and used by forms, reports and discoverer.
• IAS Oracle Home, used by the Oracle HTTP Server (Web Listener).


• We can run multiple releases of same products simultaneously by using multiple oracle homes.

5) Can I enable real application clusters in the database tier along with oracle applications?

• Yes, real application clusters can also be configured with Oracle Applications
• RAC allows multiple instances to mount and open a single database.
• RAC requires shared disk storage and a dedicated network interconnect.
• When any one of the node fails, database services can be still available on remaining nodes.

6) Where are Apache log files and configuration files stored and list each of them?

• Apache log files are stored in $IAS_ORACLE_HOME/Apache/Apache/logs.
• The log files are error_log, error_log_pls, access_log and access_log_pls.
• Apache configuration files are stored in $IAS_ORACLE_HOME/Apche/Apache/conf directory.
• The main configuration files are httpd.conf, apps.conf, httpd_pls.conf,

7) How to recreate a DBC file and where is it located?

• Running Autoconfig will recreate the DBC file
• DBC is a database connect descriptor file which stores database connection information used by application tier (web browsers) to connect to database.
• The file is located in FND_SECURE directory.
• you can also create the DBC file by running the script adgendbc.sh
• We can find the above script at $COMMON_TOP/admin/install directory.


8) Which utility is used for changing the password of the application users and how it runs?

• The password of the application users can be changed using the FNDCPASS utility.
• You must have system and applications password for running FNDCPASS.
• FNDCPASS will run in the following manner:
• FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS WELCOME.
• FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1
• FNDCPASS apps/apps 0 Y system/manager USER VISION WELCOME.

 9) What is a patch and name some different types of patches?

• Patch is a program which fixes the bug.

There are 4 different types of patches

• One-off patch:

o This is the simplest type of patch. It is created to resolve a particular problem.

• Mini pack Patch:
o It is a collection of one-off patches related to a particular module or product.
o Mini Pack version of module is denoted by Alphabetic characters.

• Family pack patch:
o This is a collection of mini pack patches in one family.
o Alphabetic characters denote the family pack version.

• Maintenance pack patch:
o This is a collection of family pack patches.
o Oracle Applications Release 11.5.10 is an example of Maintenance pack.

10) What are the contents of patch and drivers present in patching?

Contents of patch:
• Readme files
• Driver files
• Metadata files
• Replacement files
Drivers present in patching:
• C driver - It copies all the files and links the executables
• D driver – It is responsible for running SQL scripts which updates the database.
• G driver - It is responsible for generating forms, reports and message files.
• U driver – It is a united driver containing all copy and database actions.

11) What do you do if patch fails?

• Evaluate log files to determine the cause of the error.
• Repair the cause of error.
• Now Restart Adpatch.
• Answer 'Yes' when adpatch asks if you want to continue the previous session.
• Adpatch starts from where it left off by skipping all completed jobs.

12) How can I determine the effects a patch will have on my application system?

This can be done by patch wizard in the Oracle Applications manager.
• Checking total number of files in the patch and which are installed.
• Products that contain updated files.
• Total no of files introduced by the patch.
• Files on the target system changed by the patch.
• Files which depend on patched files.

13) How can you reduce the downtime when you have to apply multiple patches?

• You can reduce the downtime by merging all the patches into one single patch using admergepatch (admrgpch) tool.
• You can also apply multiple patches one by one by choosing options nocompiledb, nocompilejsp, and nolink.
• Compilation of invalid objects, jsp’s and relinking can be skipped till the last patch is applied.
• In the last patch you can compile all of them and then relink.
• You can also choose the max number of workers which your CPU permits.

14) List out the Log Files created on running patch?

Running the patch creates the following log files
• Adpatch.log: Information about the patch run will be stored here..
• Adpatch.lgi: It contains information about the which has been discarded by adpatch.log
• For example, the files which has not been copied by the adpatch.
• Adrelink.log: Relinking information performed by patch will be stored here..
• Adworkxx.log: Workers log details will be stored here.

15) What are the important AD tables and define their importance?

• AD_APPL_TOPS: It contains information about all APPL_TOP’s using the instance.
• AD_BUGS: It stores information about all different bug fixes applied.
• AD_PATCH_DRIVER_MINIPACKS: Mini_packs information will be stored here.
• AD_PATCH_RUN_BUGS: It stores information about all applied and updated bug fixes.
• AD_FILES: It stores information about files.

16) Is it possible to revert the patch application? Explain in detail how?

• Yes, it’s possible to revert the patching but not 100% sure.
• In test environment it’s always recommended to take the full backup of the database, apply the patch and revert from backup.
• Adpatch is responsible for copying the files from the patch.
• From the patch log, drop the database objects created by the patch.
• Similarly forms in the G driver should be replaced from the backup taken by Adpatch and should be manually generated.

 17) What is a view and how do you recreate a view which becomes invalid when you recreate a patch?

• View is used for accessing a particular portion of a table.
• A view is also called as virtual table.
• For recreating the view you can search for the view name in the SQL directory.
• We can recreate the views running scripts located in the Product top/patch/115/sql directory.
• Most views are recreated using sql script.
• adpreclone.pl prepares the source system and adcfgclone.pl configures the target system.
• Both the scripts are located in $COMMON_TOP/admin/scripts/contextname directory.21) Difference between ad_bugs table and ad_applied_patches?

• When you apply the patch from adpatch utility ad_applied_patches table will get updated.
• Ad_applied _patch doesn’t store the information which was not applied using adpatch.
• Such type of information will be stored in ad_bugs table.
• Also, if all the patches are applied using the adpatch utility, that information is also stored in the ad_bugs_table.

18) What things you do to reduce patch timing?

• Admrgpch utility is used for merging all the patches.
• Various adpatch options like nocompiledb or nocompilejsp are used for reducing patch timing.

19) What are GSM and FNDSM?

• GSM stands for Generic Service Management Framework.
• Oracle E-Business suite contains many services used to start at their own earlier, but managing these services are distributed across network.
• So, GSM is an extension of concurrent processing which manages all your services.
• With GSM all services are centrally managed.
• FNDSM is executable and core component in GSM.

20) What is the purpose of cluster?

• Cluster is used storing table data.
• It contains group of tables that share the same data blocks.
• Suppose if you cluster EMP and DEPT table, both share same DEPTNO column.
• Oracle stores all rows of each department physically from both the EMP and DEPT tables in the same data blocks.
• Clusters can’t be used for tables that are frequently fetched.

21) How to confirm if Apps Listener is up and running?

Execute the following commands

• lsnrctl status APPS _$SID( SID is your instance name)
• For example if our SID is test, then use

lsnrctl status APPS_test
If the listener is up you will observe the following output
• Services summary
• FNDFS has 1 service handler(s)
• FNDSM has 1 service handler(s)

22) What is Adadmin and why it is used?

• Adadmin (Ad administration) is used to perform a number of administrative tasks to maintain the Oracle Applications.
• For Oracle Applications to run smoothly Adadmin is used.
• Adadmin performs work at both database level and file system level.
• Application users are requested to provide all inputs at Adadmin prompt which displays various options from Adadmin menu.
• You can run non_interactive tasks and this is really useful for scheduling routine tasks that require no user intervention.

23) What are the adadmin activities that can be run in a parallel way?

• Recreate grants and synonyms.
• Compile APPS schema
• Maintain multiple reporting currencies schema.
• Convert to Multi-org.
• Generate message files.
• Generate form files.
• Generate report files.


 24) What is the difference between socket and servlet mode forms and list some advantages & disadvantages of each?

• In socket mode, we can find a dedicated connection between client desktop and the forms server.
• In servlet mode, Jserv processes the forms requested.
• socket mode uses up to 40% less bandwidth than forms servlet mode.
• Socked mode is not supported on windows-based platforms.
• Servlet connections can be reestablished if network connections drop unexpectedly whereas it is not possible with socket mode.
• Servlet mode HTTP & HTTPS traffic can be easily recognized by routers, whereas socket mode communication is treated as suspect.


25) How do I change from socket to servlet mode and vice versa?

• First, you must login to Oracle Applications Manager
• Then you must navigate to sitemap, then find the Autoconfig.
• In Autoconfig you can able to change from socket mode to servlet mode and vice versa
• Run the autoconfig from backend and restart the forms server.
• Due to many advantages Forms servlet mode is preferred and is always recommended for web deployment.

26) What is JInitiator?

• It is a java virtual machine provided for running web based oracle forms applications inside a client web browser.
• It is implemented as a plug-in or ActiveX Object.
• It allows you to specify the use of Oracle-certified JVM instead of relying on default JVM provided by the browser.
• It is automatically downloaded to a client machine from the application server.
• Its installation and update is performed by standard plug-in mechanism provided by the browser.

27) What is the function of Oracle HTTP (Apache) server?

• Web listener accepts the Http requests coming from the client browsers and web server services the request.
• Apache server forwards advanced processing requests to the servlet engine.
• Servlet engine forwards this requests to database.
• If the Http request needs parsing a JSP file then web listener checks the nature of the request.
• It then contacts the Jserv to run a JSP.
• The JSP contacts the database for the information and returns a HTML page displayed in the web browser.

28) What kind of maintenance activities can be performed from admin server?

• Following maintenance activities are performed from admin server
• Applying the patches
• Maintaining Oracle Applications
• Applying the ad utilities
• Upgrading Oracle Applications

29) What is cloning and why is it required?

• Cloning is the process of creating an identical copy of the Oracle application system.
It is required due to following reasons
• Creating a test copy of your production system before upgrading.
• Moving an existing system to a different machine.
• To test some patches
• Creating a development copy of your environment to be used by the developers.

30) What is ad splice and what does it do?

• Oracle often releases new products known as off cycle products.
• Ad splice is the utility which takes care of bringing an off cycle product in to oracle applications.
• Ad splice registers off cycle products as active in the system.
• Therefore, adutilities recognize the off cycle products as valid product for a particular product release.

31) How do I check the version of Apache?

• version of Apache can be checked using the following command
• $IAS_ORACLE_HOME/Apache/Apache/bin/httpd –v

Output is given as below

• httpd –v
• Server version: Oracle HTTP server Powered by Apache/1.3.19(UNIX)
• Server built: Dec 6 2005 13:41:10 (iAS 10.2.2.2 rollup 5)
• From the above output we can know the version of the apache.