Finding File Version

No comments
The below command can be used to find the file version.

adident Header $AU_TOP/resource/<filename>.pll
 
Output will be like:
$Header CUSTOM.pld 115.1.115100.2 2002/04/01 05:40:18 appldev ship $

or
strings $AU_TOP/resource/<filename>.pll | grep -i header

No comments :

Post a Comment

OverView of AutoConfig

No comments
 AD Configuration or Auto Config

When we modify the context file then autoconfig utility needs be executed on all nodes in order to implement the configuration changes.


Executing Autoconfig

The AD Configuration utility, adconfig.sh (also known as autoconfig) can be executed on all nodes of Oracle Applications, including the Database Node.
 
The file adconfig.sh and all of its supporting scripts are located in the $AD_TOP/bin directory

Method of Running

Templates are used by autoconfig to change all configuration files for the different nodes. Patches to the Rapid Install product, also known as ADX, update the templates and the parameters in the XML file.

There are three phases in which the Autoconfig runs.
1.Setup: reads the templates.
2.Apply:Creates various configuration files using the templates by filling up the values in templates.
3.Profile:Updates the profile values.

All application processes should be shut down prior to executing autoconfig.sh.

Running AD Configuration utility

$AD_TOP/bin/adconfig.sh 
contextfile=$APPLTOP/admin/$CONTEXT_NAME.xml \
appspass=password

Running Auto Config
Apps Tier
In 11i
$COMMON_TOP/admin/scripts/$CONTEXT_NAME/adautocfg.sh and provide apps password

In R12
$INST_TOP/admin/scripts/$CONTEXT_NAME/adautocfg.sh and provide apps password


On DB Tier
$ORACLE_HOME/appsutil/adautocfg.sh and provide apps password

Note: If configuration files are modified manually, you will need to edit the context file to keep the settings synchronized; otherwise, changes to the underlying configuration file will be overwritten the next time AD Configuration (adconfig.sh) is executed.

Autoconfig  Log Files
On Application Tier
11i
$APPL_TOP/admin/$CONTEXT_NAME/log/MMDDhhmm/adconfig.log

R12
$INST_TOP/admin/log/MMDDhhmm/adconfig.log
where MM is the month, DD is the day, hh is the hour, and mm is the minute when autoconfig.sh was executed.

On database tier located

$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDhhmm/adconfig.log


Finding  AutoConfig Execution Changes

If you want to determine configuration changes that will be made by executing autoconfig.sh, you can execute the adchkcfg.sh script.This script generates an HTML file named cfgcheck.html which displays the differences in the configurations. 
Location of Script: Application Tier $AD_TOP/bin and DB Tier $ORACLE_HOME/appsutil
Location of HTML file:
In Apps Tier: $APPL_TOP/admin/$CONTEXT_NAME/out/MMDDhhmm
                     $INST_TOP/admin/out/MMDDhhmm

In DB Tier: $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/out/MMDDhhmm


Location of autoconfig.sh Backup Files

The execution of autoconfig generates backup files.
Apps Tier
$APPL_TOP/admin/$CONTEXT_NAME/out/MMDDhhmm
$INST_TOP/admin/out/MMDDhhmm
DB Tier
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/out/MMDDhhmm


Restoring the Configuration from backup

If we want to restore configuration files from the backup of an autoconfig run, then  execute the below scripts
Apps Tier
$APPL_TOP/admin/$CONTEXT_NAME/out/MMDDhhmm/restore.sh
$INST_TOP/admin/out/MMDDhhmm/restore.sh
DB Tier
$ORACLE_HOME/appsutil/out/$CONTEXT_NAME/MMDDhhm/restore.sh

No comments :

Post a Comment

Loadpsp Utility

No comments
Loadpsp utility is used for updating the psp files to database.It creates packages for psp files in database.
Loadpsp utility is located at $ORACLE_HOME/bin

Syntax:
 loadpsp [-replace] -user <logon> [<page1> <page2> ...]
 where <logon> ::= <username>/<password>[@<connect_string>]


where 
 replace: Will replace the files.
 user : The database user name and password needs to be provided where the psp files need 
 to be  updated.
 page:Name and path of psp file.

Example:
$ORACLE_HOME/bin/loadpsp -replace -user scott/tiger Parmlist.psp

 

No comments :

Post a Comment

AutoPatch error: ERROR [code=1]

No comments
If we encounter a error as:

Error:
AutoPatch error:
ERROR [code=1] Running adjopy.class
AutoPatch error:
Error updating master archive

Cause:

The classpath set must be too long due to which the adjava is not able to execute .

Solution:

1.Goto  $APPL_TOP
   cd $APPL_TOP
2.Execute the command
    ls- ltr *.sh
    We can find *autopatch_env.sh
3.Execute the script as below.
   . ikn_autopatch_env.sh

Some time this file can also be find in $APPL_TOP/admin

No comments :

Post a Comment

Adding a Responsibilty to User from Back End

No comments
From  pl/sql we can add any responsibility to a user.To achieve this we can use fnd_user_pkg package.

Syntax:
 
fnd_user_pkg.addresp(username => Application User Name
,resp_app => Responsiblity_Application_Short_Name
,resp_key => Responsibility_Key
,security_group => Security_Group 'Mostly it is 'STANDARD' so it can be hard coded it'
,description => Any comments you want
,start_date => Sysdate From Today
,end_date => Sysdate + any number of days which is required);

Example:

Adding a System Administrator Responsibilty 

BEGIN
fnd_user_pkg.addresp ('HIMANSHU','SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD',
'Add Sysadmin Responsibility to Himanshu', SYSDATE, SYSDATE + 100);
COMMIT;
DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
WHEN OTHERS
  THEN
DBMS_OUTPUT.put_line ( ' Responsibility is not added due to ' || SQLCODE || SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;

No comments :

Post a Comment

VALIDATING the DBC File

No comments
The DBC file can be validated with the below mentioned command.

java oracle.apps.fnd.security.AdminAppServer appsusername/appspassword STATUS dbc=/path of dbc file with file name/

If the DBC file is correct then APPL_SERVER_STATUS should be valid.

OUTPUT
Database Server
---------------
DATABASE_ID:DEV
AUTHENTICATION: OFF

Application Server
------------------
APPL_SERVER_STATUS: VALID
APPL_SERVER_ID: C3099680DC6E9016E0430A51344A901627786863372082922692682207993341

No comments :

Post a Comment

ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and cannot be instantiated

No comments
If the concurrent manager is not starting then we need to go and check the Concurrent manager log.

If the error is:
Routine AFPGCP cannot create a process ID for your concurrent manager process ORACLE error 8004 in FDUUID
Cause: FDUUID failed due to ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and cannot be instantiated.
TheCall to establish_icm failed
The Internal Concurrent Manager has encountered an error.


Reason:

The max value for the sequence FND_CONCURRENT_PROCESSES_S has been reached and we need to increase the max value.

SQL> select FND_CONCURRENT_PROCESSES_S.nextval from dual;
select FND_CONCURRENT_PROCESSES_S.nextval from dual
*
ERROR at line 1:
ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and
cannot be instantiated


Solution

SQL> select * from dba_sequences where sequence_name = 'FND_CONCURRENT_PROCESSES_S' ;

SEQUENCE_OWNER SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
—————————— —————————— ———- ———- ———— – - ———- ———–
APPLSYS FND_CONCURRENT_PROCESSES_S 1 9999999 67778 N N 1000 10048596

Solution:

Increase max value;(should be greater than previous Max value)

SQL> ALTER SEQUENCE APPLSYS.FND_CONCURRENT_PROCESSES_S MAXVALUE 99999999;

Sequence altered.


No comments :

Post a Comment

Table Space Details

No comments
We can use the below queries for getting the details for Table Space.

Table Spaces Details

Oracle 10g and above

select a.tablespace_name,a.bytes/1024/1024/1024 as Total_Space,b.bytes/1024/1024/1024 as Free_Space from sm$ts_avail a,sm$ts_free b
where a.tablespace_name=b.tablespace_name
          and b.tablespace_name='APPS_TS_QUEUES' 
order by 3;

Oracle 9i and below

select b.tablespace_name, tbs_size SizeGb, a.free_space FreeGb
from  (select tablespace_name, sum(bytes)/1024/1024/1024 as free_space
       from dba_free_space
       group by tablespace_name) a,
      (select tablespace_name, sum(bytes)/1024/1024/1024 as tbs_size
       from dba_data_files
       group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
order by 3;

Getting details for free space in Table Spaces

select TABLESPACE_NAME ,sum(bytes)/1024/1024 
from dba_free_space 
group by TABLESPACE_NAME;

Finding default and temporary table space details for a user in Database

select default_tablespace,temporary_tablespace 
from dba_users  
where username='&user_name';

Adding data file in Table Space

ALTER TABLESPACE USER_TABLESPACE ADD DATAFILE '/oradata03/DEV/applsysd013.dbf' size 12287M;

Note: Size can added in MB not in GB.

Adding data file to Temp table space.


Below query will give the free and used space used by temp table space.


 SELECT tablespace_name,sum(bytes_free)/1024/1024,sum(bytes_used)/1024/1024
          FROM v$temp_space_header
         GROUP BY tablespace_name,bytes_free,bytes_used
     

In 11g we need to use below query to find the temp free space

select tablespace_name, tablespace_size/1024/1024 "Total Space MB",allocated_space/1024/1024 "Alloc Space MB",free_space/1024/1024 "Free Space MB"
from dba_temp_free_space;

    
We can use the below query to find the table space file names and it size.
       
Select FILE_NAME,tablespace_name,sum(bytes)/1024/1024 from dba_temp_files group by tablespace_name,FILE_NAME;


FILE_NAME                                          TABLESPACE_NAME                SUM(BYTES)/1024/1024
-------------------------------------------------- ------------------------------ --------------------
/tempdata/temp001.dbf                       TEMP                                          10000
/tempdata/temp002.dbf                       TEMP                                          10000






Adding datafile to temp table space

 
ALTER TABLESPACE TEMP ADD TEMPFILE '/tempdata/temp003.dbf'  size 10000m;

No comments :

Post a Comment

Finding Scheduled Concurrent Program

No comments
The below query can be used for getting all the details for a scheduled concurrent program.

select a.requested_by,a.status_code,a.phase_code,a.request_id, b.user_concurrent_program_name,c.concurrent_program_name,a.requested_start_date, c.execution_method_code,
d.execution_file_name,d.execution_file_path
from apps.fnd_concurrent_requests a, apps.fnd_concurrent_programs_tl b, apps.fnd_concurrent_programs c,
apps.fnd_executables d
where a.status_code in ('Q','I')
and a.concurrent_program_id = b.concurrent_program_id
and b.concurrent_program_id = c.concurrent_program_id
and c.application_id=d.application_id
and c.executable_id=d.executable_id
and a.requested_start_date > SYSDATE
and a.hold_flag = 'N'
order by 1;


Finding the schedules for a particular program we can use the below query
 
select a.requested_by,a.status_code,a.phase_code,a.request_id, b.user_concurrent_program_name,c.concurrent_program_name,a.requested_start_date, c.execution_method_code,
d.execution_file_name,d.execution_file_path
from apps.fnd_concurrent_requests a, apps.fnd_concurrent_programs_tl b, apps.fnd_concurrent_programs c,
apps.fnd_executables d
where a.status_code in ('Q','I')
and a.concurrent_program_id = b.concurrent_program_id
and b.concurrent_program_id = c.concurrent_program_id
and c.application_id=d.application_id
and c.executable_id=d.executable_id
and a.requested_start_date > SYSDATE
and a.hold_flag = 'N'
and b.user_concurrent_program_name='&Program_Full_Name'
order by 1;

No comments :

Post a Comment

Finding Request Group associated for a Program

No comments
The below query can be useful for finding request group associated for a program.

SELECT
rg.application_id "Request Group Application ID",
rg.request_group_id "Request Group - Group ID",
rg.request_group_name,
rg.description,
rgu.unit_application_id,
rgu.request_group_id "Request Group Unit - Group ID",
rgu.request_unit_id,cp.concurrent_program_id,
cp.concurrent_program_name,
cpt.user_concurrent_program_name,
DECODE(rgu.request_unit_type,'P','Program','S','Set',rgu.request_unit_type) "Unit Type"
FROM
fnd_request_groups rg,
fnd_request_group_units rgu,
fnd_concurrent_programs cp,
fnd_concurrent_programs_tl cpt
WHERE rg.request_group_id = rgu.request_group_id
AND rgu.request_unit_id = cp.concurrent_program_id
AND cp.concurrent_program_id = cpt.concurrent_program_id
AND cpt.user_concurrent_program_name ='Full/Long Program Name';

No comments :

Post a Comment

Finding Responsibilities for a User in Apps

No comments
We can use the below query for finding the all the responsibility for a particular user.

SELECT fu.user_name,
         fr.responsibility_name,
         furg.start_date,
         furg.end_date
    FROM fnd_user_resp_groups_direct furg,
         fnd_user fu,
         fnd_responsibility_tl fr
   WHERE     fu.user_name = '&user_name'
         AND furg.user_id = fu.user_id
         AND furg.responsibility_id = fr.responsibility_id
         AND fr.language = USERENV ('LANG')
ORDER BY start_date;


We can modify the above query to find all the User associated with a particular responsibility too.

SELECT fu.user_name,
         fr.responsibility_name,
         furg.start_date,
         furg.end_date
    FROM fnd_user_resp_groups_direct furg,
         fnd_user fu,
         fnd_responsibility_tl fr
   WHERE     
fr.responsibility_name = '&responsibilty_name'
         AND furg.user_id = fu.user_id
         AND furg.responsibility_id = fr.responsibility_id
         AND fr.language = USERENV ('LANG')
ORDER BY start_date;

No comments :

Post a Comment

Setting Database to Archive mode

No comments
The Database can be changed to archive log mode as below.
Note: Archiving can be only applied in the mount mode.

Steps
1. Check whether the database is correct or not from v$database table.
     select name from v$database;

2. Check the log_mode from  v$database table.
    select log_mode from v$database;

3. Shut Down the data base and bring it to mount state.

4. Run the below command to set database in archive mode.
     alter database archivelog
5. Open the the database.


Checking database is in archive mode or not.
     
1. SQL> select name ,open_mode,log_mode from v$database;

NAME      OPEN_MODE  LOG_MODE
---------         ----------               ------------
DEVD     READ WRITE ARCHIVELOG

2. SQL> archive log list
Database log mode                Archive Mode
Automatic archival                   Enabled
Archive destination                  /archive01/DEVD/DEVD
Oldest online log sequence    11
Next log sequence to archive 15
Current log sequence              15

No comments :

Post a Comment