Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Kishore Ryali
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

APEX Person Details Tutorials gave you an incite on Oracle Application Express's (APEX) declarative approach for developing rich web-based applications in fast development cycles.

Abdul, one of the readers asked how to access AR module tables/views in APEX?

APEX can be used to build applications on Oracle Applications (EBS) database. However you need do some preparation to access EBS database objects in APEX. It also depends upon installation/setup of APEX in your environment. Please note free APEX hosting site (apex.oracle.com) can not be used to connect to your servers.

The questions to ask before preparing APEX to access EBS objects are:

  • Is APEX installed on the same database server as Oracle EBS?
  • Is APEX installed on different database server say Reporting/Business Intelligence (BI) database which is clone of Oracle EBS database?


Suppose you want to build a report based of a view ar_customers_v in APEX, and database schema for APEX is XXAPEX. Steps involved to access this view in APEX are:


If APEX is installed on same database server as Oracle EBS:

1. Create a synonym on the view in XXAPEX schema.

CREATE SYNONYM xxapex.ar_customers_v for apps.ar_customers_v;

2. Grant privileges on ar_customers_v to XXAPEX.

GRANT SELECT ON apps.ar_customers_v to xxapex;

This is straight forward, you create a synonym for the view in XXAPEX schema and give select grants on the view to XXAPEX from APPS schema.

If APEX is installed on different database server than Oracle EBS:

For this scenario, assume EBS database server is 'DVL' and APEX database server is 'BIDVL'. Now steps involved in preparing a EBS view to be accessed in APEX are:

1. Create a database link in APEX database 'BIDVL' to EBS database 'DVL'

CREATE PUBLIC DATABASE LINK ebs_dblink
CONNECT TO XXAPEX
IDENTIFIED BY PWD
USING 'DVL';

Database link enables you to access database objects in remote database. The other database need not be Oracle database. Once database link is created, you can refer to a table or view on the other database by appending @dblink to the table or view name.

In the above command, database link is created with name 'ebs_dblink' which connects to XXAPEX user in 'DVL' remote database. USING clause has a connect string which is a service name of remote database. It must be defined in TNSNAMES.ORA.

The user running the above command must have privilege to create database link. Below SQL will help you check users having that privilege.

SELECT *
FROM dba_sys_privs
WHERE privilege = 'CREATE DATABASE LINK'
and admin_option = 'YES'

2. Create a synonym on the view in XXAPEX schema in APEX database i.e. BIDVL

CREATE SYNONYM xxapex.ar_customers_v for apps.ar_customers_v@ebs_dblink

3. Grant privileges on ar_customers_v to XXAPEX in EBS database DVL.

GRANT SELECT ON apps.ar_customers_v to xxapex;


The last two steps are similar to the steps if APEX and EBS reside in same database, except that synonym is created via database link. Below image shows how it works.

Once preparation is done for that database object, you can build report on that view using sql query say 'select * from ar_customers_v'. For APEX developers, it does not make any difference if the view is accessed via database link or is in same database. The same approach can be followed for other database objects like PL/SQL packages, APIs, etc.

Why does XXAPEX schema exists in EBS database server, if APEX installation is done in separate database?

Good question. This is where collaboration between APEX developers and DBAs in architecting how APEX works in your environment before building any applications, plays a crucial role. When database link is created you are connecting as user in remote database with a password. They should be valid user name and password for authenticating database link.

Say you created database link with APPS user. For security purposes, DBAs change passwords frequently. So when DBA changes APPS password in remote database, DBA has to ensure that all the database links pointing to that database are recreated with new password. It can be really annoying to troubleshoot such database link problem if there is no process in place.

To simplify the above problem, your DBA can create a new user say 'XXAPEX' in EBS database and never worry about changing password as it happens with APPS user. It is little convenience. It is totally upto DBAs on how to maintain sanity of database link.

 


Kishore Ryali

Comments   

0 #1 Narender Chauhan 2009-05-28 10:19
Hi Kishore,

One suggestion I need here, we need to comeup for a Reconsiliation Process and we have to install application on 10g DB(non-ebs sys) which will be connect thorugh multiple DB sources. Is Apex is right solution for that and how we will connect other DB with APEX server, we want to avoid DB LINK.

*** Naren
Quote
0 #2 Kishore Ryali 2009-05-28 16:52
Naren,

You may not sure if it can be done without Database links. You may try Database Gateways if you want to connect to heterogeneous databases. http://www.oracle.com/technology/products/gateways/index.html

Kishore
Quote
0 #3 Prafulla 2009-06-02 12:02
Kishore,

You are doing a great job for APEX community. Please keep it up. I have few questions for you plese try to answer it.
First, let me explain you our existing system.
We don't have Oracle Applications system. We have Developer 2000 Legacy software(using forms/reports 6i) system on Oracle Database 9.2.0.8 & also have APEX 3.1 o as b2b system with same database i.e. Oracle 9.2.0.8.
Synops is:
Two front end system i.e. (1) D2K Forms & Report system (2) APEX 3.1 B2B system
One Database i.e. Oracle 9.2.0.8
They have installed APEX 3.1 on Oracle 10 g Application Server & by using Oracle Net Manager they have created connection to Oracle 9.2.0.8 database.

Now we need to develop a new application in APEX 3.2 with Same Database i.e. Oracle 9.2.0.8. I think APEX 3.2 does not support Oracle Databse 9.2.0.8. Hence we have decided to install APEX 3.2 either on Oracle 10g or 11g Enterprise edition, because they are going to migrate Oracle Database 9.2.0.8 to Oracle 10g/11g. But for development we need to install APEX 3.2 and connect to Oracle Databse 9.0.2.8. Is it possible to install APEX 3.2 to Oracle 10g or 11g Application server & then connect to Database 9.2.0.8?? Also we need to migrate Oracle Forms/Reports 6i to APEX 3.2? Please help me how to migrate those reports!!

I will appreciate your help.
Quote
0 #4 Kishore Ryali 2009-06-05 07:09
Prafulla,

APEX 3.2 comes with useful Form conversion utility to convert Oracle 6i forms to APEX forms. Please see this documentation http://download.oracle.com/docs/cd/E14373_01/migrate.32/e13368/appmgr_forms.htm
I heard this doesnt convert trigger code, so manual effort is still required to get functionality in APEX forms.

Coming to your architecture on APEX 3.2 installed on Oracle 10g/11g and connecting to Oracle 9i looks fine conceptually. I will try find any notes if I can on Oracle 3.2 on Oracle 9i.

Thanks
Kis hore
Quote
0 #5 Prafulla 2009-06-12 16:40
Hi Kishore,

Thank s for your help. APEX forms migration notes really help me to get my work done.
Did you get the chance to find the notes to install APEX 3.2 on Oracle 10g/11g & connecting to Oracle 9i?

I will appreciate your help.

Thanks,
Prafulla
Quote
0 #6 Vishal 2009-09-23 17:34
Hi Anil/Kishore,
W e are archiving data from Apps to another DB(Target-ABC Schema) from where we access data via a DB Link.
We have a schema called Archive (which pulls data from the Target-ABC Schema) based on a View created on the target table using a db-link.
We need to show this information through the Self Service Forms. Unlike the Standard forms which work on Data Groups, self service forms do not
work on the concept of Data Groups, is there a way/method in which the DATA can be shown on the Self Service Forms.
--Vishal Subrahmanyam
Quote
0 #7 Kishore Ryali 2009-09-28 09:57
Hi Vishal,

Were you not able to see the view when you create view object? You can change schema when you do it.

Kishore
Quote
0 #8 Vishal 2009-09-28 11:47
Hi Kishore,
We can very much see the View in the schema we created, and the view also returns data when queried, but it the Form which OPENs up in a Web Browser (Self Service Form) which has NO data.
We need to see the Archived information from this screen which no longer exists in the APPs Schema.
Hope this is clear.

Regards ,
Vishal Subrahmanyam
Quote
0 #9 Kishore Ryali 2009-09-28 12:27
Vishal,

My question was how did you create your OAF page? Is your view object based on view over dblink?

Kishor e
Quote
0 #10 Vishal 2009-10-01 18:05
Hi Kishore,
We did not create any new OAF page or anything. We have a responsibility suffixed with " - Archive" for each resposibility under a module.
For instance a XYZ GL Super User will have a "XYZ GL Super User - Archive" which has the same set of Forms/Functions /Menus as that of the regular one. The only difference is that when we access the Archived Data from the ARCHIVE resp. it hits the VIEWs created using the dblink.
GL_JE_B ATCHES would be ARCHIVE.GL_JE_B ATCHES (a view) pointing to the GL_JE_BATCHES_H (the history table) in which the Archived Data is lying.
Hope this gives a good picture.
Regard s,
Vishal.
Quote
0 #11 Vishal 2009-10-01 18:09
Kishore,
Added more technical details below.......... .
ARCHIVE.GL_JE _BATCHES (a view) pointing to the GL_JE_BATCHES_H (the history table)
create view ARCHIVE.GL_JE_B ATCHES as select col1, col2, ......from GL_JE_BATCHES_H @SOURCE_TO_TARG ET;
The GL_JE_BATCHES_H (the history table) lies in a diff DB, which holds the Archived Data.
Regards,
Vishal S
Quote
0 #12 Kishore Ryali 2009-10-14 06:25
Vishal,

Did you make any break through in it? Please share if you have.

Kishore
Quote
0 #13 Peter Ridhardson 2009-11-03 20:43
I am trying something similar but I get the error message "Workspace ????? has no priveleges to Parse as schema owner".
I have created te public database link with the owner's name, password and tnsnames.ora entry. It works fine when I SELECT in sqlplus.
When i try to use the same synonyms from within APEX the error occurs.
Can you help, please, cheers Peter
Quote
0 #14 Prasad Dasari 2010-05-08 16:50
APEX installation is done in separate database,so that we created new DBlink to view EBIS tables.
Finally we are able to run the APPS Tables in SQL Workshop that is fine. But the problem here is i am not able to create report
by using apps tables, still it is not showing apps table in the list.Please help on this. :o :o
Quote
0 #15 Kishore Ryali 2010-05-09 11:10
Hi Prasad,

APEX would only show tables/views that are created in apex schema. If you've created synonyms on apps views over dblinks, they are still be used in apex. But Form wizards or Query builder will not help you. In this case, you've create report or form manually.
Quote
0 #16 muzeeb 2010-09-16 14:59
Could u help to Sort from this Problem
I would like to migrate Oracle apps 10g forms to Oracle apps 6i forms and If i convert 10g forms to 6i , if the forms will work or not .
or
I would like to migrate Oracle 10g forms to Oracle 6i forms and If i convert 10g forms to 6i , if the forms will work or not .
Quote
0 #17 Steve Teale 2010-09-29 23:43
muzeeb,

Ignori ng the rather obvious - why on earth would you want to go from 10g back to 6i (supportability issues etc) I would ask you how you plan on converting them ?

I'm not aware of a conversion tool for that direction. If you open a 10g form in 6i forms designer I think from memory you get a message in the tool with a message similar to 'this module has been saved with a different version of the tool' or words to that effect.

Have you had someone do development work for apps and they've used the 10g client instead of the 6i forms your apps version is currently on ?
Quote
0 #18 Steve Teale 2010-09-29 23:49
Kishore - I was hoping from the title of this article that it would cover concepts such as SSO, apps_initialise or other method of establishing an apps session so your context was set to a responsibility. At the very least you often need a language setting when accessing apps objects and often you need an fnd_user handle for the who columns (if you are inserting or updating into custom apps tables - wouldn't recommend doing anything to standard apps tables). For some objects you also need an org context also. Have you come across anyone using APEX to access such objects as these (maybe for using APEX as a custom application that needs to share information with an eBiz instance) ?
Quote
0 #19 Steve Teale 2010-09-29 23:52
LOL - sorry - I should have scrolled down first - I can now see a separate article that covers that ;)

mea culpa ;)
Quote
0 #20 amitsury 2010-10-19 03:11
Hi
we have developed the apex application and publish the application on Apex schema installed in one database. Now i need to access some table from separate database. we do not want to access the table over DB link. Can we configure data source in apex repository schema to access the object on other database by passing userid/password @connection_str ing.
I mean smiler to other java base web application access the database by configuring the data source info in web server as userid/password @connection_str ing pattern.
Apprec iate your time and feedback on this in advance
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner