Friday 24 February 2017

Difference between Oracle EBS R12.1.3 and Oracle EBS R12.2.4?

There are lot of differences.

1)In R12.2 we have to kind of filesystems fs1(run filesystem) and fs2(patch filesystem) where as In R12.1.3 we only deal with one application filesystem.

2)In R12.2 we have the Application servers replaced by Weblogic server to manage the technology statck.
The 10.1.3 Home is replaced by FMW (Fusion Middleware Home) i.e $FMW_HOME

The major change in R12.2 is involvement of Weblogic server to manager all the forms,oacore servers
where as in R12.1.3 we had the Application server 10.1.3 to manage the web home or Java Home

3)The adpatch(patching) in R 12.1.3 is replaced by adop(online patching) in R 12.2.4

adop(online patching) utility involves 5 phases to apply a standard patch in Oracle EBS R12.2.
adop involves 5 phases
1)prepare => prepare phase involves synchronization of the filesystems fs1 (run ,filesystem) and fs2(patch filesystem), filesystems are inter changeable.
2)apply=>In this phase we apply all the patches
Note: These patches need to be copied in fs_ne (non editioned filesystems)
3)finalize =>In this phase we are getting ready for cutover phase
4)cutover =>In cutover phase the filesystem switchover takes place. Previously the filesystem which was patch filesystem will now become run filesystem.)
5) cleanup =>In cleanup phase all the obsolute objects gets compiled .

adop online patching utility doesn't require downtime. It involves minimal downtime during cutover phase where switching of filesystems happens. We can apply lot of patches and do cutover any time to minimize downtime

where as in adpatch we just apply patch most of the times by bringing down applications or in hot patch mode.

4)'Apps' user Password change:
The 'apps' user password change involve 3 steps in R12.2.4
1)Change the password with FNDCPASS
2)Change the password in EBS Datasource from Weblogic admin console

Where as in R 12.1.3 It only involves 2 steps:
1)Change the password with FNDCPASS
2)Run Autoconfig
5)Log files locations:
All the oacore,forms log files are placed in $EBS_DOMAIN_HOME in R12.2. I will explain this in details in my upcoming posts.
Where as in R12.1.3 all the logs for oacore,forms are under $LOG_HOME/ora/10.1.3

Tuesday 14 February 2017

opatch?

OPATCH---->oracle patch

To apply Opatch conditions are database and listener both must be down.
As opatch will update your current ORACLE_HOME with patches.In single instance it is not possible.
But for RAC instance it is possible.As in RAC there will be two separate oracle home and 2 separate instances running one
instance on each oracle home.

Steps before applying patch:---

1)check database status:-

select name,open_mode,database_name,created,log_mode,platform_name from v$database;

NAME            OPEN_MODE       DATABASE_NAME   CREATED         LOG_MODE
--------------- --------------- --------------- --------------- ---------------
PLATFORM_NAME
---------------
VIS             READ WRITE      VIS.subbuapps 31-OCT-16       NOARCHIVELOG
                                .COM
Linux x86 64-bit


2)check the invalid objects:-

select owner,count(*) from dba_objects where status like '%INVALID% GROUP BY owner;

3)Check Opatch version using opatch -v
if opatch version is not compatible check the readmefile and download the latest version and uncompress in $ORACLE_HOME

4)Check oraInst.loc file pointing to your current $ORACLE_HOME or not.
cat /etc/oraInst.loc

inventory_loc=/u01/app/oracle/10.2.0/GlobalOraInv
inst_group=dba

5)If your server have more then one $ORACLE_HOME then comment the other $ORACLE_HOME and
uncomment the current $ORACLE_HOME

inventory must point to the current $ORACLE_HOME which is getting patched.

6)Unzip the patch,go to patch directory and then bring down the listener,bring down the database.

7)export Opatch
export PATH=$PATH:$HOME:$ORACLE_HOME/OPatch:/bin

8)Apply Patch
opatch apply


Monday 13 February 2017

How to find the character set of oracle database?

SQL> select * from NLS_DATABASE_PARAMETERS;

PARAMETER                                     VALUE
------------------------------                   ---------------
NLS_LANGUAGE                        AMERICAN
NLS_TERRITORY                        AMERICA
NLS_CURRENCY                             $
NLS_ISO_CURRENCY                AMERICA
NLS_NUMERIC_CHARACTERS           .,
NLS_CHARACTERSET               AL32UTF8
NLS_CALENDAR                        GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                                        BINARY
NLS_NCHAR_CHARACTERSET         UTF8

PARAMETER                                     VALUE
------------------------------                   ---------------
NLS_SAVED_NCHAR_CS             WE8ISO8859P1
NLS_TIME_FORMAT                    HH.MI.SSXFF AM

                                 (OR)

SQL> select * from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET';

PARAMETER                                VALUE
------------------------------           ---------------
NLS_CHARACTERSET               AL32UTF8

The database character set in oracle determines the set of characters can be stored in the database. It is also used to determine the character set to be used for object identifiers and PL/SQL variables and for storing PL/SQL program source.


Friday 3 February 2017

free space in tablespaces in MB's?


SQL> select tablespace_name,round(sum(bytes)/1024/1024) free_space_mb from dba_free_space group by (TABLESPACE_NAME);

TABLESPACE_NAME                FREE_SPACE_MB
------------------------------                    -------------
CWMLITE                                            24
DW_DERIVED_TBS                           100
TS_SIM_X                                            50
OPMOR                                                1
IAS_META                                           35
WCRSYS_TS                                       1
DW_BASE_IDX                                  100
APPS_TS_QUEUES                            651
OWAPUB                                             10
DW_DM_TBS                                     100
SYSAUX                                             126

TABLESPACE_NAME                FREE_SPACE_MB
------------------------------                   ------------
DSGATEWAY_TAB                                2
DISCO_PTM5_META                             1
B2B_DT                                                   11
RE                                                             1
TS_SALES_DATA_ENGINE_X            50
TS_SALES_DATA_ENGINE                 50
DISCO_PTM5_CACHE                         17
APPS_TS_ARCHIVE                            201
APPS_CALCLIP                                   1544
BAM                                                      2
APPS_TS_NOLOGGING                     279

invalid objects in database?

SQL> desc dba_objects;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                          NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(19)
 CREATED                                            DATE
 LAST_DDL_TIME                                      DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
 NAMESPACE                                          NUMBER
 EDITION_NAME                                       VARCHAR2(30)



SQL> select count(*) from dba_objects where status like '%INVALID%';

  COUNT(*)
----------
       450


SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
       450


If we want to check the owner,object_name,object_type of the invalid objects?

select owner,object_name,object_type from dba_objects where status like '%INVALID%';


How to find the database startup date and time?


SQL> select host_name,instance_name,to_char(startup_time,'DD-MON-YYYY HH24:MI:SS AM') startdate from v$instance;

HOST_NAME                 INSTANCE_NAME                       STARTDATE
---------------                      ---------------                            --------------------------------
subbuapps.erp.com             03-FEB-2017                                14:32:29 PM


How to find the instance name and host name?

SQL> select host_name,instance_name from v$instance;

HOST_NAME                    INSTANCE_NAME
---------------                               ---------------
subbuapps.erp.com                         VIS