Materialized Views over VPN
I have a Database on Oracle 10g R1 on Windows 2003 server. I have created materialized view logs on this database with
"CREATE MATERIALIZED VIEW LOG ON <BASE_TABLE> TABLESPACE <tablespace>
NOCACHE
LOGGING
NOPARALLEL WITH ROWID, PRIMARY KEY EXCLUDING NEW VALUES;"
I have created materialized view on my Desktop database (Oracle Express Edition).
I can generate the materialized view on XE from these mvlogs
I created the database link
CREATE PUBLIC DATABASE LINK DBLNK CONNECT TO <central_user> IDENTIFIED BY <central_user_passwd> USING '<central_db_sid>';
The script to create the materialized view on XE is
CREATE MATERIALIZED VIEW <MVIEW_NAME>
NOCACHE
LOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
REFRESH FAST ON DEMAND
WITH PRIMARY KEY
AS
SELECT *
FROM <base table>@DB_LINK ;
1.) When I create the materailized view on LAN, it is working.
2.) But when I try to create the same on Oracle XE over VPN, so that I do not have to connect to main database On VPN, it just hangs.
3.) I am using Cisco VPN connection.
4.) I am able to access the tables as "select * from <table>@dblnk", so the database link is working, but I cannot create the materialized view.
5.) Please note that the Global names are not set on any of the databases.
6.) I checked the v%session_wait, and I get WAIT_CLASS as NETWORK.
7.) But I do not get any session while this Create script is fired on VPN on the Central Database in v$session.
8.) But when I do “select * from <table>@dblnk" I get this connection in v$session on the central database.
9.) The Global Names setting is FALSE at the main database and the XE end also.
--> If the database link is working, and on LAN with same setting of the XE databases it is working, it should work on VPN also, right?
--> I am able to tnsping to the main 10g R1 database on Windows 2003 server. I am able to log in to the database, access the tables and do everything,
but not able to create the materialized view on my XE database over the VPN.
So the most important question is
A.) Can the Materialized views be created over VPN?
B.) Is there some problem with the Global Names settings in database?
What do you mean by "complex query"? Oracle defines a complex query as one that cannot be fast refreshable, so that you could not get a delta. Many queries that people would describe as complex, however, are not technically complex in an Oracle replication context or can be made non-complex.
Justin
Similar Messages
-
User defined function in materialized view over db link
I am working in Oracle 10g. Trying to create a materialized view to populate a reporting warehouse from a transactaional database (also oracle 10g).
In SQL plus I can access a function in a package on the remote database but when I try to use the "working" sql statement in a materialized view I get an invalid identifier error.
Basically my select statement is ...
select
ColA,
ColB,
PackageName.Function@db_link(parameters)
from
SourceTable@db_link .....
The select statement works but when I use it within a create materialized view statement I get ora-00904: PackageName.Function: invalid identifier.
Any help is appreciated.
Tx,What about the error message doesn't make sense?
The identifier is valid when used in the SQL statement outside of the Create Materailized view. It is my understanding that "most any" valid SQL statement should be usable in an MV.
Put the function in the local schema?
I tried that. If the function does not have any input parameters it works. But if it has input parameters the create view statement complains about ORA-00997: illegal use of LONG datatype.
I made a real simple function Pkg.ASTRING - no input parameters just returns the string 'ABC' -- that worked.
Then I added an input parameter Pkg.ASTRING (TheInString VARCHAR2) that returns the same 'ABC' string.
When I include it in the create MV statement Pkg.ASTRING('XYZ') I get the illegal use of LONG datatype.
What LONG datatype? -
Materialized View and Ord Media questions
Hey Guys,
My first question is on the use and creation of materialized views which i have previously done using TOAD. The question that i have is where/if can i visually see the constraints that are on a materialized view and where is the information for "next refresh" times placed?
Question two is about viewing informaiton on ord media objects that are stored. Previously, i had the ability to double click one of these elememts in the data view and see the information related to that instance of the ord media object, but the SQL developer does not seem to have this ability??
Thanks in advance.Thanks Kris,
The reason that i asked about the constraints on MV is because when you create a materialized view over a db link with primary key, it will place a not null constraint on every column. This is obviously no good because some rows are bound to contain nulls and these need to be removed and updated before it will work!
As for the ord objects, it just makes it a little easier for testing to see what they are :).
Anyway, its looking great and i hope these features will be in the next release?
Cheers David -
Illegal use of LONG datatype error message when i create materialized view
Hello to all
I want create read only materialized view replication environment two of our tables have LONG datatype when i create materialized view against on them
I recieve this error message
CREATE MATERIALIZED VIEW MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID AS SELECT * FROM MDB.TOAD_PLAN_TABLE@arahisto
Error report:
SQL Error: ORA-00997: illegal use of LONG datatype
00997. 00000 - "illegal use of LONG datatype"
Do you know any resort solution for it?
thanksYou can not use longs in materialized views over a database link, you can however take a part of a long over to a materialized view.
I have gotten this to work in the past l had to create a PL/SQL function that you can use to extract the character data from the long column and use that to
as part of the function you will need to pass in the columns of the table that will identify the unique records so you can pick out the long column
example function
-- you will need to make sure this funtion is in the remote location as you can not select longs accross a DB LINK.
CREATE OR REPLACE FUNCTION MDB.TOAD_PLAN_LONG_CONV
(pass in the primary key columns for the table)
RETURN VARCHAR2
IS
v_long VARCHAR2(32767) ;
BEGIN
BEGIN
-- need to select the long column into the PL/SQL variable
SELECT long_column
INTO v_long
FROM MDB.TOAD_PLAN_TABLE
WHERE key_columns = passed columns ;
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE = '-01406' THEN
NULL ;
ELSE
RAISE ;
END IF ;
END ;
RETURN SUBSTR(v_long,1,4000) ;
END ;
Then when you create the materialized view utilize that function on the long column.
create or replace materialized view MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID
AS
SELECT column1, .... columnx,
MDB.TOAD_PLAN_LONG_CONV@arahisto (primary key column list) as long_column_name
FROM MDB.TOAD_PLAN_TABLE@arahisto ;
See if this will work for you? Keep in mind however this solution will not get the entire long column only as much as a PL/SQL variable will hold of it.
Mike -
Error insert data over db link in table covered by materialized view
Hello together,
following problem:
I got a table called LOCATION_INFO which is defined:
create table LOCATION_INFO
LOCATION_ID VARCHAR2(40) not null,
PLANT VARCHAR2(4) not null,
PRODUCT VARCHAR2(3),
AREA VARCHAR2(1),
LINE NUMBER(10),
STATION NUMBER(10),
STATINDEX NUMBER(10),
FU NUMBER(10),
WP NUMBER(10),
TP NUMBER(10),
LOCATION_LEVEL NUMBER(1) not null,
LOCATION_PARENT_ID VARCHAR2(40),
TIME_STAMP TIMESTAMP(6) WITH TIME ZONE not null
I try to load data over PL/SQL procedure from another database using database link:
INSERT INTO LOCATION_INFO
(LOCATION_ID,
PLANT,
PRODUCT,
AREA,
LINE,
STATION,
STATINDEX,
FU,
WP,
TP,
LOCATION_LEVEL,
LOCATION_PARENT_ID,
TIME_STAMP)
SELECT LOCATION_ID,
PLANT,
PRODUCT,
AREA,
LINE,
STATION,
STATINDEX,
FU,
WP,
TP,
LOCATION_LEVEL,
LOCATION_PARENT_ID,
GetUTCDateTime(TIME_STAMP) AS time_Stamp
FROM LOCATION_INFO@SOURCE_MMPDDB
WHERE ROWNUM < 100;
This works fine (If i do select count(*) from location_info the data is present) but if set a commit
ORA-00603 appears and the session is terminated.
The point is i got a materialized view MVIEW_LOCATIONS in another schema in the database reading the data from my table location_info and a corresponding MVIEWLOG.
create table MLOG$_LOCATION_INFO
LOCATION_ID VARCHAR2(40),
SNAPTIME$$ DATE,
DMLTYPE$$ VARCHAR2(1),
OLD_NEW$$ VARCHAR2(1),
CHANGE_VECTOR$$ RAW(255)
CREATE MATERIALIZED VIEW MVIEW_LOCATIONS
REFRESH FAST ON COMMIT
ENABLE QUERY REWRITE
AS
SELECT "LOCATION_INFO"."LOCATION_ID" "LOCATION_ID","LOCATION_INFO"."PLANT" "PLANT","LOCATION_INFO"."PRODUCT" "PRODUCT","LOCATION_INFO"."AREA" "AREA","LOCATION_INFO"."LINE" "LINE","LOCATION_INFO"."STATION" "STATION","LOCATION_INFO"."STATINDEX" "STATINDEX","LOCATION_INFO"."FU" "FU","LOCATION_INFO"."WP" "WP","LOCATION_INFO"."TP" "TP","LOCATION_INFO"."LOCATION_LEVEL" "LOCATION_LEVEL","LOCATION_INFO"."LOCATION_PARENT_ID" "LOCATION_PARENT_ID","LOCATION_INFO"."TIME_STAMP" "TIME_STAMP" FROM "CP4MMPDNEW"."LOCATION_INFO" "LOCATION_INFO";
What do I need to do to make the insert working properly without deleting my mviews?
Can anyone help me?
Thanks, MatthiasHelllo,
Can you change this on your Materialized View DDL:
REFRESH FAST ON COMMITTo:
REFRESH FAST ON DEMANDThen, if your INSERT and COMMIT works OK then, can you try:
exec DBMS_MVIEW.REFRESH('MVIEW_LOCATIONS') -
Materialized view to ensure data integrity over multiple tables
Hello,
I have a problem and I am not able to solve it. Partially, It is because of my poor SQL skills. I have three tables and I am using one sequence to enter data into them.
What I am tying to do is to create a materialized view ( complete or fast, whichever) with refresh on commit option to check that each table contains unique data in comparison to other.
I am posting code so you can get along:
CREATE TABLE table_1 (
ID NUMBER PRIMARY KEY
CREATE TABLE table_2 (
ID NUMBER PRIMARY KEY
CREATE TABLE table_3 (
ID NUMBER PRIMARY KEY
INSERT INTO table_1 VALUES (1);
INSERT INTO table_1 VALUES (2);
INSERT INTO table_2 VALUES (3);
INSERT INTO table_2 VALUES (4);
INSERT INTO table_3 VALUES (5);
INSERT INTO table_3 VALUES (6); I want to write create a materialized view that will give me output only in case that there are same values in two different tables. I got this far.
CREATE MATERIALIZED view mv_test
REFRESH COMPLETE ON COMMIT
AS
SELECT count(1) ROW_COUNT
FROM dual
WHERE EXISTS (
SELECT a.id
FROM table_1 a
WHERE a.id IN(
SELECT b.id
FROM table_2 b))
OR EXISTS (
SELECT a.id
FROM table_1 a
WHERE a.id IN
(SELECT c.id
FROM table_3 c))
OR EXISTS (
SELECT b.id
FROM table_2 b
WHERE b.id IN
(SELECT c.id
FROM table_3 c));
ALTER MATERIALIZED VIEW mv_test
ADD CONSTRAINT cs_mv_test
CHECK (row_count = 0) DEFERRABLE; This sql statement itself returns no rows if my logic is correct. And in case there were some duplicate rows in two different table, it would return 1 and constraint would throw an error.
However, I cannot create this with ON COMMIT option. When I try to compile I get:
ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view I went through documentation, tried creating mat_view logs etc.
I know that one of the mistakes is that I am referencing dual table and I am not sure if I can use EXISTS.
Unfortunately, my SQL wisdom ends here. I need help rewriting the sql, so it would work in materialized view with refresh on commit option. Please, help!!!
I know that since I am using a sequence there is little chance that same value will get into two different tables, but I would like to perform somekind of check.
Thank you in advance.>
I know that since I am using a sequence there is little chance that same value will get into two different tables, but I would like to perform somekind of check.If you are certain that you control all the inputs to the table and you are definitely using one sequence to insert into all three tables then there is physically no possible way you will get duplicate values across tables.
Writing something to check if this is the case would almost be like writing something to verify that 1+1 really does equal 2 in 100% of cases.
if you must, however. consider something similar to the following which may be more performant:
select *
from table_1 t1
full outer join table_2 t2 on (t1.id = t2.id)
full outer join table_3 t3 on (t1.id = t2.id
or
t2.id = t3.id)
where t1.id+t2.id+t3.id not in (t1.id,t2.id,t3.id); -
How to get Materialized View to ignore unused columns in source table
When updating a column in a source table, records are generated in the corresponding materialized view log table. This happens even if the column being updated is not used in any MV that references the source table. That could be OK, so long as those updates are ignored. However they are not ignored, so when the MV is fast refreshed, I find it can take over a minute, even though no changes are required or made. Is there some way of configuring the materialized view log such that the materialized view refresh ignores these updates ?
So for examle if I have table TEST:
CREATE table test (
d_id NUMBER(10) PRIMARY KEY,
d_name VARCHAR2(100),
d_desc VARCHAR2(256)
This has an MV log MLOG$_TEST:
CREATE MATERIALIZED VIEW LOG ON TEST with rowid, sequence, primary key;
CREATE MATERIALIZED VIEW test_mv
refresh fast on demand
as
select d_id, d_name
from test;
INSERT 200,000 records
exec dbms_mview.refresh('TEST_MV','f');
update test set d_desc = upper(d_desc) ;
exec dbms_mview.refresh('TEST_MV','f'); -- This takes 37 seconds, yet no changes are required.
Oracle 10g/11gI would love to hear a positive answer to this question - I have the exact same issue :-)
In the "old" days (version 8 I think it was) populating the materialized view logs was done by Oracle auto-creating triggers on the base table. A "trick" could then make that trigger become "FOR UPDATE OF <used_column_list>". Now-a-days it has been internalized so such "triggers" are not visible and modifiable by us mere mortals.
I have not found a way to explicitly tell Oracle "only populate MV log for updates of these columns." I think the underlying reason is that the MV log potentially could be used for several different materialized views at possibly several different target databases. So to be safe that the MV log can be used for any MV created in the future - Oracle always populates MV log at any update (I think.)
One way around the problem is to migrate to STREAMS replication rather than materialized views - but it seems to me like swatting a fly with a bowling ball...
One thing to be aware of: Once the MV log has been "bloated" with a lot of unneccessary logging, you may perhaps see that all your FAST REFRESHes afterwards becomes slow - even after the one that checked all the 200000 unneccessary updates. We have seen that it can happen that Oracle decides on full table scanning the MV log when it does a fast refresh - which usually makes sense. But after a "bloat" has happened, the high water mark of the MV log is now unnaturally high, which can make the full table scan slow by scanning a lot of empty blocks.
We have a nightly job that checks each MV log if it is empty. If it is empty, it locks the MV log and locks the base table, checks for emptiness again, and truncates the MV log if it is still empty, before finally unlocking the tables. That way if an update during the day has happened to bloat the MV log, all the empty space in the MV log will be reclaimed at night.
But I hope someone can answer both you and me with a better solution ;-) -
Leave a distinct value in a materialized view on two tables
Hi and thank you for reading,
I have the following problem. I am creating a materialized view out of two tables, with "where a.id = b.id".
The resulting materialized view list several values twice. For example, one customer name has several contact details and thus the customer name is listed several times. Now I would like to join each customer name with just ONE contact detail, how can I do that? (Even if I would loose some information while doing this).
Thanks
EvgenyHi,
You can do this
SELECT deptno, empno, ename, job, mgr, hiredate, sal, comm
FROM emp_test
ORDER BY deptno;
DEPTNO EMPNO ENAME JOB MGR HIREDATE SAL COMM
10 7782 CLARK MANAGER 7839 1981-06-09 2450
10 7839 KING PRESIDENT 1981-11-17 5000 0
10 7934 MILLER CLERK 7782 1982-01-23 1300
20 7566 JONES MANAGER 7839 1981-04-02 2975
20 7902 FORD ANALYST 7566 1981-12-03 3000
20 7876 ADAMS CLERK 7788 1987-05-23 1100
20 7369 SMITH CLERK 7902 1980-12-17 800
20 7788 SCOTT ANALYST 7566 1987-04-19 3000
30 7521 WARD SALESMAN 7698 1981-02-22 1250 500
30 7844 TURNER SALESMAN 7698 1981-09-08 1500
30 7499 ALLEN SALESMAN 7698 1981-02-20 1600 300
30 7900 JAMES CLERK 7698 1981-12-03 950
30 7698 BLAKE MANAGER 7839 1981-05-01 2850
30 7654 MARTIN SALESMAN 7698 1981-09-28 1250 1400
14 rows selected.
SELECT CASE
WHEN ROW_NUMBER () OVER (PARTITION BY deptno ORDER BY empno) =
1
THEN deptno
END deptno,
empno, ename, job, mgr, hiredate, sal, comm
FROM emp_test;
DEPTNO EMPNO ENAME JOB MGR HIREDATE SAL COMM
10 7782 CLARK MANAGER 7839 1981-06-09 2450
7839 KING PRESIDENT 1981-11-17 5000 0
7934 MILLER CLERK 7782 1982-01-23 1300
20 7369 SMITH CLERK 7902 1980-12-17 800
7566 JONES MANAGER 7839 1981-04-02 2975
7788 SCOTT ANALYST 7566 1987-04-19 3000
7876 ADAMS CLERK 7788 1987-05-23 1100
7902 FORD ANALYST 7566 1981-12-03 3000
30 7499 ALLEN SALESMAN 7698 1981-02-20 1600 300
7521 WARD SALESMAN 7698 1981-02-22 1250 500
7654 MARTIN SALESMAN 7698 1981-09-28 1250 1400
7698 BLAKE MANAGER 7839 1981-05-01 2850
7844 TURNER SALESMAN 7698 1981-09-08 1500
7900 JAMES CLERK 7698 1981-12-03 950
14 rows selected.Edited by: Salim Chelabi on 2009-09-14 08:13 -
Dynamic calculations in a materialized view
Hi,
I have a problem. I created a materialized view which works perfectly. But now I need to perform some calculations with the data in my view . The view contains the working hours of employees who worked in different projects. Every project has a fixed amount of time (time_available) in which the employee has to finish the project. I aggregated the working hours to month for better presentation. What I want to accomplish here is a "simple" subtraction of "fixed amount for a project" minus "working hours" for the employee.
The problem here is that some project have duration of more that just one month. Naturally all my values are in one tuple for every month. So when I have 3 month of working hours for a project my view looks like this:
MV_Working_Hours:
Project --- Time_Available --- DATE --- Employee --- Working Days
Project A --- 50 Days --- 2011-05 --- Mr. A --- 15 Days
Project A --- 50 Days --- 2011-06 --- Mr. A --- 16 Days
Project A --- 50 Days --- 2011-07 --- Mr. A --- 16 Days
What I want to do is to calculate the remaining days like this :
Project --- Time_Available --- DATE --- Employee --- Working d in Month ---reaming days
Project A --- 50 Days --- 2011-05 --- Mr. A --- 15 Days --- 35 Days
Project A --- 50 Days --- 2011-06 --- Mr. A --- 16 Days --- 19 Days <--- I get here 34 which is for my need wrong !!!
Project A --- 50 Days --- 2011-07 --- Mr. A --- 16 Days --- 3 Days
Is there a way to realize this with "just" sql or do I have to use pl/sql in the OWB? I use the OWB version 11gR2
thxFor everybody who is confronted with the same problem I have - here is the solution: (thx to "spencer7593" and "Justin Cave" from StackOverflow)
SUM( "Working Days" )
OVER (PARTITION BY "Product", "Employee"
ORDER BY "DATE"
ROWS UNBOUNDED PRECEDING)
and please check out the link from oracle for _"SQL for Analysis and Reporting"_: http://download.oracle.com/docs/cd/E14072_01/server.112/e10810/analysis.htm -
Subquery in a Materialized View
I have a requirement where we have to build a summary view to show a customer's latest transaction. There can be several million customers so I am thinking if a Materialized view that gets refreshed once every day is a good option here. This is a Datawarehouse application where the records get appended once every day. I would like a summarized materialized view that is dropped and refreshed every day morning.
Here is the query that gets the latest order amount for each of the customer:
SELECT cu.cust_name,
od.order_amount
FROM customers cu,
orders od
WHERE cu.cust_id = od.cust_id
and od.order_date =
(select max(order_date) from orders od
where od.cust_id = cu.cust_id)
My questions are:
1) Is the materialized view a snapshot? Or does it go against the underlying table every time the MV is accessed, much like a regular view?
2) I would like a snapshot type of solution here. Since there could be 100 million orders for 1 million customers, a summary snapshot of 1 million records would perform much better IMO. Correct me if I got it wrong.
Thank you in advance for your help.Users query will be explicitly against the Mview.
After doing some reading on the MView, I am more inclined to think that Mview is not an ideal solution for my requirement here.
SELECT cu.cust_name,
od.order_amount,
MAX(od.order_date) over (PARTITION BY od.cust_id) max_date
FROM customers cu,
orders od
WHERE cu.cust_id = od.cust_id
The orders is a 20+ million records table. I thought by using a Mview that holds the maximum order date will avoid going to the orders table when users want to see that is the latest order date for a customer. However, the report requirements are such that the users will want to see what is the maximum order date within a certain date range. If this being the case, there is no point in using an Mview.
Once again, pl correct me if my understanding is not correct. -
BEST WAY TO REFRESH A MATERIALIZED VIEW
Hi, I have a Materialized View that was created after two Base Tables, Table A is a Dynamic Table, this means that it have Insert's, update's and delete's, and a Table B that is a Fixed Table, this means that this table do not change over time (it's a Date's Table). The size of the Table related to the Materialized View is to big (120 millions rows) so the refresh has to be very efficient in order to not affect the Data Base performance.
I was thinking on a Fast Refresh mode but It would not work because the log created on the B table is not usefull, the thing is that I created the two materialized view log's (Tables A and B) and when I execute the dbms_mview.refresh(list =>'MV', method => 'F')+ sentence I got the error
cannot use rowid column from materialized view log on "Table B" ... remember that this table don't change over time ...
I need to mantain the Materialized view up to date, but do not know how ... Please Help !!!!!The Materialized View name is test_sitedate2
The Table B name is GCO01.FV_DATES .... is a Fixed Table ... do not change over time ...
The Code of the MV is
CREATE MATERIALIZED VIEW TEST_SITEDATE2
REFRESH FORCE ON DEMAND
AS
SELECT site_id, date_stamp
FROM gco01.fv_site, gco01.fv_dates
where fv_dates.date_stamp >= fv_site.start_date
and fv_dates.date_stamp >= to_date('01/03/2010', 'dd/mm/yyyy')
and fv_dates.date_stamp < to_date('01/04/2010', 'dd/mm/yyyy');
Each table gco01.fv_site and gco01.fv_dates have it's materiallized view log created
The error is ....
SQL> execute dbms_mview.refresh(list =>'test_sitedate2', method => 'F');
begin dbms_mview.refresh(list =>'test_sitedate2', method => 'F'); end;
ORA-12032: cannot use rowid column from materialized view log on "GCO01"."FV_DATES"
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2429
ORA-06512: at line 1
Thank's -
Create a classification view over bapi
Hello,
i start a vb Programm to create a material in sap.
I get all views with material_savedata but the classification view is missing.
Does anybody know if there exist a special bapi to create a classification view
over the .net connector ?
thanks for any helpHello , thanks a lot for the answers. I am using a vb programm with the proxy connector.
In this connector i have defined:
Dim oClassnum As String
Dim oClasstype As String
Dim oKeydatum As String
Dim oLanguage As String
Dim oObjectkey As String
Dim oObjecttable As String
Dim oUnvaluated_char As String
Dim oStandardklasse As String
Dim oStatus As String
Dim oAllocvaluechar As New BAPI1003_ALLOC_VALUES_CHARTable
Dim oAllocvaluecurr As New BAPI1003_ALLOC_VALUES_CURRTable
Dim oAllocvaluesnum As New BAPI1003_ALLOC_VALUES_NUMTable
Dim oReturn0 As New BAPIRET2Table
Try
oProxy.Bapi_Objcl_Getdetail(oClassnum, oClasstype, oKeydatum, _
oLanguage, _
oObjectkey, oObjecttable, oUnvaluated_char, oStandardklasse, _
oStatus, oAllocvaluechar, _
oAllocvaluecurr, oAllocvaluesnum, oReturn0)
MsgBox(oReturn0.Item(0).Message.ToString)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
When i start the programm i get the error:
The function OBJECT_CHECK_ does not exist.
WHY ??
I have also tried to use
Bapi_Charact_Getdetail
to test, if something works but i really do'nt know what the meaning of
the parameters are . Perhaps somebody can explain them to me.
I have tried with charactername and used a * but the result is always 0.
Has somebody a documentation of the fields and tables that are
needed or filled or a little example of the us of the classification.
thanks a lot -
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 -
Help needed in query for Materialized View
Hi,
I want to create a materialized view which has some precalcultaed values.
I have four dimension tables out of which one is a Time Dimension table with levels as Year->Quarter->Month.
The precalculations are the moving averages and cummulative values of Sales Amt on the dimension values over a period of 4 Months.
The dimension tables are Clients, Products, Channel, Time.
Fact Table is Sales_Fact which will have the sales amount for different members of the dimension.
Since my fact table is very huge, i want to create a materialized view where i could store the required calculated measures, here Moving Average of Sales Amt for each Client, Product, Channel dimensions over a period of 4 Months.
Can anybody help with writing the query for this..Any help in this regard will be appreciated..
Please give me suggestions for this..Check this link.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/aggreg.htm#sthref1612
Regards
Raj -
Are Cube organized materialized view with Year to Date calculated measure eligible for Query Rewrite
Hi,
Will appreciate if someone can help me with a question regarding Cube organized MV (OLAP).
Does cube organized materialized view with calculated measures based on time series Year to date, inception to date eg.
SUM(FCT_POSITION.BASE_REALIZED_PNL) OVER (HIERARCHY DIM_CALENDAR.CALENDAR BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN ANCESTOR AT DIMENSION LEVEL DIM_CALENDAR."YEAR")
are eligible for query rewrites or these are considered advanced for query rewrite purposes.
I was hoping to find an example with YTD window function on physical fact dim tables with optimizer rewriting it to Cube Org. MV but not much success.
Thanks in advanceI dont think this is possible.
(My own reasoning)
Part of the reason query rewrite works for base measures only (not calc measures in olap like ytd would be) is due to the fact that the data is staged in olap but its lineage is understandable via the olap cube mappings. That dependency/source identification is lost when we build calculated measures in olap and i think its almost impossible for optimizer to understand the finer points relating to an olap calculation defined via olap calculation (olap dml or olap expression) and also match it with the equivalent calculation using relational sql expression. The difficulty may be because both the olap ytd as well as relational ytd defined via sum() over (partition by ... order by ...) have many non-standard variations of the same calculation/definition. E.g: You can choose to use or choose not to use the option relating to IGNORE NULLs within the sql analytic function. OLAP defn may use NASKIP or NASKIP2.
I tried to search for query rewrite solutions for Inventory stock based calculations (aggregation along time=last value along time) and see if olap cube with cube aggregation option set to "Last non-na hierarchical value" works as an alternative to relational calculation. My experience has been that its not possible. You can do it relationally or you can do it via olap but your application needs to be aware of each and make the appropriate backend sql/call. In such cases, you cannot make olap (aw/cubes/dimensions) appear magically behind the scenes to fulfill the query execution while appearing to work relationally.
HTH
Shankar
Maybe you are looking for
-
TS1367 My MacBook Pro screen won't turn on makes a repeating 3 beep sound
The screen to my MacBook Pro screen wont turn on and when I push the power button it just makes a 3 beep sound repeatedly. Is there any way t. Fix this or should I go to the store?
-
Is it possible to work with different languages in different applications?
Hi, is it possible to work with different languages in different applications? To have f.e. Photoshop in English and Indesign in Dutch?? Thanks!
-
Can I append date to the file name using Bursting
Hi All, I know that we can append date to the file using %y, %m and %d for Email FTP WEBDAV But is there any way of appending the date to the file name if I am bursting my file to a shared location. I tried that %y, %m and %d but that doesn't work fo
-
Replace one InDesign license key with another
I work for a software integration company that has helped a customer install InDesign CS 5.5 in a terminal server environment. InDesign CS 5.5 was installed with a license key obtained from Adobe for X number of users. Now the customer has obtained f
-
Hi I saw in the release notes of JavaFX 1.0 (http://java.sun.com/javafx/1/reference/releasenotes/javafx-sdk-release-notes.html) that setting icons for the Stage class does not work. In my application which uses JavaFX 1.1 I also encountered this prob