Opp

Integration of XML publisher and concurrent processing done by output post processer

At least one opp required as active.

If no opp service in system, request Will complete with warning (no data available)

Opp process can be local(same node) or remote(other node)

User-->submit request -->sm generates xml data file(which require XML layout)-->opp provides  XML template(final report) --->sm finalizes request.

Timeout issue:set concurrent:OPP Response Timeout (bydefalt it has 5mts)
Opp is down with actual0target1: relink the executable $Fnd_top/bin/fndsvc(application bounce require)

Backup and recovery

Backup and recovery is required for no dataloss.

We have inconsistent and consistent backups.

If the database is cleanly shutdown (immediate, normal, transactional) .If we take backup this time it is called consistent backup.

If instance fails,we do shut abort,this time if we take backup it is called inconsistent backup.

We take backup in two methods
Rman
User managed backup (OS commands)

Also we can take backup physical backup (datafiles) or logical backup (tables, indexes..etc)


Why we shouldn't add datafiles when online backup is running?
If we add the datafiles when online backup is running that new datafiles it will not added to the backup then backup will become invalid

Archive log apply will only recover dml operations

Database (open)-->archive log-->
Database (closed)-->noarchive log
Database (open)-->noarchive log



**RMAN BACKUP SIZE ESTIMATION AND COMPRESSION**

As taking backup from data files to backup sets it will take only used blocks so we have to estimate the required space as below



SQL> select sum(bytes)/1024/1024/1024 from v$datafile;

SUM(BYTES)/1024/1024/1024
-------------------------
               541.294922

SQL> select sum(bytes)/1024/1024/1024 from dba_free_space;

SUM(BYTES)/1024/1024/1024
-------------------------
               367.172791

541-367 = 180 GB size of datafiles only it will take

coming to COMPRESSION of backup in RMAN ,iam describing bellow.(Doc ID 563427.1) 

BY default RMAN have the 3 types of compression

1.NULL COMPRESSION
2.UNUSED BLOCK COMPRESSION
3.BINARY COMPRESSION

NULLCOMPRESSION:

RMAN does not back up the contents of data blocks that have never been allocated.

ex||if the table space is having 50GB and we used only 20GB then NULL COMPRESSION will take only 20GB as backup.(eventho few objects(tables) deleted from 20GB but still it will take 20GB as backup

UNUSED BLOCK COMPRESSION:

RMAN will skip the blocks which dont contain data

ex||if the table space is having 50GB and we used only 20GB then NULL COMPRESSION will take only 20GB as backup.(eventho few objects(tables-5GB) deleted from 20GB but still it will take 15GB as backup

BINARY COMPRESSION:
Binary Compression can be done by specifying "AS COMPRESSED" clause in backup command, this compression is called as binary compression.

RMAN can apply a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many tape vendors when backing up data to tape. But we cannot give exact percentage of compression. This binary compression algorithm can greatly reduce the space required for disk backup storage. It is typically 2x to 4x, and greater for text-intensive databases. 

ex||RMAN> backup as compressed backupset database;


SQL> select ALGORITHM_NAME, ALGORITHM_DESCRIPTION, ALGORITHM_COMPATIBILITY from V$RMAN_COMPRESSION_ALGORITHM ;
ALGORITHM_NAME                                                   ALGORITHM_DESCRIPTION                                            ALGORITHM_COMPATIB
---------------------------------------------------------------- ---------------------------------------------------------------- ------------------
BZIP2                                                            good compression ratio                                           9.2.0.0.0
BASIC                                                            good compression ratio                                           9.2.0.0.0
LOW                                                              maximum possible compression speed                               11.2.0.0.0
ZLIB                                                             balance between speed and compression ratio                      11.0.0.0.0
MEDIUM                                                           balance between speed and compression ratio                      11.0.0.0.0
HIGH                                                             maximum possible compression ratio                               11.2.0.0.0


6 rows selected.



5. Undo Block Compression/Optimization

Starting 11g, RMAN performs undo block optimization.  In backup undo optimization, RMAN excludes undo not needed for recovery of a backup, that is, for transactions that have been committed.    Undo optimization is only possible if:
  • This is a backup set backup
  • Full or incremental level 0
  • Not a validate
  • Backup piece version is 11.0 or above
  • User has not disabled undo optimization with:
    _undo_block_compression = FALSE
  • Backup is going to DISK or OSB tape
  • No Guaranteed Restore Point (This check is enabled from 11.2 onwards)

How to recover a datafile if we lost?

through rman

we have to bring database to mount stage

then we have to recover that particular datafile by using the RMAN 

 What is Target vs Auxilliary vs Catalog?

 if you want to create a duplicate of your development database to different host.You can use rman duplicate on the other host where you are creating duplicate database. In this case
Target   is your existing development database
Auxiliary is your new database instance where you are going to create database using rman duplicate

catalog is usually a third database where you store backup information of this development database.






Datapump and Traditional Export

Datapump

Datapump works as a server process,so it can directly access the datafiles and sga.no need of user session.

It can launch/stop/restrat at anytime.
STOP_Job
Kill_job


We can monitor datapump jobs from database.
Dba_datapump_sessions
V$SESSION_Longopps
DBA_DATAPUMP_JOBS
SQL> select JOB_NAME,STATE,DEGREE,DATAPUMP_SESSIONS from dba_datapump_jobs;

JOB_NAME
--------------------------------------------------------------------------------------------------------------------------------
STATE                              DEGREE DATAPUMP_SESSIONS
------------------------------ ---------- -----------------
SYS_EXPORT_SCHEMA_03
NOT RUNNING                             0                 0

It doesn't support tapes or pipes

More undo will be used.

Parallel execution used.

If any rowviolation(append or truncated)happens,the complete job will stop.

Meta data saved in XML format


Export

Export works as  user process
No self tunning utilities
It supports sequential media like tapes pipes.

Export uses less undo

Single stream execution.

If any rowviolation happens only that row will be eliminated and job continued for next jobs

It will save in ddl

**EXPDP PERFORMANCE TUNINING**

If normal expdp command executing 6hrs to take backup of schema(or any object)
filesize and parlell parameters are used to fastup the export of dump file by adding multiple os process.

after using those parameters it has been completed in 3hrs

EXAMPLE

Before Querry:
expdp system/SYSTEMPASSWORD@DATABASE_NAME DIRECTORY=DPUMP123 DUMPFILE=exp_XXXXXXX.dmp SCHEMAS=SCOTT_SCHEMA compression=all logfile=exp_XXXXXXXXXXX.log

After Querry:
expdp system/SYSTEMPASSWORD@DATABASE_NAME DIRECTORY=DPUMP123 DUMPFILE=exp_XXXXXXX_%U.dmp filesize=5000M parallel=4 SCHEMAS=SCOTT_SCHEMA compression=all logfile=exp_XXXXXXXXXXX.log
filesize




Difference of Apache and IAS_HOME

What is Apache?
Apache is webserver that Handel's http request s from client.

What is ias?
By using Apache technology oracle has customized to oracle application by adding mod_jesrv,mod_plsql and mod_oc4j.it is called oracle application server ias

What web server will do?
A webserver is responsible for take http request from client.
If URL is http://oracleoltp.com
 It will be break into 3 steps
1. Http request sends to webserver(http protocol)
2. Oracleoltp.com constants Dns to get ipadress
Of server to access the file like appslocallogin.jsp or index.xml
3. Once we get the ipaddres then it will form connection to
Server and get the file like  index.html,appslocallogin.jsp..etc

How user is able to see webpage?
Web browser-->Dns-->Ipaddress-->form a server connection-->using http protocol request for file(login.html,appslocallogin.html..etc)-->it will send html text to browser-->browser reads html text-->finally user sees the screen.

Ohs components?
Apache
Mod_jserv
Mod_plsql
Oproc
What is Apache and oacore?
Apache is webserver
Oacore is oc4j instance which works on oracle application framework


When Apache Web server up it uses the below configuration Files. 

adstrtall.sh -> adapcctl.sh ->apachectl-> httpd.conf (which in turns apache web server i.e http server will up) 

When httpd executable first starts, this file is processed. Thus httpd.conf is the main configuration file. 

httpd.conf -> jserv.conf -> jserv properties -> zone properties 
httpd.conf -> oracle_apache.conf -> ojsp.conf -> plsql.conf -> apps.conf 
httpd.conf -> oprocmgr.conf

Link for 11i application:http://mtalmasri.blogspot.com/2011/07/oracle-apps-apache-overview-11i-and-r12.html?m=1









Difference between apps and sys

Sys is not a schema it is a system privilege that allows us to do stratup, shutdown the database.
Apps is schema is specifically created for orae EBS data objects
It owns synonyms,javaclass,packages,func functions and matterilized views.
It has synonyms that give grants on all product schems (AP,AR,..etc) data objects tables,indexes, queues..etc

Product schemas have data objects like base tables,indexes,queues.
Apps schema has data objects like synonyms,views, functions, packages...etc