Posts

Showing posts from 2015

Example of Virtual private database (Security policy @ database level)

CREATE OR REPLACE FUNCTION f_policy_orders (schema   IN VARCHAR2,                                             tab      IN VARCHAR2)    RETURN VARCHAR2 AS    v_resp_id    NUMBER := 0;    out_string   VARCHAR2 (400) DEFAULT '1=2 '; BEGIN    BEGIN       SELECT fnd_global.resp_id INTO v_resp_id FROM DUAL;    EXCEPTION       WHEN NO_DATA_FOUND       THEN          v_resp_id := 0;    END;    IF v_resp_id = 62130    THEN       out_string := ' party_id = 1041 ';       else       out_string := ' 1=1';    END IF; --out_string := ' party_id = 1041 ';    RETURN out_string; END; / begin dbms_rls.add_policy('AR','HZ_CUST...

Imp Scripts useful for Oracle Developer

To set the buffer size.. set serveroutput on size 1000000 To change the password of oracle apps user.. DECLARE v_success BOOLEAN; BEGIN v_success := apps.fnd_user_pkg.changepassword('OPERATIONS','welcome123'); COMMIT; END; BEGIN if apps.fnd_user_pkg.changepassword('OPERATIONS','welcome321') then  dbms_output.put_line('Password changed'); else  dbms_output.put_line('Unable to change password '); end if; COMMIT; END; To create a tar file, give the following command: tar -cvf filename.tar directory-to-tar/* To see what files are in a tar archive, give the following command: If the file is a .tar.Z, then you use the uncompress command instead of the gzip command as follows: uncompress filename.tar.Z tar -xvf filename.tar tar -tvf filename Explanation of options: -c tells it to create -z tells it to compress -x tells it to expand -t is for table of contents -v gives you verbose output (instead of no o...