Friday, March 22, 2019

Oracle Apps: How to set Profile Option Value to enable personalization from backend


In this post, I will just post a sample code to set a profile option value from the backend.

This is the sample screen shot of the Profile Option Definition.
Navigation :- Application Developer --> Profile --> System




 --To set the Profile value at user Level

BEGIN
   IF fnd_profile.save (profile_name    => 'DIAGNOSTICS',
                        profile_value   => 'Y',
                        level_name      => 'USER',
                        level_value     => 4516) -- User ID from fnd_user table
   THEN
      DBMS_OUTPUT.put_line ('Success');
   ELSE
      DBMS_OUTPUT.put_line ('Fail');
   END IF;

   COMMIT;
END;

Wednesday, March 6, 2019

sqlplus : multiple scripts in argument (batch execution) (sql*plus)


execute multiple sql files at once in command prompt

U:\>test.cmd

U:\>(
echo set serverout on
 echo @u:\test.sql
 echo @u:\test.sql
)  | sqlplus user/pass@testdb

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Aug 13 12:50:05 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

SQL> SQL> test

PL/SQL procedure successfully completed.

SQL> test

PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Pro
duction
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

U:\>