Wednesday, 30 September 2015

Find all tables in db with column name of a particular string.

Simple Steps to Do!!

Without System Privileges :
select table_name from all_tab_columns where column_name='THE_COLUMN_YOU_LOOK_FOR';
With System Privileges:
select table_name from dba_tab_columns where column_name='THE_COLUMN_YOU_LOOK_FOR';

Thursday, 24 September 2015

Change default (first) page in Apex

When you make your first application in APEX you typically have as default page 1 or the login page (101). If you want to change your default (first) page you need to have a look at three different places. Let's say we want to have page 9 as default page:

1) Application Builder > Your Application > Page 101 > Processes (Page Processing) > Login
Change Process to:
 wwv_flow_custom_auth_std.login(
   P_UNAME       => :P101_USERNAME,
   P_PASSWORD    => :P101_PASSWORD,
   P_SESSION_ID  => v('APP_SESSION'),
   P_FLOW_PAGE   => :APP_ID||':9'
   );
Whenever somebody logs in we want him to go to page 9.

2) Shared Components > Security > Authentication Schemes > Your AuthenticationChange the Logout URL: wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:9
If somebody logged out, we set the default page to 9 as that's our default page.

3) Shared Components > Security > Edit Security AttributesChange the Home Link to: f?p=&APP_ID.:9:&SESSION.
If no page is specified this is the page to go to for ex. f?p=100 means we're going to application 100 with as default page, the page specified in the Home Link. You can also reference this url by #HOME_LINK#.

Thursday, 3 September 2015

ACL in Oracle

The DBMS_NETWORK_ACL_ADMIN package provides the interface to administer the network Access Control List (ACL).

Oracle Database provides classic database security such as row-level and column-level secure access by database users. It also provides fine-grained access control for table data and for resources in Oracle XML DB Repository, for secure access by Oracle Fusion users (who are not necessarily database users). This chapter describes the access control lists and security classes that allow such fine-grained access control. It includes how to create, set, and modify ACLs and how ACL security interacts with other Oracle Database security mechanisms.

For More Detail Visit: http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_networkacl_adm.htm

BEGIN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl         => 'www.xml',
                                    description => 'WWW ACL',
                                    principal   => 'SCOTT',
                                    is_grant    => true,
                                    privilege   => 'connect');
 
  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl       => 'www.xml',
                                       principal => 'SCOTT',
                                       is_grant  => true,
                                       privilege => 'resolve');
 
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl  => 'www.xml',
                                    host => 'www.us.oracle.com');
END;
/
COMMIT;

java script calculation in tabular form



Today i found very interesting Question on Apex forum

Question:

Java script Calculation in Tabular form apex oracle 5.0
So, basically it something like there are multiple columns and each column will have numeric and character values.We need to calculate numeric values and give its particular output(result).

Java script:

  1. sal=  (parent_row.find('input[name=f05]').val().replace(/,/g,'') == ' ') ? 0 : 
  2. parseFloat(parent_row.find('input[name=f05]').val().replace(/,/g,'') );     

Everything else remain same.



Wednesday, 2 September 2015

How to add Logo and Text in your Page(region)

I just found this question on apex oracle forum and its quite interesting too.
Question :

So, basically there is one logo,some random text and report on same page.


and we said...
demo

SHA - 512 error workaround

Error : Pages with checksum required produce error: The cryptographic function "SH512" is not supported on this system

Solution:
This is basically happens when-ever you are migrating your application from Cloud base to Local Server.Due to change in EPG and Apex version.
Make sure you are running same version of oracle.

Example:
Cloud : www.apexoracle.com (cloud) uses 12 c Enterprise Edition and Apex oracle 5.0
Local Server : Apex verion < 5.0 and Sql <12 then above error will popup

So basically make sure Apex version and database version are same on local system then you are good to go else you have to make changes in LOCAL APEX 5.0.

You have to go to Shared Components > Security Attributes and click on the Expire Bookmarks button, where you can change the algorithm.

LinkedIN

Enable - Disable items in apex oracle


Mainly two ways for disabling your Item in apex oracle.
Demo

* create Dynamic action for Item

      select which item you want to Disable in Dynamic action. By following given methods in demo

* Just put READONLY in Edit item Html Attributes.

Which one is more preferable!!!
    So, basically both will work as shown in demo but when ever you want to submit your page values(reports,forms) then Readonly will allow us to submit values to the database.
  If you disable items using Dynamic action then that items will be dead for apex and it will not allow us to submit it.


Show values in right side of shuttle

While working with select list and shuttle, when we want to display values into right side of shuttle depending upon selection from select ...