Saturday, August 27, 2011

How to check the database size

select round ((a.data_size+b.temp_size+c.redo_size)/1024/1024/1024,2) "DB_size_in_GB"
from ( select sum(bytes) data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0) temp_size
from dba_temp_files ) b,
( select sum(bytes) redo_size
from sys.v_$log ) c;

Error while running Autoconfig after Refresh Activity

 Got Error while running autoconfig at Refresh
==============================================
On MT Node

Autoconfig Lof file Error...
---------------------------------------------------------------
                   ADX Database Utility
---------------------------------------------------------------

getConnection() -->
    sDbHost    : abcgemmsd57
    sDbDomain  : contappssourcing.com
    sDbPort    : 10929
    sDbSid     : STAGE
    sDbUser    : APPS
    Trying to connect using SID...
getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@abcgemmsd57.contappssourcing.com:10929:STAGE
   Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName
getConnectionUsingServiceName() -->    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=abcgemmsd57.contappssourcing.com)(PORT=10929))(CONNECT_DATA=(SERVICE_NAME=STAGE)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName.DomainName
getConnectionUsingServiceName() -->    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=abcgemmsd57.contappssourcing.com)(PORT=10929))(CONNECT_DATA=(SERVICE_NAME=STAGE.contappssourcing.com)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Connection could not be obtained; returning null

-------------------ADX Database Utility Finished---------------
        Verifying connection to the Database   : Could not be stablished
        No Restore Profile file created.

Restore Profile utility ran successfully
===========================================================================

Solution
=========

Here abcgemmsd57 is DB Host.
As per the Error i found that on DB Host abcgemmsd57 ..Listener was down
Bring up the Listener on Host 57 and run autoconfig again on MT Node..it will works

Autoconfig Log File Location:
=====================
Log File --> $APPL_TOP/admin/sid/log/timestamp/adconfig.log

Monday, July 25, 2011

How to clean FND_NODES table

Step 1:   Always apply the latest cloning patches to avoid all the bugs and fixes
Step 2:  SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;

It will delete all old data from the table.

Step 3:  Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers to repopulate the required system tables.

Wednesday, July 6, 2011

Adding Responsibility through Backend

BEGIN
FND_USER_RESP_GROUPS_API.LOAD_ROW
(X_USER_NAME => 'SATYA',
X_RESP_KEY => 'APPLICATION_DEVELOPER',
X_APP_SHORT_NAME => 'FND',
X_SECURITY_GROUP => 'STANDARD',
X_OWNER => 'SYSADMIN',
X_START_DATE => Trunc(sysdate),
X_END_DATE => NULL,
X_DESCRIPTION => NULL,
X_LAST_UPDATE_DATE => Trunc(sysdate));
COMMIT;
END;

To check whether the instance is RAC enabled or not

SQL> sho parameter CLUSTER_DATABASE;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     TRUE
cluster_database_instances           integer     4
SQL>
SQL> select * from v$active_instances;

INST_NUMBER
-----------
INST_NAME
--------------------------------------------------------------------------------
          1
Stage1

          2
Stage2

          3
Stage3


INST_NUMBER
-----------
INST_NAME
--------------------------------------------------------------------------------
          4
Stage4

Note: Here if the parameter value shows "TRUE" means that the node is RAC.
and if the above select command shows rows ..that means RAC is enabled to that instance.

Or else you can check in init.ora file from $ORACLE_HOME/dbs

*.cluster_database=false

Note: If the cluster database set to "false" --RAC is disabled.

How to Enable and Disable the archive log

To Disable the Archive Log:

change the following value to false in the init.ora file
log_archive_start=false

shutdown the database:
shutdown immediate

disable the archivelog:
startup mount
alter database noarchivelog;
alter database open;
archive log list;

To Enable the Archive Log:

change the following value to true in the init.ora file
log_archive_start=true

shutdown the database:
shutdown immediate

enable the archivelog:
startup mount
alter database archivelog;
alter database open;
archive log list;
archive log all;

Tuesday, July 5, 2011

Compiling library files(.pll) in Oracle Apps

1. Logon as applmgr to the application server where the forms are installed.

2. Change directory to $AU_TOP/resource where all the .pll reside.

cd $AU_TOP/resource

3. Syntax for the f60gen command is as follows:

f60gen module=.pll userid=
password> output_file=/resource/.plx
module_type=library batch=no compile_all=special

4. Examples:

cd $AU_TOP/forms/US

Example 1:

f60gen module=FNDCONC.pll userid=APPS/APPS output_file=$AU_TOP/resource/FNDCONC.plx module_type=library batch=no compile_all=special

Example 2:
f60gen module=FAXMAD.pll userid=FA/FA output_file=$AU_TOP/resource/FAXMAD.plx module_type=library batch=no compile_all=special