Creating Opaque views in 10g
Hi team
I wanted to know that , Is it possible to create opaque view for a table( In Physical layer ) without necessarily importing the table into the physical layer for which view has to be created .
Thanks
Hi Rohit
Yes, sure it's possible. An opaque view is just a physical source based on a select statement. You can create this in the physical layer and add the columns manually.
Paul
Similar Messages
-
Create opaque view in OBIEE with multiple tables
Hi,
I need some help with the opaque view since i have never created it in past. I want to create an opaque view which fetches data from multiple tables. Is it possible to do that ? Or is there any other alternate option available in OBIEE ? I read the following blog and other similar blogs on opaque views but could not find option to use it for query with multiple tables:
Oracle Business Intelligence: Creating Opaque View in Physical Layer in OBIEE 10g
Also can you please advice how to join two tables from different databases in OBIEE ?
Kindly advice.
Regards,
AndyHi Andy,
As per my knowledge you can create Opaque View on one table at a time.Joining two tables from different databases yes we can create a report from multiple data sources.Check this
Rittman Mead Consulting » Blog Archive » Reporting Against Multiple Datasources in OBIEE
Mark if helps.
Thanks, -
Problems in creating Materialized View from 10g R2 to 11g
Hi,
We have two databases in 10g Release 2. These databases are on two different servers and we use
Materialized views to replicate data between these servers. We are currently using 64 bit version of
oracle 10g release 2 for LINUX.
Oracle Database 10g Release 10.2.0.1.0 - 64 bit Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
We use CENTOS 5 - 64 bit edition
We upgraded one of the databases to 11g (We exported the data from old database and
imported it in new database) . Then we tried to create a Materialized view with incremental refresh
on it where the base table is in the second Oracle 10g database.
The problem is that it is not letting us create the view with FAST Refresh. It kept on giving ORA-12028
error. We tried different remedies suggested on forums like creating a view with ROWID, but still it
continued giving us the same error. We also synchronized the characterset of Oracle 10g and Oracle 11g
installations but still it did not work.
Our base table size is pretty large (over 10 Million records) and if we do a full refresh, it takes hours to
refresh it.
Without incremental refresh, we will not be able to fucntion, and to upgrade both database simultaneously
we will need a large down-time which also we can not afford.
Please advise what should we do.
Best Regards
Madhup
Edited by: Madhup on Mar 2, 2009 10:45 AMHello,
Yesterday I met the same problem and very sad about this, however, my story is much more complicated (I think so).
I have 6 databases:
2 - 11g
2 - 10g
2 - 9i
Every database of each release has different characterset(UTF8 and AL16UTF16).
I am trying to create Materialized view with FAST REFRESH on Oracle 11g, when master tables are located on 10g database and 9i database.
Materialized view, which points to 9i database, was successfully created.
Materialized view, which points to 10g database, gets ORA-12028
Like you, I tried many notes from METALINK and thought at the begining that the problem is my characterset. But, when the materialized views were successfully built on Oracle 9i database, I understood that the problem is something else.
Did you find the actual reason why this issue does not work??
Thanks,
Alex -
Hi Experts,
why we have to create opaque view in RPD instead of creating in Physical layer we can create in DB and import it to the physical layer right.
If we consider the performance which one is efficient in both view DB or RPD
Regards,If you create a Opaque view OBIEE will execute it as a Subquery, otherwise if you create a view on the DB you won't have a Subselect, that's the main difference.
I would only go for Opaque views if there's no other solution as you can have serious performance issues.
Based on exp I would go for DB view, it performs better and the maintenance easier. -
How to create materlised view in oracle 10g what are the step to create it
hi,
this hafeez i have a database in oracle 10g now i want to create materlised view to the database what arre the step required for it.You should refer to documentation for more information:
[Overview of Materialized Views|http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#CNCPT411]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
Creating an Opaque view for generating the Action Link URL in OBIEE EBS int
Do we have to Creating an Opaque view for generating the Action Link URL in OBIEE Oracle E-Business Suite integration if we are not using BI Applications(DAC). We built our Repository on Materialized views we were using with Discoverer so I'm not sure if we have to do the part that creates an Opaque view in our integration of EBS 11i with OBIEE.
Thanks in advance.
LeoHi Leo,
This is an example from an standard Oracle repository:
select header_id , line_id, fnd_run_function.get_run_function_url(
CAST(fnd_function.get_function_id('ISC_ORDINF_DETAILS_PMV') AS NUMBER),
CAST( 'VALUEOF(NQ_SESSION.RESP_APPL_ID)' AS NUMBER),
CAST( 'VALUEOF(NQ_SESSION.RESP_ID)' AS NUMBER),
CAST( 'VALUEOF(NQ_SESSION.SEC_GROUP_ID)' AS NUMBER),
'HeaderId=' || header_id ||'&pFunctionName=ISC_ORDINF_DETAILS_PMV&pMode=NO&pageFunctionName=ISC_ORDINF_DETAILS_PMV',
null ) LINK
FROM isc_book_sum2_f
They use it in an opaque view, so you can reference session variables for login based on your responsibility.
Good Luck,
Daan Bakboord
http://www.obi-forumlive.nl/ -
Hi ,
I am using 10g Version.
In my RPD there are 5 Opaque Views. The report is very slow. How can i overcome this.
If i create Views in database for this Opaque Views is the perfomance will increase? My clinet is not Accepting the Materialized View.
Please help me on this.
ThanksHi,
Opaque Views can improve the performance but it depends on which scenario you make use of them.
An opaque view is in the physical layer a physical table that consists of a Select statement .
In the repository, opaque views appear as tables in the physical layer but the view does not actually exist.
Opaque views can be used without deploying them but the Oracle BI Server has to generate a more complex query when an opaque view is encountered.
Databases such as XLS and nonrelational database do not support opaque views and, therefore, cannot run the view deployment utility.
To verify opaque views are supported by a database, make sure that the CREATE_VIEW_SUPPORTED SQL feature is selected in the Database dialog box, in the Features tab
Also refer the below links for better understanding:
http://docs.oracle.com/cd/E10415_01/doc/bi.1013/b31770.pdf
http://gerardnico.com/wiki/dat/obiee/opaque_view
Regards
MuRam -
Abnormal behavior of Opaque view
Hello Experts,
I have a requirement in OBIEE 10g to create an opaque view.
I have created an opaque view combining 2 facts and 1 dimension table(Included only 1 column in the view) in the physical layer of the RPD with appropriate foreign key joins.
Copied the table to BMM layer, created all necessary complex joins and set the logical levels for the dimensions.
We also have a Inner join with a dimension. Copied the logical table to presentation layer.
Now, I have created a adhoc report by taking columns from the newly created view to test whether the measure values are coming up or not.
When validated the results against the original fact table the amounts were not matching.(Limited the data using fiscal year)
The report which is created from the view is showing less amounts comparitively.
I have tried checking the session log queries of both the view based report and the original fact table yielded report but I didnt see any difference in the session logs.
All the joins in both the queries are one and the same.
While adding another 4 columns from the same view the results are coming good in the pivot table.(Added using trial and error method, these 4 columns were kept in excluded section as these are unused in the report)
Even if I remove one unused column from the report, the measure values are changing.+Another important thing is I havent used any aggregations in the BMM layer for the measures.+
When aggregation is set to Sum in the BMM layer the measure values are getting doubled.(So hasnt set any aggregation in the rpd)
Used the logic IFNULL(Column,0) for all the measures in the rpd. And has set the aggregation to Sum in the pivot table.
Can anyone suggest possible workaround for this issue. This newly created view should show same results when compared to the original report.
Any suggestions are highly appreciated.
Thanks,
ObulHi Dpka,
When I set the aggregation rule to sum in BMM layer the measure values are getting doubled.
So I preferred to bypass the aggregation rule in BMM layer and has set it in the pivot table as of now. Does my approach affects anything or wats the exact difference in these two approaches?
Also do you have any clue on how to achieve correct results in the report(opaque view report) I was talking about in my first post?
Thanks,
Obul
Edited by: obul on Jan 10, 2012 4:26 AM -
Create a view to shows data from multiple rows in a single column
Hi all - this is probably posted in the wrong forum but I couldn't find which was the correct one.
I am almost a complete novice at sql but I have a need to create a view which can be developed at 10g (which runs efficiently as the volumes are likely to be high) which will do the following.
Original table with columns Parent_code, Child_code
Parent_Code Child_Code
1000 2000
1000 3000
1000 4000
2000 3000
2000 5000
(note Parents can have multiple children and a child can have multiple parents!)
What I need to end up with in my view is the following
Child_Code Parent_List
2000 '1000 (3)'
3000 '1000 (3), 2000 (2)'
4000 '1000 (3)'
5000 '2000 (2)'
Note the number in parantheses is the number of children that the parent has - ie in the original table parent 1000 has 3 rows (one for each child)
This view is then to be used as a look up (on child code) for a business objects report.
Is there anyone who could PLEASE, PLEASE help me fairly quickly on this as I have very little time to find a solution?Hi,
You can test these ones :
select child_code
, ltrim(sys_connect_by_path(parent_info,', '), ', ') as parent_list
from (
select child_code
, to_char(parent_code) ||
' (' ||
count(*) over(partition by parent_code) ||
')' as parent_info
, row_number() over(partition by child_code order by parent_code) rn
from your_table
where connect_by_isleaf = 1
connect by prior rn = rn-1
and prior child_code = child_code
start with rn = 1
select child_code,
rtrim(
extract(
xmlagg(xmlelement("e",parent_info||', ') order by parent_info)
, '//text()'
) as parent_list
from (
select child_code,
to_char(parent_code) ||
' (' ||
count(*) over(partition by parent_code) ||
')' as parent_info
from your_table
group by child_code
;What you need is called "string aggregation".
See here for various techniques, including the two above : http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php -
Error while creating materialized view which using database link
Helo!
I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
Details:
1. On destination database I create a database link:
CREATE DATABASE LINK SDATABASE
CONNECT TO MYUSER
IDENTIFIED BY MYUSERPASS
USING 'ORCL';
=> Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
2. On source database I create MATERIALIZED VIEW LOG:
CREATE MATERIALIZED VIEW LOG
ON TABLE1
WITH PRIMARY KEY
INCLUDING NEW VALUES;
3. Now, when I want to create MATERIALIZED VIEW on destination database:
CREATE MATERIALIZED VIEW TABLE1
REFRESH FAST
START WITH SYSDATE
NEXT SYSDATE + 1/1440
WITH PRIMARY KEY
AS SELECT * FROM TABLE1@SDATABASE;
...I get error "ORA-00942: table or view does not exist"!
How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
Thanks,
VorancAnd, I'm using Oracle 10g.
Voranc -
Hi All,
I am on 10.2 Standard edition and 11.1 Standard edition (2 databases in the application, one on 10g, another on 11g).
Being on standard edition, cannot use many common features e.g. partitioning, bitmap indexes etc.
I use to think that, partitioned view are no more supported by Oracle. But I can see that it works. I created 3 tables TEMP1, TEMP2 and TEMP3, all with exact same structure (columns and indices). Then created a view TEMP_VIEW, which is like
select col1, col2, col3 .... from temp1
union all
select col1, col2, col3 .... from temp2
union all
select col1, col2, col3 .... from temp3Here are the query execution and plans
/* ----------------- 10g execution plan ----------------------- */
SQL> select * from temp_view where object_id=2620 and branch_cd = 'XYZ';
OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID
OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP STATUS T G S BRANC
SYS LOADER_TRIGGER_INFO 2620
VIEW 18-FEB-09 16-APR-09 2009-02-18:10:07:57 VALID N N N XYZ
Elapsed: 00:00:00.29
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=132)
1 0 VIEW OF 'TEMP_VIEW' (VIEW) (Cost=2 Card=1 Bytes=132)
2 1 UNION-ALL (PARTITION)
3 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP1' (TABLE) (Cost=2 Card=1 Bytes=132)
4 3 INDEX (UNIQUE SCAN) OF 'TEMP1_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)
5 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP2' (TABLE) (Cost=2 Card=1 Bytes=132)
6 5 INDEX (UNIQUE SCAN) OF 'TEMP2_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)
7 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP3' (TABLE) (Cost=2 Card=1 Bytes=132)
8 7 INDEX (UNIQUE SCAN) OF 'TEMP3_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)
/* ----------------- 11g execution plan ----------------------- */
SQL> select * from temp_view where object_id=2620 and branch_cd = 'XYZ';
OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID
OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP STATUS T G S BRANC
PUBLIC GV$XML_AUDIT_TRAIL 2620
SYNONYM 16-NOV-09 16-NOV-09 2009-11-16:16:36:08 VALID N N N XYZ
Elapsed: 00:00:00.03
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=3 Bytes=396)
1 0 VIEW OF 'TEMP_VIEW' (VIEW) (Cost=6 Card=3 Bytes=396)
2 1 UNION-ALL
3 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP1' (TABLE) (Cost=2 Card=1 Bytes=102)
4 3 INDEX (UNIQUE SCAN) OF 'TEMP1_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)
5 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP2' (TABLE) (Cost=2 Card=1 Bytes=102)
6 5 INDEX (UNIQUE SCAN) OF 'TEMP2_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)
7 2 TABLE ACCESS (BY INDEX ROWID) OF 'TEMP3' (TABLE) (Cost=2 Card=1 Bytes=102)
8 7 INDEX (UNIQUE SCAN) OF 'TEMP3_PK' (INDEX (UNIQUE)) (Cost=1 Card=1)Questions
1) I am expecting same behaviour on Oracle enterprise edition, will that be the case ?
2) On 10g, execution plan shows "UNION-ALL (PARTITION)", but on 11g it says, "UNION-ALL". What does that imply?
3) Which Oracle parameter can affect this behaviour? the old partition_view_enable parameter does not exist
4) If I go ahead and use this partitioned view, in which cases this can cause problems? At this point, it looks all good if I access the view using indexed columns (of the tables and all tables involved have exactly same indexes).
Thanks in advanceBilly Verreynne is an expert in this area and has been introducing people for years to 'partition views' and you can find many of his previous posts about how and when to use them (including example code) right here in these forums (most of them will be in the SQL and PL/SQL forum).
This feature has been around since Oracle 7 and the 7.3 document that details the info is still at
http://docs.oracle.com/cd/A57673_01/DOC/server/doc/A48506/partview.htm
Here is just one of his many other threads with more example code using five tables.
Table name in from clause -
Error while creating a VIEW.Please GUIDE.
Hi,
I am getting the error
FROM sdi S where S.sdi_num=35128
Error: missing expression
when I Try to create a VIEW AS defined below:
Am I missing out anything please?
Create or Replace VIEW sdiview
AS
SELECT sdi_num,
vers_num,
cursor(SELECT acnt
FROM sdi_account A WHERE
A.sdi_num = S.sdi_num) Account,
FROM sdi S where S.sdi_num = 35128;Not sure the CURSOR expression works with Oracle 9.0.2 or not.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> create or replace view emp_dept_vw
2 as (select deptno, deptname, cursor(select empno from emp a
3 where a.deptno = d.deptno) empno from dept d
4 where d.deptno = 10);
as (select deptno, deptname, cursor(select empno from emp a
ERROR at line 2:
ORA-22902: CURSOR expression not allowedWhat about 10g?
Thanks
BB -
Error while Deploying Opaque view
Hi,
I have created an opaque view by selecting the New Physical table...option by right clicking on the database schema. I have written a statement by selecting the Table type as SELECT in the Physical Table dialog box as follows,
CREATE VIEW <view name> AS <select statement> where my select statement is like this "select * from emp".
When i'm trying to deploy the view i'm getting the following error:-
Details: [nQSError: 17001] Oracle Error code: 928, message: ORA-00928: missing SELECT keyword
at OCI call OCIStmtExecute.
[nQSError: 17011] SQL statement execution failed.
Can i know where i'm doing the mistake. Your help is greatly appreciated.
Thanks,
Kumar.Hi,
The problem caused because i used the syntax,
CREATE VIEW <view name> AS <select statement>
but we need to use only the select statement in the initialization block. -
Error while creating the view from one instance to another instance
Hi Experts
I want to Create a view which reside in one instance for example xxx Instance . I want to create the same view which reside in xxx instance to another instance for example YYY Instance How to acheive this ?
I tried desc the View take the view script from XXX instance and copied the view script to YYY instance when I compiled Iam getting an Error
For Example My view in XXX Instance
CREATE OR REPLACE FORCE VIEW xxx.sample
First_name,
last_name
as
select "F_NAME",
"L_NAME"
FROM EMP;When try to copy and compile the same view in my YYY Instance
i am getting error
ORA: table or view does not exist
Advance Thanks
ATA.T wrote:
Hi Experts ,
Thanks For all your valuable information I amTrying Of DB Link i think so
As per My understanding If wrong anywhere please advice me
Here Instance is Like : One DB 10g divided into several Instance like (test , devlopement , production Instance)
Now hope i ll make my req clear .
Coming to my reqirement
the actual table EMP is in xxi.TEST (Here xxi => Schema and test is an Instance )
I want to create the view which is based on by table EMP which in my test instance to devoplment instance
For example xxo.development (here xxo => Schema and development is an Instance )
Need to access the xxi schema in Test Instance How can I create a DB Link please share your ideas and advice me
Advance Thanks
ATIt's still not at all clear, but let me outline what I think you are after
Given a database, ORCL_A
In database ORCL_A we have a schema, HALFTRACK
User HALFTRACK has a table, MYSTUFF
Given a database, ORCL_B
In database ORCL_B we have a user GREENBRASS
User GREENBRASS needs to be able to query the table HALFTRACK.MYSTUFF.
In database ORCL_B, as user GREENBRASS
create database link mylink
connect to halftrack identified by halftracks_pswd
using ORCL_A;
select * from mytable@mylink;The db link defines a connection specification to ORCL_A, using the credentials of a user on ORCL_A. The target of the USING clause in the link definition must be an entry in the tnsames.ora file on the server hosting database ORCL_B.
When querying through the link, database ORCL_B is simply acting as a client to ORCL_A, no different that a sqlplus session on ORACL_B's server. As far as ORCL_A is concerned, ORCL_B is just another client requesting a connection, connecting with the credentials defined in the link definition. -
I need some help with a query that I need to use in order to create a view.
It's fairly complicated, at least for me.
Here is a short summary of the problem:
There is a table involved called salesperson.
This table has a four digit salespersonid, lastname, firstname, hiredate, and supervisor columns.
The supervisor column holds the four digit salespersonid of the supervisor of that particular sales person.
This column is null if that salesperson is the supervisor.
Now I need to generate a view that summarizes book sales by salesperson and shipping state.
7 columns are required.
Salespersonid
Sales person Name
State (based on shipstate)
Total number of orders
total amount of sales
Total profit
Last name of person's supervisor.
It is that last one that is giving me fits.
I don't know how to get the supervisor last name in the output.
Also, if the salesperson is the supervisor (i.e. supervisor column is null) I need to display (none) there. It can't be blank.
Here is what I have so far:
SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
SUM((retail - cost) * quantity) AS "PROFIT"
FROM salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
LEFT JOIN orderitems oi ON o.order# = oi.order#
LEFT JOIN books b ON oi.isbn = b.isbn
GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstateIt seems to me that I have to use a self join but my brain is cooked, and I can't seem to figure this out.
I have scripts here that would generate the tables and data I am using.
It's a small database. (If anyone is familiar with Oracle 10g SQL by Joan Casteel it is the JustLeeBooks database used throughout that book)
I don't really want to post these scripts here. It would make for quite a long post.
There are seven of them to get the data consistent with what I am using here.
If someone is willing to spend some time helping me, I could e-mail them the scripts.
They are the script that sets up the initial database and then 6 more scripts I have written to get to this point.
They kind of build on one another.
Send me a private message if you are willing to do that.
We could then bring the discussion back here if that is to your liking.
Any takers?
Maybe someone can help without those scripts?Hi..
If i understood you need this query can help you..
SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
SUM((retail - cost) * quantity) AS "PROFIT",
nvl(sup.lastname || ', ' || sup.firstname,'none') AS supervisor
FROM salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
LEFT JOIN orderitems oi ON o.order# = oi.order#
LEFT JOIN books b ON oi.isbn = b.isbn
LEFT JOIN salesperson sup ON s.supervisorid = sup.salespersonid
GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstate, nvl(sup.lastname || ', ' || sup.firstname,'none') Not Tested.
Tell me if there is that you need !!!
Maybe you are looking for
-
How do I turn off the window maximizing feature when I click the top window frame?
Clicking on the top window frame causes Firefox to maximize. This is the only program I have that does this, so I am constantly doing this accidentally. It causes me no end of annoyance, having to minimize the Firefox window every time to see the oth
-
CPA Cache Probelm PI 7.1
Hi Experts, Im facing a strange issue which I am totally not able to understand. As the problem is occuring in both systems simulatneously kindly request you to help this out. We are on PI 7.1 In the RWB Im getting this error in CPA cahe monitoring.
-
Screen Exit / Badi for VF01 in ECC 5.0 Version
Dear experts, I want to add some customized field(Bill of lading date) to the screen of billing header and the field should be displayed in the screens of t-code VF01 and VF02 always. I found that the BAdi: BADI_SD_CUST_HEAD But When I try to create
-
Analitic functions (problem with SELECT)
Hi! I've got a problem with analitic functions (I'm newbie in this topic). I have a table gpw_notowania which have colums: not_open, not_minimum, not_maximum, not_close, not_volume, not_sp_id and not_date. I need to receive from database the informat
-
Can I replace iphone 3G battery with battery from a 2G iphone?
A friend gave me a broken 2G that apparently has a fresh battery? My 3G battery lasts about 5 minutes. Can I put the 2G battery into the 3G phone? Are they compatible? Thanks for any help.