Posts

Showing posts from January, 2013

Managing Oracle Apps User Passwords

1.         Changing the oracle apps user password from Database         DECLARE            V_pwdchanged BOOLEAN;       BEGIN          v_pwdchanged := fnd_user_pkg.changepassword('USER_NAME','welcome@123');          IF v_pwdchanged THEN          DBMS_OUTPUT.put_line('password changed Sucessfully');          ELSE          DBMS_OUTPUT.put_line('Failed to change the Password');         END IF;       END; 2.         Force All Application users to Change their password The script to expire all passwords in the fnd_user table is $FND_TOP/patch/115/sql/AFCPEXPIRE.sql. It can be executed from SQL*Plus or as a Concurrent Program: sqlplus -s APPS/ @AFCPEXPIRE.sql or Submit concurrent request: CP SQL*Plus Expire FND_USER Passwords This script sets the fnd_user.password_date to null for all users which causes all user passwords to expire. It can also be run as a SQL*Plus concurrent program. The user will need to create a new

How To Select Multiple Rows From Dual

Ex:1 select rownum from dual connect by level <=7 Output: 1 2 3 4 5 6 7 Ex:2 select * from ( select * from dual connect by level <= 1000); Ex:3 SELECT decode ( rownum ,1, '1,00,000-2,00,000'       ,2,'2,00,000-3,00,000'       ,3,'3,00,000-4,00,000'       ,4,'4,00,000-5,00,000'       ,5,'5,00,000-6,00,000'       ,6,'6,00,000-7,00,000'       ,'Above 7 Lakh') Sal_range From DUAL connect by level <= 7 ; Output: SAL_RANGE 1,00,000-2,00,000 2,00,000-3,00,000 3,00,000-4,00,000 4,00,000-5,00,000 5,00,000-6,00,000 6,00,000-7,00,000 Above 7 Lakh Ex:4 SELECT rownum FROM (   SELECT 1 FROM DUAL GROUP BY CUBE (1,2,3)); output: 1 2 3 4 5 6 7 8