adoacorectl.sh, adformsctl.sh , adoafmctl.sh exiting with status 150 or unable to start oacore oc4j in r12


Sometimes application services not brought down gracefully and don't delete the .lock file. Later we bring up the application then these .lock file causing an issue for OC4J instance.


cat  $LOG_HOME/ora/10.1.3/opmn/opmn.log

18/09/29 11:41:21 [libopmnoc4j] OC4J ping attempt timed out
18/09/29 11:41:21 [libopmnoc4j] Process Ping Failed: default_group~oacore~default_group~1 (1726679358:1966)
18/09/29 11:42:11 [libopmnoc4j] OC4J ping attempt timed out
18/09/29 11:42:11 [libopmnoc4j] Process Ping Failed: default_group~oacore~default_group~1 (1726679358:1966)
18/09/29 11:42:11 [libopmnoc4j] Process Unreachable: default_group~oacore~default_group~1 (1726679358:1966)
18/09/29 11:42:11 [pm-process] Restarting Process: default_group~oacore~default_group~1 (1726679358:1966)
18/09/29 11:43:25 [pm-process] Starting Process: default_group~oacore~default_group~1 (1726679358:0)
18/09/29 11:43:32 [pm-process] Process Alive: default_group~oacore~default_group~1 (1726679358:37890)
18/09/29 11:43:39 [pm-requests] Request 58d Started.  Command: /start?process-type=oacore
18/09/29 11:43:39 [pm-requests] Request 58d Completed. Command: /start?process-type=oacore



Go to $INST_TOP/ora/10.1.3/j2ee/oacore/persistence/oacore_default_group_1 on application tier and look for jms.state and *.lock files.


drwxr-xr-x 3 applmgr dba 4096 Jan  2  2017 persistence
-rw-r--r-- 1 applmgr dba  108 Sep 29 11:43 scheduler_notifications.lock
-rw-r--r-- 1 applmgr dba  512 Sep 29 11:43 scheduler_notifications
-rw-r--r-- 1 applmgr dba  512 Sep 29 11:43 Oc4jJmsExceptionQueue
-rw-r--r-- 1 applmgr dba  108 Sep 29 11:43 scheduler_jobstore.lock
-rw-r--r-- 1 applmgr dba  512 Sep 29 11:43 scheduler_jobstore
-rw-r--r-- 1 applmgr dba  108 Sep 29 11:43 scheduler_events.lock
-rw-r--r-- 1 applmgr dba  512 Sep 29 11:43 scheduler_events
-rw-r--r-- 1 applmgr dba 4096 Sep 29 11:43 jms.state


If you find them in this location once all you services are stop. Delete or rename them. Once you are done try again. Now OACORE OC4J service will come up.


Solution:

1. Stop application services
2. Clear contents of the persistence directory
3. Start application services




how to register custom top in oracle apps r12

Here we going to discuss 'Custom top creation in oracle ebs r12.2'

Step 1:- Creating Custom TOP/Application using AD Splice

To to register custom top/application we download patch 3636980 from Oracle support.

copy three *.txt file from 3636980/izu/admin to temporary directory.

Rename izuprod.txt to <CUSTOM MODULE>prod.txt. In this example, we will use "xxcustomzprod.txt".

Rename izterr.txt to <CUSTOM MODULE>terr.txt. In this example, we will use "xxcustomterr.txt".

Open newprods.txt using vi editor and make changes of izu with your CUSTOM Moduel.

product=izu
base_product_top=*APPL_TOP*
oracle_schema=izu
sizing_factor=100
main_tsp=USER_DATA
index_tsp=USER_IDX
temp_tsp=TEMP
default_tsp=USER_DATA


Open xxcustomprod.txt using vi editor and make changes of IZU with Custom Module.


Open xxmzterr.txt using vi editor and change all 

cizu     Oracle_Support_Diagnostic_Tools

as 

cxxcustom xxcustom_custom_app


Change the text "Oracle_Support_Diagnostic_Tools" to be "xxcustom_custom_app".

Copy the following text files to the $APPL_TOP/admin directory:

newprods.txt
xxcustomterr.txt
xxcustomprod.txt


Step  2:- Now Change directory to the admin directory under $APPL_TOP.


Run AD Splice.

$ adsplice

Please enter the directory where your AD Splicer control file is located.

The default directory is [/data03/1225_data/1225apps/fs1/EBSapps/appl/admin] : 

Please enter the name of your AD Splicer control file [newprods.txt] : newprods.txt

Processing file /data03/1225_data/1225apps/fs1/EBSapps/appl/admin/newprods.txt...
  Loading information for product 'XXCUSTOM'...

Warning: Because the database is in new tablesp mode, AD Splicer is ignoring the tablesp settings in your control file!

Successfully read file /data03/1225_data/1225apps/fs1/EBSapps/appl/admin/newprods.txt.


Verifying localizations...

Validating inter-product dependency information...

Re-organizing product information lists...


Adding new languages into FND_LANGUAGES...

begin fnd_languages_pkg.add_language; end;


Connecting to SYSTEM......Connected successfully.

Creating ORACLE usernames for products...

AD Splicer is creating or updating the ORACLE username XXCUSTOM
with password ***** for xxcustom custom app tables.

alter user XXCUSTOM identified by *****

New product XXCUSTOM spliced. Use FNDCPASS to change the password.

alter user XXCUSTOM quota unlimited on APPS_TS_ARCHIVE
alter user XXCUSTOM quota unlimited on APPS_TS_INTERF
alter user XXCUSTOM quota unlimited on APPS_TS_MEDIA
alter user XXCUSTOM quota unlimited on APPS_TS_NOLOGGING
alter user XXCUSTOM quota unlimited on APPS_TS_QUEUES
alter user XXCUSTOM quota unlimited on APPS_TS_SEED
alter user XXCUSTOM quota unlimited on APPS_TS_SUMMARY
alter user XXCUSTOM quota unlimited on APPS_TS_TOOLS
alter user XXCUSTOM quota unlimited on APPS_TS_TOOLS
alter user XXCUSTOM quota unlimited on APPS_TS_TX_DATA
alter user XXCUSTOM quota unlimited on APPS_TS_TX_IDX
alter user XXCUSTOM default tablesp APPS_TS_TX_DATA
alter user XXCUSTOM temporary tablespace TEMP


Recording ADSPLICE action for product: xxcustom


Do you wish to regenerate your environment file [Yes] ? Yes

Checking if AutoConfig is enabled....

Running AutoConfig on : All products ...


Configuring templates from all of the product tops...

        Configuring AD_TOP........COMPLETED
        Configuring FND_TOP.......COMPLETED
        Configuring ICX_TOP.......COMPLETED
        Configuring MSC_TOP.......COMPLETED
        Configuring IEO_TOP.......COMPLETED
        Configuring BIS_TOP.......COMPLETED
        Configuring CZ_TOP........COMPLETED
        Configuring SHT_TOP.......COMPLETED
        Configuring AMS_TOP.......COMPLETED
        Configuring CCT_TOP.......COMPLETED
        Configuring WSH_TOP.......COMPLETED
        Configuring CLN_TOP.......COMPLETED
        Configuring OKE_TOP.......COMPLETED
        Configuring OKL_TOP.......COMPLETED
        Configuring OKS_TOP.......COMPLETED
        Configuring CSF_TOP.......COMPLETED
        Configuring IBY_TOP.......COMPLETED
        Configuring JTF_TOP.......COMPLETED
        Configuring MWA_TOP.......COMPLETED
        Configuring CN_TOP........COMPLETED
        Configuring CSI_TOP.......COMPLETED
        Configuring WIP_TOP.......COMPLETED
        Configuring CSE_TOP.......COMPLETED
        Configuring EAM_TOP.......COMPLETED
        Configuring GMF_TOP.......COMPLETED
        Configuring PON_TOP.......COMPLETED
        Configuring FTE_TOP.......COMPLETED
        Configuring ONT_TOP.......COMPLETED
        Configuring AR_TOP........COMPLETED
        Configuring AHL_TOP.......COMPLETED
        Configuring IES_TOP.......COMPLETED
        Configuring OZF_TOP.......COMPLETED
        Configuring CSD_TOP.......COMPLETED
        Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.

Errors and warnings are listed in the log file
/data03/1225_data/1225apps/fs1/EBSapps/appl/admin/PHASE1/log/adsplice.log


Finally verify the  Custom Product in the Database.



SQL>select * from fnd_application where application_short_name = 'XXCUSTOM';



Go under $CUSTOM_TOP and check  below directory created.


admin   log    mesg    out    sql 



Once Custom Top registor successfully reset the custom schema password using FNDCPASS.


ALECDC Program was terminated by signal 11 for all oracle alerts.

Due to this issue all oracle alerts terminated with signal 11. Signal 11 is a generic error, the likely cause of this issue is lack of OS resources.


We are also showing error segfault  frequently in Operating system .

dmesg:-

ALECDC[5331]: segfault at 0 ip 0000000008059b04 sp 00000000ffad7c40 error 4 in ALECDC[8048000+120000]
ALECDC[5332]: segfault at 0 ip 0000000008059b04 sp 00000000ffa6bbf0 error 4 in ALECDC[8048000+120000]
ALECDC[5334]: segfault at 0 ip 0000000008059b04 sp 00000000ffbf49c0 error 4 in ALECDC[8048000+120000]
ALECDC[5339]: segfault at 0 ip 0000000008059b04 sp 00000000ffb6cea0 error 4 in ALECDC[8048000+120000]
ALECDC[9531]: segfault at 0 ip 0000000008059b04 sp 00000000ffd03c20 error 4 in ALECDC[8048000+120000]
ALECDC[19037]: segfault at 0 ip 0000000008059b04 sp 00000000ffac6fc0 error 4 in ALECDC[8048000+120000]
ALECDC[19049]: segfault at 0 ip 0000000008059b04 sp 00000000ffa51010 error 4 in ALECDC[8048000+120000]
ALECDC[19052]: segfault at 0 ip 0000000008059b04 sp 00000000ff9f91d0 error 4 in ALECDC[8048000+120000]



To fix this issue signal 11 error in oracle apps we should upgrade alert code file version as latest.

aluapp.lc 120.1.12010000.4

Check the file version:-

strings $ALR_TOP/bin/ALPPWF | grep Header | grep aluapp.lc


To date, the following patches are available:


11.5.10: Patch 5839356 Email body was getting truncated early for a message exceeding 64k (alssmn.lc 115.48)


12.0: Patch 8715092 CC AND BCC RECIPIENTS SHOWN IN TO FIELD IN ALERT MAILS (alssmn.lc 120.7.12000000.21)

12.0: Patch 7592660 RELEASE 12 BUG FOR SIGNAL 11 WITH ALPPWF (alpiwf.lc 120.0.12000000.5)

12.1: Patch 13728376 - Alert fails with signal 11 error after password case sensitivity fix (aluapp.lc  120.1.12010000.4)

12.1: Patch 9908378 - RELEASE 12 BUG FOR SIGNAL 11 WITH ALPPWF  (alppwf.lc  120.0.12010000.3)
12.1: Patch 9817770 POST-R12.ATG_PF.B.DELTA.3 CONSOLIDATED PATCH (alssmn.lc 120.22.12010000.9)

Mount Windows share filesystem on linux using CISF

Common Internet File System(CISF) is file sharing network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. You can easily access CIFS share from Linux and mount them as a regular filesystem.


Examples:- 


#mount -t cifs -o username=shareuser,password=sharepassword //server-IP/share-name /mnt/cifs


With domain:- Set the domain or work group of user




#mount -t cifs //server-IP/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=xxxx.com


By default windows share will mount with full permission as 777 in Linux server.To change default access use dir_mode and file_mode to set the limited permission on directory and file.



To make the mount persistent across reboots, make the below entry to the /etc/fstab

#vi /etc/fstab

//server-IP/share-name /mnt/cifs cifs  _netdev,username=<share user>,password=<share  password>,dir_mode=0755,file_mode=0755  0 0

Check the mounted FS.


#df -h




Manually Compile .pll .fmb and .rdf file in oracle ebs 11i,R12

Sometimes we need to compile the .pll ,.fmb ,.rdf file, if  we are facing issue with forms,reports and libraries etc.


In R12

Compiling .pll (library):-

cd $AU_TOP/resource

frmcmp_batch module=JAAUUCOM.pll userid=apps/***** output_file=JAAUUCOM.plx module_type=library batch=yes compile_all=special

frmcmp_batch module=CUSTOM.pll userid=apps/***** output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special


Compiling FMB (forms):-

cd $AU_TOP/forms/US

frmcmp_batch module=XXXX.fmb userid=apps/***** output_file=$JA_TOP/forms/US/XXXXX.fmx module_type=form batch=yes compile_all=special


In 11i

Compiling .pll (library):-

f60gen module=$AU_TOP/forms/US/CUSTOM.pll  userid=apps/****** output_file=$JA/forms/USCUSTOM.plx module_type=library compile_all=yes



Compiling FMB (forms):-

f60gen module=$AU_TOP/forms/US/XXXX.fmb  userid=apps/****** output_file=$JA/forms/XXXX.fmx module_type=form compile_all=yes

Fixed REP-0756: Warning: Unable to find PL/SQL library 'inv' in oracle apps R12

Discrete Job Shortage Report Completes With Error (REP-0252,REP-0756,REP-0736,REP-1247,REP-0069,REP-57054,REP-1247) in oracle apps R12.

ERROR
-----------------------
REP-0756: Warning: Unable to find PL/SQL library 'inv'.
REP-0736: There exist uncompiled program unit(s).
REP-1247: Report contains uncompiled PL/SQL.

We can reproduce the issue when rerun the Discrete Job Shortage Report.

WIP reports.

The likely cause of this issue is executable,plssql library and forms for WIP was not re-linking successfully.


Complete error as per concurrent request log.

+---------------------------------------------------------------------------+
Work in Process: Version : 12.1

Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.

WIPDJORQ: Discrete Job Shortage Report
+---------------------------------------------------------------------------+

Current system time is 18-SEP-2018 18:21:01

+---------------------------------------------------------------------------+


+-----------------------------
| Starting concurrent program execution...
+-----------------------------

Arguments
------------
P_OPEN_SHORT='1'
P_SORT_BY='11'
P_NETTABLE='2'
P_Include_Bulk='1'
P_Include_Vendor='1'
P_FROM_JOB='525385'
P_TO_JOB='525385'
P_ORGANIZATION_ID='1029'
P_qty_precision='2'
------------

 APPLLCSP Environment Variable set to :

 Current NLS_LANG, NLS_NUMERIC_CHARACTERS and NLS_SORT Environment Variables are :
AMERICAN_INDIA.UTF8

'.,'

BINARY

Enter Password: 
REP-0252: Warning: The path specified by environment variable 'REPORTS_PATH' is too long and will be ignored.
REP-0252: Warning: The path specified by environment variable 'REPORTS_PATH' is too long and will be ignored.
REP-0252: Warning: The path specified by environment variable 'REPORTS_PATH' is too long and will be ignored.
REP-0252: Warning: The path specified by environment variable 'REPORTS_PATH' is too long and will be ignored.
REP-0756: Warning: Unable to find PL/SQL library 'inv'
REP-0736: There exist uncompiled program unit(s).
REP-0736: There exist uncompiled program unit(s).
REP-1247: Report contains uncompiled PL/SQL.
REP-0069: Internal error
REP-57054: In-process job terminated:Terminated with error: 
REP-1247: There exist uncompiled program unit(s).
REP-1247: Report contains uncompiled PL/SQL.


Report Builder: Release 10.1.2.3.0 - Production on Tue Sep 18 18:21:02 2018

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+
Program exited with status 1
Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 37116143.

Review your concurrent request log and/or report output file for more detailed information.


+---------------------------------------------------------------------------+
No completion options were requested.

Output file size: 


+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 18-SEP-2018 18:21:03

+---------------------------------------------------------------------------+


Solution:-

1. Please relink the executables for WIP INV schemas using adadmin utility.

2. Please regenerate forms, pl/sql libraries for WIP and INV schemas using adadmin utility.

3. Please clear cache and bounce Apache server .

ORA-00257: archiver error Connect internal only, until freed

The archiver process received an error while trying to archive the redo logfile. Due to this issue oracle database will stop executing the transaction. So we have to check the archive destination because most likely cause of this error is the destination device is out of space to store the archived logfile.


$ adpatch 

           FAILED: file xla_ae_lines.xdf on worker  1.


Index XLA_AE_LINES_N1 matches exactly with the XDF definition.
Index XLA_AE_LINES_N4 matches exactly with the XDF definition.
Index XLA_AE_LINES_U1 matches exactly with the XDF definition.
Index XLA_AE_LINES_N5 does not exist in XLA.

CREATE INDEX "XLA"."XLA_AE_LINES_N5" ON "XLA"."XLA_AE_LINES" ("CODE_COMBINATION_ID", "LEDGER_ID", "ACCOUNTING_DATE")
  PCTFREE 10 INITRANS 11 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 16384 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
  TABLESPACE "APPS_TS_TX_IDX"
  PARALLEL NOLOGGING
ALTER INDEX XLA."XLA_AE_LINES_N5" NOPARALLEL LOGGING
Start time for statement above is Tue Jul 21 18:09:31 IST 2020
Start time for statement above is Tue Jul 21 18:21:15 IST 2020
ORA-12801 error occured during Index creation.

==========================================================
Done calling the utility function. Return Code = [1] TimeStamp = [Tue Jul 21 18:21:15 IST 2020]
Updating task with status 1

AD Worker error:
The utility FndXdfCmp returned error for the above task.

AD Worker error:
The above program failed.  See the error messages listed
above, if any, or see the log and output files for the program.


Check the existing archivelog destination size.

SQL> show parameter DB_RECOVERY_FILE_DEST_SIZE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size           big integer 20


There are two ways to resolve the 'oracle ora 00257 archiver error' issue.

1> Increase the size of db_recovery_file_dest_size.
2> remove the old or expired archivelog which was already backuped.



1> Increase the size of db_recovery_file_dest_size.

We can increase the size of db_recovery_file_dest_size as below.

SQL>alter system set db_recovery_file_dest_size=30g scope=spfile;

SQL> show parameter db_recovery_file_dest_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size           big integer 30


2> remove the old or expired archivelog which was already backuped.

To delete the the archivelog file , if you have backup or no longer necessary.

RMAN> delete archivelog until time 'SYSDATE-1';

or 

RMAN> delete expired archivelog all;
RMAN> delete archivelog all;


In last manually switch the logfile.

SQL> alter system switch logfile;


System altered.;


GST Form JAINNSTL.fmb is having error during compilation

Facing error during applying GST July RUP 11 patches in R12.2.xx

 Issue:-
 ------------------

Form JAINNSTL.fmb is having error during compilation.



As per Oracle support Development team form JAINNSTL.fmb is obsoleted and this error is due to mismatch of the calling parameters between the fmb and jai_settlement.plb.

As per dev team this form JAINNSTL.fmb is NO longer used and it is obsoleted.

And any error messages relating to this form either during compilation for fmx generation or while patching when assigned to any adworkers can be ignored.

$adop phase=prepare,apply,finalize,cutover,cleanup patches=27421320 abandon=no restart=yes flags=autoskip 


In case of patching , for R12.2.X releases , during adop phase it tries to compile and fail. 

Do ignore the error re-run the adop again.

At this point the communication from dev is this form will be taken care in the future releases.




Oracle Home is not registered with the Central Inventory

Oracle Home is not registered with the Central Inventory.| We are facing the error during the  patch installation you get the following error:

The Oracle Home <your ORACLE_HOME> is not registered with the Central Inventory.  OPatch was not able to get details of the home from the inventory.



In R12.2.5:


VerifyInventoryAgainstFilesystem ...

        

ERROR: /fs2/FMW_Home/Oracle_EBS-app1 is not registered in the inventory

        
Corrective Action: Provide the location of a valid inventory file. If you believe the inventory is valid, you may want to attach the fs2/FMW_Home/Oracle_EBS-app1.


Run ./opatch lsinventory -all to check if you ORACLE_HOME is defined.

If not :


cd $ORACLE_HOME/oui/bin

./runInstaller -silent -invPtrLoc /etc/oraInst.loc -attachHome ORACLE_HOME=< Enter ORACLE_HOME path >" ORACLE_HOME_NAME="<Oracle_Home_name>"


Re-run the patch installation.





Adop phase=prepare failing with error [UNEXPECTED]Error 1 occurred while Executing txkADOPValidation script on ebs1

Below error occurring while preparing oracle apps for patching using adop.



Validating configuration on node: [xxxxx].
    Log: /data03/1225_data/1225apps/fs_ne/EBSapps/log/adop/11/20180907_171515/prepare/validate/test
        [WARNING]: There could be issues while validating the ports used for E-Business Suite instance against ports used in /etc/services. Refer the log file for more details.
        [ERROR]: Some of the ports specified for the patch file system are not available.
    [UNEXPECTED]Error occurred running "perl /data03/1225_data/1225apps/fs2/EBSapps/appl/ad/12.0.0/patch/115/bin/txkADOPValidations.pl  -contextfile=/data03/1225_data/1225apps/fs2/inst/apps/PHASE1_test/appl/admin/PHASE1_test.xml -patchctxfile=/data03/1225_data/1225apps/fs1/inst/apps/PHASE1_test/appl/admin/PHASE1_test.xml -phase=prepare -logloc=/data03/1225_data/1225apps/fs_ne/EBSapps/log/adop/11/20180907_171515/prepare/validate/test -promptmsg=hide"
    [UNEXPECTED]Error 1 occurred while Executing txkADOPValidation script on test


[STATEMENT] Please run adopscanlog utility, using the command

"adopscanlog -latest=yes"

to get the list of the log files along with snippet of the error message corresponding to each log file.


[applmgr@dcetest dcetest]$ cat txkADOPValidations.error
Use of uninitialized value $result in split at /data03/1225_data/1225apps/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 1294.
No such file or directory at /data03/1225_data/1225apps/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 230.


Check it as below to verify the patch context file entry.

SQL>select distinct(PATH) from FND_OAM_CONTEXT_FILES where NAME not in ('TEMPLATE','METADATA','config.txt') and CTX_TYPE='A' and (status is null or upper(status) in ('S','F')) and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') = 'patch';

SQL>No rows returned.


It means patch filesystem context entry not exist in database.

echo $FILE_EDITION
patch

Now we need to upload the patch context file in database.

Solution:-

$ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer \
action=upload \
contextfile=
/data03/1225_data/1225apps/fs2/inst/apps/PHASE1_test/appl/admin/PHASE1_test.xml \
logfile=/tmp/patchctxuploads.log


Run the below query again to validate

$adop -validate


API to reset password in oracle apps

Reset Oracle apps password from backend | Being Oracle Database administrator,we are using various API scripts to do the administrative task in Oracle Database.Before executing script we should test it on test/dev instance, then migrate the solution/script to production carefully. Here we are discussing 'how to change user password in oracle apps from backend' using API.

----------------------------------------------------------------

-----------reset oracle apps password from backend
----------------------------------------------------------------

DECLARE

    lb_status BOOLEAN;
BEGIN
    lb_status := FND_USER_PKG.CHANGEPASSWORD
                                                            (
                                                                username           => '&Username',
                                                                newpassword     => '&NewPassword'
                                                           );

    IF lb_status

    THEN
        DBMS_OUTPUT.PUT_LINE('Request processed sucessfully');
    ELSE
        DBMS_OUTPUT.PUT_LINE('Error while processing the request');
    END IF;
END;
/
exit;


copy above API code to 'reset password in oracle apps r12'. You can make script to reset the password.

$vi resetpwd.sql

-->paste here and save it

:wq!

$sqlplus apps/apps

$SQL>@resetpwd.sql





API to end date responsibility from fnd user

End date oracle Responsibility from Oracle FND User:-

Being Oracle Database administrator, we are using various API scripts to do the administrative task in Oracle Database.Before executing script we should test it on test/dev instance, then migrate the solution/script to production carefully. Here we are discussing 'how to end date responsibility in oracle apps from backend' using API.

Copy below api to remove responsibility in oracle apps from backend.

-- -----------------------------------------------------------------
-- API to end date user responsibility in oracle apps
-- -----------------------------------------------------------------
DECLARE
   v_user_name                   VARCHAR2 (100) := '&Enter_FND_LOGIN';
   v_responsibility_name   VARCHAR2 (100) := '&Enter_Responsibility_name';
   v_application_name        VARCHAR2 (100) := NULL;
   v_responsibility_key        VARCHAR2 (100) := NULL;
   v_security_group              VARCHAR2 (100) := NULL;


BEGIN
   SELECT  fa.application_short_name,
                     fr.responsibility_key,
                     frg.security_group_key
    INTO        v_application_name,
                      v_responsibility_key,
                      v_security_group
    FROM      fnd_responsibility       fr,
                     fnd_application            fa,
                     fnd_security_groups  frg,
                     fnd_responsibility_tl   frt
    WHERE  fr.application_id               = fa.application_id
     AND        fr.data_group_id             = frg.security_group_id
     AND        fr.responsibility_id          = frt.responsibility_id
     AND        frt.LANGUAGE                 = USERENV ('LANG')
     AND        frt.responsibility_name  = v_responsibility_name;

      fnd_user_pkg.delresp
      (    username           => v_user_name,
           resp_app            => v_application_name,
           resp_key             => v_responsibility_key,
           security_group   => v_security_group
      );

     COMMIT;

     DBMS_OUTPUT.put_line (   'Responsiblity '
        || v_responsibility_name
        || ' is removed from the user '
        || v_user_name
        || ' Successfully'
        );


EXCEPTION
     WHEN OTHERS THEN
              DBMS_OUTPUT.put_line
               (   'Error encountered while deleting responsibilty from the user and the error is '
                    || SQLERRM
                );
END;
/



API to add responsibility to user in oracle apps from backend

Assign responsibility to user in oracle apps from backend | Being Oracle Database administrator, we are using various API scripts to do the administrative task in Oracle Database.Before executing script we should test it on test/dev instance, then migrate the solution to production carefully. Here we are discussing 'how to add responsibility in oracle apps from backend' using API.



Copy below api script to add responsibility to FND User .

----------------------------------------------------------------
---------API Script to add responsibility to user in oracle apps
----------------------------------------------------------------
DECLARE
   v_user_name             VARCHAR2 (30)  := '&user_name';
   v_responsibility_name   VARCHAR2 (100) := '&Enter_responsibility_name';
   v_application_name      VARCHAR2 (100) := NULL;
   v_responsibility_key    VARCHAR2 (100) := NULL;
   v_security_group        VARCHAR2 (100) := NULL;
   v_description           VARCHAR2 (100) := NULL;
BEGIN
   SELECT fa.application_short_name, fr.responsibility_key,
          fsg.security_group_key, frt.description
     INTO v_application_name, v_responsibility_key,
          v_security_group, v_description
     FROM apps.fnd_responsibility fr,
          fnd_application fa,
          fnd_security_groups fsg,
          fnd_responsibility_tl frt
    WHERE frt.responsibility_name = v_responsibility_name
      AND frt.LANGUAGE = USERENV ('LANG')
      AND frt.responsibility_id = fr.responsibility_id
      AND fr.application_id = fa.application_id
      AND fr.data_group_id = fsg.security_group_id;

   fnd_user_pkg.addresp (username            => v_user_name,
                         resp_app            => v_application_name,
                         resp_key            => v_responsibility_key,
                         security_group      => v_security_group,
                         description         => v_description,
                         start_date          => SYSDATE,
                         end_date            => NULL
                        );
   COMMIT;
   DBMS_OUTPUT.put_line(   'Responsiblity '
                         || v_responsibility_name
                         || ' is attached to the user '
                         || v_user_name
                         || ' Successfully'
                        );
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line
                         (   'Unable to attach responsibility to user due to'
                          || SQLCODE
                          || ' '
                          || SUBSTR (SQLERRM, 1, 100)
                         );

END;
/
SHOW ERR;





It's your turn!

What do you think? Share your experience in the comments box below.⤋

rman catalog commands to register old backupset

RMAN catalog command tips | To restore the oracle database using rman , first of all we have to Cataloging RMAN backup in RMAN Catalog. There are many rman catalog commands to register the rman catalog backup piece to new location, so that rman read the backup piece and restore them. Below are some RMAN CATALOG command example.


#Catalog as Backuppiece 
in RMAN repository:-

If you wiil execute 'CATALOG BACKUPPIECE' backup will cataloged by piece. We have to run the CATALOG BACKUPPIECE command for every Backuppiece from different location so that rman register old backupset. Once all Backup piece will cataloged , start restoration oracle database.

RMAN> CATALOG BACKUPPIECE '/DATA01/BACKUP/PROD_2123.BKP';



#Catalog as Whole bakuppiece 
in RMAN repository:-

Here RMAN CATALOG START WITH command,will catalog all backup piece in single execution. Here no need to run one by one, it will cataloged all backup piece, once we will run CATALOG BACKUPPIECE with exact Backup location. 


RMAN> CATALOG START WITH '/DATA01/BACKUP/';


using target database control file instead of recovery catalog
searching for all files that match the pattern /DATA01/BACKUP/

List of Files Unknown to the Database
=====================================


File Name: /DATA01/BACKUP/DB_1_20180904_22226.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22224.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22212.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22211.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22205.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22219.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22213.rbkp
File Name: /DATA01/BACKUP/CNT_1_20180904_22238.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22229.rbkp
File Name: /DATA01/BACKUP/DB_1_20180904_22225.rbkp

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done



Now we have ‘catalog backup piece from disk ‘ , Need to do the restoration steps.



#Catalog archive log in RMAN repository.

RMAN> CATALOG ARCHIVELOG  '/oradata/archive/archive_100.dbf','/oradata/archive/archive_101.dbf';


#Catalog data filecopy in RMAN repository.

RMAN> CATALOG DATAFILECOPY '/oradata/datafile/users01.dbf' LEVEL 0;


#Catalog user managed controlfile copy in RMAN repository.


SQL> alter database backup controlfile as '/tmp/control01.ctl';

RMAN> CATALOG controlfilecopy '/tmp/control01.ctl';



#Catalog file in Flash Recovery Area and Recovery file destination in RMAN repository.



RMAN> CATALOG RECOVERY AREA NOPROMPT;


RMAN> CATALOG DB_RECOVERY_FILE_DEST;