Friday, April 11, 2008

How to ftp from cmd to server and apply patch?

ftp
user

bin
hash
put
bye

adpatch options=hotpatch

How to ftp from cmd to server and apply patch?

ftp
user

bin
hash
put
bye

adpatch options=hotpatch

How to bounce Middle tier & DB?

Below are the steps to bounce Middle tier.
1. Login to instance using
2. cd $OAD_TOP/admin/scripts/
3. adstpall.sh apps/apps
wait for moment
4. adstrtal.sh apps/apps

Below are the steps to bounce DB
1. Login to instance using
2. sqlplus "/ as sysdba"
3. shut abort
wait for 2 mins
4. startup

Below are the steps to start conc manager service.
1.Login to instance using
2.cd $OAD_TOP/admin/scripts/
3.adcmctl.sh start apps/apps

Debug procedure for PLSQL

DROP TABLE ENRICH_DEBUG
/
CREATE TABLE ENRICH_DEBUG
(
SEQ_LINE NUMBER,
MSG VARCHAR2(2000 BYTE)
)
/
DROP SEQUENCE ENRICH_DEBUG_SEQ
/
create sequence ENRICH_DEBUG_SEQ increment by 1 start with 1
/
CREATE OR REPLACE PROCEDURE ENRICH_DEBUG_PROC(MSG VARCHAR2)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
LN_SEQ NUMBER;
BEGIN
SELECT ENRICH_DEBUG_SEQ.NEXTVAL INTO LN_SEQ FROM DUAL;
INSERT INTO ENRICH_DEBUG VALUES (LN_SEQ,MSG);
COMMIT;
END;
/
DBMS_OUTPUT.PUT_LINE Can print upto 255 chars only.
FND_FILE.PUT_LINE can print upto 32767 chars only.
Solution:
create or replace procedure xxfile_output(msg varchar2)
is
begin
if length(msg) > 255 then
dbms_output.put_line(substr(msg,1,255));
else
xxfile_output(substr(msg,256));
end if;
end;

AUTHID CURRENT_USER/ AUTHID DEFINER:
procedure xxfile(msg varchar2)
AUTHID CURRENT_USER
is
xxfileout(msg);
end;

In above example, procedure will compile reference to xxfileout at run time with the login user.
Else proc xxfile will compile xxfileout at declaration time with create user.

DECLARE
    lb_status BOOLEAN;
BEGIN
    lb_status := FND_USER_PKG.CHANGEPASSWORD
                                                            (
                                                                username           => 'SJAKKULA',
                                                                newpassword     => 'Welcome'
                                                           );

    IF lb_status
    THEN
        DBMS_OUTPUT.PUT_LINE('Request processed sucessfully'); 
    ELSE
        DBMS_OUTPUT.PUT_LINE('Error while processing the request'||substr(SQLERRM,1,500)); 
    END IF;
END;

Commit;

Commit is very important here. Otherwise Password would not change. If you write cursor also, commit is required.

There is patch to expire password of all users in application.

FNDLOAD,WFLOAD Commands

Pls find the commands to download the data using FNDLOAD utility
1 - Printer Styles
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME="printer style name"

2 - Lookups
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="prod"
LOOKUP_TYPE="lookup name"

3 - Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=?COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME="prod" DESCRIPTIVE_FLEXFIELD_NAME="desc flex name" P_CONTEXT_CODE="context name"

4 - Key Flexfield Structures
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=?COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL? APPLICATION_SHORT_NAME="prod" ID_FLEX_CODE="key flex code" P_STRUCTURE_CODE="structure name"

5 - Concurrent Programs
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME="prod" CONCURRENT_PROGRAM_NAME="concurrent name"

FNDLOAD apps/apps@dev O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXFINARKIGENPER270.ldt PROGRAM APPLICATION_SHORT_NAME="XXFIN" CONCURRENT_PROGRAM_NAME="XXFIN_AR_PROV_KI_GEN_PER270"

6 - Value Sets
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME="value set name"

7 - Value Sets with values
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME="value set name"

8 - Profile Options
FNDLOAD apps/apps\@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME="profile option" APPLICATION_SHORT_NAME="prod"

8 - Request Groups
FNDLOAD apps/apps\@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP REQUEST_GROUP_NAME="request group" APPLICATION_SHORT_NAME="prod"

10 - Request Sets
FNDLOAD apps/apps\@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SET
APPLICATION_SHORT_NAME="prod" REQUEST_SET_NAME="request set"

11 - Responsibilities
FNDLOAD apps/apps\@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY="responsibility"

12 - Menus
FNDLOAD apps/apps\@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME="menu_name"

13 - Messages
FNDLOAD apps/apps@seed115 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct file_name.ldt FND_NEW_MESSAGES MESSAGE_NAME="message_name" APPLICATION_SHORT_NAME=”prod”

To upgrade-- WFLOAD apps/pwd 0 Y UPGRADE file.wft
To upload-- WFLOAD apps/pwd 0 Y UPLOAD file.wft
To force-- WFLOAD apps/pwd 0 Y FORCE file.wft
To download-- WFLOAD apps/pwd 0 Y DOWNLOAD file.wft ITEMTYPE1 [ITEMTYPE2 ...ITEMTYPEN]

AKLOAD for jlts
java oracle.apps.ak.akload apps apps THIN "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<>)(PORT=<>))(CONNECT_DATA=(SID=kalr12)))" DOWNLOAD task.jlt GET REGION FND

XDFLOAD for xdfs
XDFLOAD apps/apps

how to transfer workflow business events?
wmximport, its a java class available in package oracle.apps.fnd.wf
wmximport -d/-u d-download u-upload

LDT file will not remove rows from DB if you remove the blocks from Ldt file and apply