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.




Thursday 20 October 2016

How to check the version of Apache?


go to $IAS_ORACLE_HOME/Apache/Apache/bin/

httpd –v

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

  1)[oracle1@apps ~]$ cd $ORACLE_HOME
     [oracle1@apps 11.1.0]$ pwd
     /home/u03/d01/db/tech_st/11.1.0
    Database Oracle Home in the database tier that acts as the Oracle Home for the Oracle database.
 

  2)[applmgr1@apps ~]$ cd $ORACLE_HOME
     [applmgr1@apps 10.1.2]$ pwd
     /home/u01/d02/apps/tech_st/10.1.2
     It is called the technology stack Oracle Home and used by forms, reports and discoverer.

  3)[applmgr1@apps 10.1.2]$ cd $IAS_ORACLE_HOME
     [applmgr1@apps 10.1.3]$ pwd
      /home/u01/d02/apps/tech_st/10.1.3
    IAS Oracle Home, used by the Oracle HTTP Server (Web Listener).


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)

can we delete a responsiblity from oracle applications?


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

oracle applications architecture?

oracle applications is divided into 3 tiers
                                       1)desktop tier.
                                       2)application tier.
                                       3)database 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.


What is ERP?

ERP stands for enterprise resource and planning.A term that is used for business management systems which are designed to integrate the data sources and process of an entire organization into a unified system.A key element is the use of single database to store data for various modules like CRM, Finance, HR, Production, Sales etc.