"ORA-01445: cannot select ROWID' v4 tabular.
Hi guys,.We had major problems since the transition from v2 to v4.
One of the problems I've had is with tabular forms.
I have a complex page with many regions which has always worked well in version 2. One of these regions is a tabular presentation. When loading the page, I get the:
"ORA-01445: cannot select ROWID from where sample, a join without key preserved table view ' error."
The initial request was quite complex, but I've broken down it:
This query runs and allows me to update the base table (xxmel_apex_eco_alterations)
Select
replace. ALTERATION_ID,
replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
replace. ECO,
alt.ORGANIZATION_ID,
replace. ACD_TYPE,
replace. INVENTORY_ITEM_ID,
replace. BEFORE_CHANGE_QTY,
replace. AFTER_CHANGE_QTY,
replace. MODIFY_FLAG,
replace. REVISED_ASSEMBLY_ID,
replace. BILL_SEQUENCE_ID,
alt.COMPONENT_SEQUENCE_ID,
replace. LAST_UPDATE_DATE,
replace. LAST_UPDATE_BY,
alt.COMMENTS,
replace. BOM_IMPLEMENTATION_DATE,
replace. BOM_CHANGE_NOTICE,
replace. ASSEMBLY_NAME,
alt.COMPONENT_NAME,
replace. SELECTION_CRITERIA,
replace. ORACLE_CHANGE_NOTICE,
alt.COMP_CURRENT_COST,
alt.COMP_NEW_COST,
alt.COMP_CURRENT_SC,
alt.COMP_NEW_SC,
alt.COMP_DESCRIPTION,
alt.COMP_CURRENT_UOM,
alt.COMP_NEW_UOM,
alt.COMP_CURRENT_PUR_STATUS,
alt.COMP_NEW_PUR_STATUS
ALT XXMEL_APEX_ECO_ALTERATIONS
where eco =: P2_ECO
But as soon as I try to join another table (I do not update, just view as shown below), I get the error.
Select
replace. ALTERATION_ID,
replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
replace. ECO,
alt.ORGANIZATION_ID,
replace. ACD_TYPE,
replace. INVENTORY_ITEM_ID,
replace. BEFORE_CHANGE_QTY,
replace. AFTER_CHANGE_QTY,
replace. MODIFY_FLAG,
replace. REVISED_ASSEMBLY_ID,
replace. BILL_SEQUENCE_ID,
alt.COMPONENT_SEQUENCE_ID,
replace. LAST_UPDATE_DATE,
replace. LAST_UPDATE_BY,
alt.COMMENTS,
replace. BOM_IMPLEMENTATION_DATE,
replace. BOM_CHANGE_NOTICE,
replace. ASSEMBLY_NAME,
alt.COMPONENT_NAME,
replace. SELECTION_CRITERIA,
replace. ORACLE_CHANGE_NOTICE,
alt.COMP_CURRENT_COST,
alt.COMP_NEW_COST,
alt.COMP_CURRENT_SC,
alt.COMP_NEW_SC,
alt.COMP_DESCRIPTION,
alt.COMP_CURRENT_UOM,
alt.COMP_NEW_UOM,
alt.COMP_CURRENT_PUR_STATUS,
alt.COMP_NEW_PUR_STATUS
msib.segment1
ALT XXMEL_APEX_ECO_ALTERATIONS
mtl_system_items_b msib
where eco =: P2_ECO
and msib.organization_id = 26
and msib.inventory_item_id = ALT INVENTORY_ITEM_ID
I read where someone had a similar problem for me, but their solution (by copying the script to create a new page) isn't really an option for us the complexity to the page as a whole.
Is this a bug in 4 APEX?
Any help would be great,
Thank you
Chris
Hello
This isn't a bug in the apex, if you want to display a different table column there is a way to create a function to get the value of this table
to "msib.segment1", you must create a function that accepts that some primary key to and retrieves the value of 'mtl_system_items_b' and can return a value in the field "segment1".
and you can use your previous query, you can add the name of function as a new field
for example
Select
replace. ALTERATION_ID,
replace. ALTERATION_ID ALTERATION_ID_DISPLAY,
replace. ECO,
alt.ORGANIZATION_ID,
replace. ACD_TYPE,
replace. INVENTORY_ITEM_ID,
replace. BEFORE_CHANGE_QTY,
replace. AFTER_CHANGE_QTY,
replace. MODIFY_FLAG,
replace. REVISED_ASSEMBLY_ID,
replace. BILL_SEQUENCE_ID,
alt.COMPONENT_SEQUENCE_ID,
replace. LAST_UPDATE_DATE,
replace. LAST_UPDATE_BY,
alt.COMMENTS,
replace. BOM_IMPLEMENTATION_DATE,
replace. BOM_CHANGE_NOTICE,
replace. ASSEMBLY_NAME,
alt.COMPONENT_NAME,
replace. SELECTION_CRITERIA,
replace. ORACLE_CHANGE_NOTICE,
alt.COMP_CURRENT_COST,
alt.COMP_NEW_COST,
alt.COMP_CURRENT_SC,
alt.COMP_NEW_SC,
alt.COMP_DESCRIPTION,
alt.COMP_CURRENT_UOM,
alt.COMP_NEW_UOM,
alt.COMP_CURRENT_PUR_STATUS,
alt.COMP_NEW_PUR_STATUS,
newfunction (pkId) as segment1
ALT XXMEL_APEX_ECO_ALTERATIONS
where eco =: P2_ECO
Thank you
Abdou Bosamiya
Tags: Database
Similar Questions
-
I create a page "Form on a Table with Report" (APEX 5). Table I has 3 columns: cat_key, item_value, item_description. The cat_key is a foreign key in a table with columns cat_key, cat_value. I created the report and everything works fine. The page of the report shows my domain cat_key in number, so I want it instead to display the cat_value. I change the field cat_key to a text based on LOV, select my LOV and now when I view the page of report I get the "'ORA-01445: cannot select ROWID from where sample, a join without key preserved table view ' error." The report uses the ROWID as a link to the edit page field.
If I use the same tables and even shared LOV in a report page interactive, it works fine.
What I am doing wrong?
This is a limitation of the IR Apex will rewrite your query to a query that includes the lookup table and the columns. So now you have actually created a query on an inline view, which causes the error. You can see the query apex created when running in debug mode. APEX will join the table of choice with your primary table. For example from one of my IR:
Select 'ID '...
"MSL". "" HIS_COUNTRIES "=> my primary table
) ) b,
(select rv_meaning d, rv_low_value r
of msl_ref_codes_table
where rv_domain = "JOHN".
) L1 = > query My LOV Lookup
...
So, if possible, base your reports and forms on the real primary key, no rowid.
You can also write the IR query with the search yourself:
Select T1.rowid...
of primary_table T1
look_table L1
...
-
v4.0 - in the form of ORA-01445: cannot select ROWID from where sample,.
Hello
I have created a form in table form in version 4.0.
Selection is based on three tables that have primary keys, the keys are selected, and whenever I run the page I get the following error:-
Failed to parse the SQL query:
ORA-01445: cannot select ROWID, or sample, join without table views preserved key
The query runs very well in the TOAD
Any ideas?
Thank you
Mike
___________________________________________________________________________________
Select
CTR. PERF_RATING_LINE_ID,
CTR. PERF_RATING_LINE_ID PERF_RATING_LINE_ID_DISPLAY,
CTR. BUSINESS_UNIT,
CTR. EMPLID,
''''|| CTR. REVIEW_YEAR REVIEW_YEAR,
CTR. REVIEW_PERIOD,
CTR. PERFORMANCE_SCORE,
CTR. MODERATED_SCORE,
CTR. HUMAN RESOURCES MANAGEMENT,
PRL.COMMENTS,
ACB. BU_DESC,
''''|| ACB. DEPTID DEPTID,
ACB. DEPT_DESC,
ACB. EMPLOYEE_NAME,
ACB. GRADE,
CTR. SCORE_APPROVED_BY,
ACB. TEMP_PERM,
ACB. GENDER,
ACB. JOB_START_DATE,
decode (DECODE (SUBSTR (ACB. FLAG, 1, 5), "S Job", substr (CPR. FLAG, instr (CPR. FLAG,'~ ', 1) + 2, 3));
"HIR", "Committed", "XFR", "Transfer", "REH", "recall").
Decode (SUBSTR (ACB. FLAG, 1, 30), "work starts the period ~ XFR ',' - ' | substr (CPR. FLAG, instr (CPR. FLAG,'~ ', 1, 2) + 2)) JOB_START_DETAILS,.
ACB. APPOINTMENT_DATE,
SUBSTR (CPR. JOB_END_DETAILS, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 2) + 2) JOB_END_DATE.
SUBSTR (CPR. JOB_END_DETAILS, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 1) + 2, INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 2) - INSTR (CPR. JOB_END_DETAILS,'~ ', 1, 1)-2) REASON,
ACB. JOB_GROUP,
ACB. JOB_GROUP_DESC,
ACB. JOBCODE,
ACB. JOBCODE_DESC JOB_DESC,
ACB. JOB_FAMILY,
ACB. JOB_FAMILY_DESC,
ACB. PBR_ID,
MD. MGR_DEPT_ID
PERFORMANCE_BASE_REFRESH_V ACB,.
PERFORMANCE_RATING_LINE PRL,
Y00_OPR_MGR_DEPT MD
WHERE (PRL. BUSINESS_UNIT = ACB. BUSINESS_UNIT
AND PRL. EMPLID = ACB. EMPLID
AND PRL. REVIEW_YEAR = ACB. REVIEW_YEAR
AND PRL. REVIEW_PERIOD = ACB. REVIEW_PERIOD)
AND MD. OPRID =: APP_USER
AND INSTR (': ' |) MD. DEPTS_MANAGED |': ',' :'|| ACB. DEPTID |': ') > 0
AND MD. MGR_DEPT_ID > 0
AND CPR. ADMIN_CENTRE IN
(select c.deptid AC
of PSHR. PSOPRDEFN@PSHR. CSIR.CO. ZA,.
PSHR.PS_SCRTY_TBL_DEPT@PSHR. CSIR.CO. ZA C
where A.ROWSECCLASS = C.ROWSECCLASS
AND C.DEPTID! = 'ZZZZ '.
and a.oprid =: APP_USER)
AND (: P2210_BUSINESS_UNIT IS NULL)
OR PBR. BUSINESS_UNIT =: P2210_BUSINESS_UNIT)
AND (: P2210_EMPLOYEE_NAME IS NULL)
OR INSTR (UPPER (CPR. Employee_name), UPPER (:P2210_EMPLOYEE_NAME)) > 0)
AND (: P2210_DEPARTMENT IS NULL)
OR PBR. DEPTID =: P2210_DEPARTMENT)
AND (: P2210_PERFORMANCE_RATING IS NULL)
OR PBR. PERFORMANCE_SCORE =: P2210_PERFORMANCE_RATING)
AND (: P2210_MODERATED_RATING IS NULL)
OR PBR. MODERATED_SCORE =: P2210_MODERATED_RATING)
AND (: P2210_GRADE IS NULL)
OR PBR. CATEGORY =: P2210_GRADE)
AND (: P2210_PERM_TEMP IS NULL)
OR PBR. TEMP_PERM =: P2210_PERM_TEMP)
AND SUBSTR (NVL (ACB. (JOB_END_DETAILS, "XXX"), 1, 3) NOT ("TER", "TOC")
AND PRL. SCORE_APPROVED_BY IS NULLMike,
We also changed our Wizard to create only validations for columns that are selected to be updated (in the wizard on the page in a table). And in the case of the application wizard, we examine if the columns have been excluded on the edit page popup page, and they are set to read-only through the default user interface. If you should only get validations for the columns that are modifiable, view-only / save state or hidden. We include only display / save state and hidden, because in both cases, you have actual shape on your page elements, which could easily be manipulated through common web tools.
Kind regards
Marc -
ORA-01445 error: cannot select ROWID from where sample, a join without a view
Hi all
I get an error when I created a VO based EO with standard Table (forced) jtf_notes_vl
It gives me the error ORA-01445: cannot select ROWID from where sample, a join without key preserved table view
the Table has the ROW_ID as Primery key
Thanks in advanceHello
Creation of an EO-based the rowid as primary key is usually the cause of this error as is not recommended to use the rowid as the primary key. Try to use jtf_note_id as the primary key.
Furthermore, why are you using NAV it is seen for the creation of EO. If I remember correctly, there is a JTF_NOTES_B and JTF_NOTES_TL table that you can use.
Thank you
AJ -
Error ORA-01445 tabular form on a Collection in APEX 5
When I load a page with a tabular presentation built on a display of a collection to the APEX 5, I'm getting an ORA-01445: cannot select ROWID, or the sample, a view of joining without an error table preserved key.
I create a view
CREATE or REPLACE FORCE VIEWS test_coll_vw
(
C001,
C002,
C003,
C004,
seq_id
)
AS
SELECT TO_NUMBER (c001),
C002,
TO_NUMBER (c003),
TO_NUMBER (c004),
seq_id
Of apex_collections
WHERE collection_name = 'TEST '.
Then create a tabular presentation on the view with the primary key of the source SEQ_ID and primary key of the trigger existing through the wizard.
Debug information shows the statement which is a failure:
Select NULL NULL "CHECK$ 01", "SEQ_ID,' NULL 'C001', NULL"C002', 'C003', 'C004', NULL NULL NULL "APEX$ ROWID ' sys.dual union all select ' CHECK$ 01", 'SEQ_ID', 'C001', 'C002', 'C003', "C004", "APEX$ ROWID" in (select NULL "CHECK$ 01", "SEQ_ID", "C001", "C002", "C003", "C004", "ROWID" "APEX$ ROWID" (select).
"SEQ_ID."
"C001."
"C002."
"C003."
"C004.
of 'WPCAMS_APP '. "" TEST_COLL_VW ".
) APEX$ RPTSRC
order of 1, 7
).
These tabular forms worked up to 4.2, but they seem to fail at 5 APEX for upgrade or newly created pages one. The generated query is identical between versions, but it seems that the underlying apex_collections view has changed between versions and the origin of the problem.
Does anyone have a solution or workaround?
Thank you
Hi Phil,
APEX 5.0 the definition of the view of apex_collection had to be changed for security reasons. This change introduced a regression with tabular form validations, when the table refers to this view. Tabular form declarative validations require the ROWID in order to restore your changed data after a validation failed, and for this reason, APEX is insert the IDENTIFIER in the query in a table. It is currently not possible when tables refers to the sight of apex_collections. We are looking at a solution to this problem, but for now the only way to get around this is not, in this case, use the declarative validation and use some custom validations or process.
Kind regards
Marc -
ORA-01445 when literals in a view
OTN dear Forum,
I am creating this point of view, which generates a list of files with metadata in each line for example. "Description". I want to add a column with the same literal value in each row - 'Photo Unit Legacy Collection', but he doesn't seem to like it. I tested without the code on line 10 and I tested 10 independently in a separate query lines - both work.
I get the error message "unhandled exception warning,: ORA-01445: cannot select ROWID from where sample, a join without key preserved table view.
Can anyone help?
1 Select
2 csv. "" FILE "as"#FILE. "
3 csv.security_policies as "#SECURITY POLICIES."
4 csv.model as "#MODEL."
5 csv.nhm_field_department as "NHM_FIELD_DEPARTMENT."
6 photo_lib.jobtitle as "NHM_FIELD_ASSET_DESCRIPTION."
7 csv.nhm_field_asset_keywords as "NHM_FIELD_ASSET_KEYWORDS."
8 csv.nhm_field_file_creation_date as "NHM_FIELD_CREATION_DATE."
9 csv.nhm_field_original_file_path as "NHM_FIELD_ORIGINAL_FILE_PATH."
10 "Legacy Collection of photo unit" as "NHM_FIELD_GROUP_TITLE."
11 regexp_substr (csv. ("' NHM_FIELD_ASSET_DESCRIPTION",'[[: digit:]] {4,}') as 'TASK IDENTIFIER.
12 years of
13 csv join internal photo_lib
14 on (photo_lib.fk_jobid = regexp_substr (csv. "" FILE "," [[: digit:]] {4}')) "
15 where photo_lib.jobtitle is not null
16 and regexp_like (csv. "" FILE ","[...] *\. ((tif)')You get the error create view, or when you try to choose in this one? What version of 4 numbers of Oracle are you running? There is at least a bug reported in MOS (see Doc ID 412362.1 if you have a support contract) for outer joins against versions 10.2.0.1 - 10.2.0.3.
You can try either simplify the view somewhat, perhaps to ot to rid the superfluous double quotes. Another possibility might be to try to make the regexp in a view online and join with this, something like:
select csv.file as "#FILE", csv.security_policies as "#SECURITY POLICIES", csv.model as "#MODEL", csv.nhm_field_department, photo_lib.jobtitle as NHM_FIELD_ASSET_DESCRIPTION, csv.nhm_field_asset_keywords, csv.nhm_field_file_creation_date, csv.nhm_field_original_file_path, 'Photo Unit Legacy Collection' as NHM_FIELD_GROUP_TITLE, csv.job_identifier from (select file, security_policies, model, csv.nhm_field_department, nhm_field_asset_keywords, nhm_field_file_creation_date, nhm_field_original_file_path, regexp_substr(NHM_FIELD_ASSET_DESCRIPTION,'[[:digit:]]{4,}') JOB_IDENTIFIER, regexp_substr(FILE,'[[:digit:]]{4}') jobid from csv where regexp_like(csv.FILE,'[...]*\.(tif)')) csv join photo_lib on photo_lib.fk_jobid = csv.jobid where photo_lib.jobtitle is not null
John
-
Hello
Can you please let me know how to select the ROWID of the table all_ind_expressions? I tried to run the following SQL query on the Oracle version 10.2.0.3 but received the error ORA-01445.
Select the ROWID in all_ind_expressions
where index_owner = "DBO."
Thank you
Published by: user12088323 on February 24, 2011 18:29
Published by: user12088323 on February 24, 2011 18:30SQL> select text from dba_views where view_name = 'DBA_IND_EXPRESSIONS'; TEXT -------------------------------------------------------------------------------- select io.name, idx.name, bo.name, base.name, c.default$, ic.pos# from sys.col$ c, sys.obj$ idx, sys.obj$ base, sys.icol$ ic, sys.user$ io, sys.user$ bo, sys.ind$ i where bitand(ic.spare1,1) = 1 /* an expression */ and (bitand(i.property,1024) = 0) /* not bmji */ and ic.bo# = c.obj# and ic.intcol# = c.intcol# and ic.bo# = base.obj# and io.user# = idx.owner# and bo.user# = base.owner# and ic.obj# = idx.obj# TEXT -------------------------------------------------------------------------------- and idx.obj# = i.obj# and i.type# in (1, 2, 3, 4, 6, 7, 9)
Who should be returned to ROWID when SELECT view above?
Published by: sb92075 on February 24, 2011 16:47
-
ORA-12032: cannot use column rowid
Hello
8.1.7 I have the following error:
ORA-12032: cannot use the rowid column of materialized view log on 'chain '. "' string '.
The solution is:
Action: A full refresh is necessary before the next quick update. Add columns ROWID in the materialized view log, if necessary.
How can I do a complete refresh before the next fast refresh or ROWID columns add? How do I know whether the ROWID columns add?
Thank you.
PS:
my script is:
................
..............
START WITH TO_DATE (July 6, 2010 17:57:48 "," dd-mon-yyyy hh24:mi:ss')
NEXT SYSDATE + 1/24user522961 wrote:
Hello
8.1.7 I have the following error:
ORA-12032: cannot use the rowid column of materialized view log on 'chain '. "' string '.
The solution is:
Action: A full refresh is necessary before the next quick update. Add columns ROWID in the materialized view log, if necessary.How can I do a complete refresh before the next fast refresh or ROWID columns add? How do I know whether the ROWID columns add?
Thank you.run up
EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');
-
ORA-22992: cannot use LOB Locators selected from the remote tables...
Oracle 10.2.1.0.4
Solaris 10
We try to access a table in another database via a db_link.
The table we are trying to access has a LOB.
We get the following error: ora-22992: cannot use LOB Locators selected from the remote tables.
Is there a way to get around this? We need the data in the BLOB field.
Thank you.See on metalink:
ORA-22992 has a workaround solution in 10 gr 2
DOC - ID: 436707.1Werner
-
SQL error: ORA-01779: cannot modify a column that matches a key examine
Hi all
The requirement is that I have two tables s_party_d and S_CONTACT_d. the need to update the column name with FST_NAME | ',' | Last_name when column rowid in both tables are equal. I used the query previously below: -.
Update
(select
E1. Name,
e.FST_NAME,
Select
Of
s_party_d e1,
E S_CONTACT_d
where
E1. Game of ROW_ID = e.ROW_ID)
name = FST_NAME | ',' | LAST_NAME;
But I get the error message when executing the query
Error in the command line: 31 column: 3
Error report:
SQL error: ORA-01779: cannot modify a column that is mapped to a table not preserved key
01779 00000 - 'impossible to change a column that is mapped to a non-preserved table at key'
* Cause: An attempt was made to insert or update columns in a join finds out who
map to a table not kept the key.
* Action: Change the directly underlying base tables.
Can U please tell me why this error and how to solve?
Thank you
MathonMathon wrote:
So, I have to look into some other method... I can't achieve this using a single update statement...
Well, no matter what you do you need to decide what FST_NAME | ',' | Name to use. As I already pointed out for each line of the line of the s_party_d table there are several rows in table S_CONTACT_d. Again, you must yo decide what S_CONTACT_d table row you want to use. For example:
update s_party_d e1 set e1.name = ( select max(e.FST_NAME) ||', '|| max(e.LAST_NAME) from S_CONTACT_d e where e1.ROW_ID=e.ROW_ID ) where e1.ROW_ID in ( select e.ROW_ID from S_CONTACT_d e ) /
SY.
-
ORA-12054: cannot set the ON COMMIT...
Hello
can someone please tell me what am I missing here?
I can't create a materialized view, but I can't understand why is this?
SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production CORE 9.2.0.7.0 Production TNS for HPUX: Version 9.2.0.7.0 - Production NLSRTL Version 9.2.0.7.0 - Production SQL> r 1* select master,primary_key from user_mview_logs where MASTER='CIS_CASE' or master='CCR_ACTION_DEF' MASTER PRI ------------------------------ --- CCR_ACTION_DEF NO CIS_CASE NO SQL> r 1 SELECT a.table_name, a.constraint_name, a.constraint_type, b.column_name 2 FROM user_constraints a, user_cons_columns b 3 WHERE a.constraint_name = b.constraint_name 4* AND a.table_name IN ('CIS_CASE', 'CCR_ACTION_CASES') TABLE_NAME CONSTRAINT_NAME C COLUMN_NAME ------------------------------ ------------------------------ - ---------------- CCR_ACTION_CASES ID_PK P ID CIS_CASE PK_CIS_CASE P ID CIS_CASE SYS_C008496 C ID SQL> CREATE MATERIALIZED VIEW mv 2 REFRESH FAST ON COMMIT 3 AS 4 SELECT c.ID, 5 CASE 6 WHEN (c.script_id IS NULL OR c.queue_id IS NULL) 7 THEN 1 8 WHEN c.script_id IS NOT NULL AND c.queue_id IS NOT NULL 9 THEN 2 10 END TYPE, 11 c.datum + a.due_time / 24 - a.alarm_due_time_1 / 24 alarm1, 12 c.datum + a.due_time / 24 - a.alarm_due_time_2 / 24 alarm2, 13 c.datum + a.due_time / 24 due_date 14 FROM ccr_action_def a, cis_case c --users u 15 WHERE NVL (a.queue_id, NVL (c.queue_id, 0)) = NVL (c.queue_id, 0) 16 AND NVL (a.type_id, NVL (c.case_code_type_id, 0)) = 17 NVL (c.case_code_type_id, 0) 18 AND NVL (a.code_id, 19 NVL (NVL (NVL (c.code_id_4, code_id_3), code_id_2), code_id_1) 20 ) = NVL (NVL (NVL (c.code_id_4, code_id_3), code_id_2), code_id_1) 21 AND (c.datum + a.due_time / 24 < SYSDATE) 22 AND state IN (1, 2) 23 UNION 24 SELECT c.ID, 3 TYPE, a.due_date - a.alarm_due_time_1 / 24 alarm1, 25 a.due_date - a.alarm_due_time_2 / 24 alarm2, a.due_date 26 FROM ccr_action_cases a, cis_case c 27 WHERE c.ID = a.cis_case_id 28 AND (a.due_date < SYSDATE) 29 AND state IN (1, 2); FROM ccr_action_cases a, cis_case c * ERROR at line 26: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
Vili Dialis wrote:
Rob, if you have any comments on my last query operation, I would be greatfull.Vili,
You must start with a join view which does not contain any aggregate. Just a join of the ccr_action_def and cis_case. And don't forget to include the two table rowid to make quickly updatable. Then create a full blown newspaper on top of the join mv materialized view and create mv aggregation, selecting in the mv to join.
Kind regards
Rob.Published by: Rob van Wijk on 14-dec-2009 12:09
And two boards that are not linked mv:
(1) as has said, use a.id and c.id in a group by clause for the query itself work
(2) do not use the string ' 14.12.09", use a date but you compare it with a date. So use: date "2009-12-14' -
Why I don't have the error: ORA-14551: cannot perform a DML operation inside a query
Hello
create table table_1 (phone number)
create or replace function function_a return number is l_rv number; begin l_rv := dbms_random.value(); insert into table_1 values(l_rv); return l_rv; end;
Select double function_a
Now, I get the error:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "FUNCTION_A", line 6
create the table table_2 (phone number)
insert into table_2 select function_a from dual
Now, I make the same mistake. It is to insert records into table_2
Can someone please clarify this?
Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production
Post edited by: O - O added: (select double function_a)
O - O wrote:
To be called from instructions SQL, stored function must obey "purity" following rules, which are intended to control the side effects:
- rule1) When it is called from a
SELECT
statement or a parallelizedINSERT
,UPDATE
, orDELETE
statement, the function cannot change database tables. - rule2) When it is called from a
INSERT
,UPDATE
, orDELETE
statement, the function cannot query or modify database tables modified by that statement.
Can you please explain this? I think that these statements are contradicted with
insert into select double function_a table_2
Now, I make the same mistake. It is to insert records into table_2
When your function is called by a select statement, an error is triggered because of rule1).
When your function is called in an insert statement, no error is raised. The insert does not work in parallel (this is an insert row after all). So rule1) is also not infringed. The insert is on the table2, change table1. Because it does not modify the same table rule2) is not violated. So no reason to trigger an error.
- rule1) When it is called from a
-
ORA-19504: cannot create the file '+ DATA '.
Hello everyone.
This is the scenario:
We have a test server that is used to restore daily backups of the Production database. Restore us the database with the same SID as the production one.
For specific reasons, we need create a second database (with a different SID) on this server with an older backup from the production one. To realize that I'm trying to use a part of the "DUPLICATE without connection to the target" tutorials on the web.
I tried the simple guide that I found which is:
(1) copy the backup files cold /somedirectory
(2) start OLD database with nomount
(3) connect RMAN with OLDER as an auxiliary
(4) run the following: DUPLICATE DATABASE FOR OLD BACKUP LOCATION ' / somedirectory' NOFILENAMECHECK.
Here's the result (I deleted some lines because of the size of it):
----------------------
RMAN > ProdDB to OlderDB DUPLICATE DATABASE
2 > LOCATION of BACKUP "/ home/oracle/OlderBackupFiles.
3 > NOFILENAMECHECK.
4 >
From October 1, 14 Db double
content of Script memory:
{
clone of SQL 'alter system set control_files =
"+DATA/OlderDB/controlfile/current.829.859839217" comment =
' Set by RMAN "scope = spfile;
clone of SQL 'alter system set = db_name
"ProdDB" comment =
' Modified by RMAN duplicate "scope = spfile;
clone of SQL 'alter system set db_unique_name =
"OlderDB" comment =
' Modified by RMAN duplicate "scope = spfile;
clone to stop immediately;
Start clone force nomount
Restore controlfile primary clone of ' / home/oracle/OlderDB/controlfile_ProdDB_20141001_4159.bkp';
change the clone database mount;
}
execution of Script memory
SQL statement: alter system set control_files = comment "+DATA/OlderDB/controlfile/current.829.859839217" = "defined by RMAN" scope = spfile
SQL statement: change the system db_name set = comment "ProdDB" = "modified by RMAN duplicate" scope = spfile
SQL statement: alter system set db_unique_name = comment "OlderDB" = "modified by RMAN duplicate" scope = spfile
(...)
From restoration to 1 October 14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID = 191 type device = DISK
channel ORA_AUX_DISK_1: restore the control file
channel ORA_AUX_DISK_1: restoration complete, duration: 00:00:03
output file name=+DATA/OlderDB/controlfile/current.829.859839217
Restoration finished in October 1, 14
mounted database
output channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID = 191 type device = DISK
content of Script memory:
{
until the SNA 274262921.
the value of newname for datafile clone 1 again;
the value of newname for datafile clone 2 again.
the value of newname for datafile clone 3 again.
the value of newname for datafile clone 4 new ones;
the value of newname for datafile clone 5 again.
the value of newname for datafile clone 6 again.
the value of newname for datafile clone 7 again.
restoration
database clone;
}
(...)
From restoration to 1 October 14
using the ORA_AUX_DISK_1 channel
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to + DATA
channel ORA_AUX_DISK_1: restore datafile 00002 to + DATA
channel ORA_AUX_DISK_1: restore datafile 00003 to + DATA
channel ORA_AUX_DISK_1: restore datafile 00004 in + DATA
channel ORA_AUX_DISK_1: restore datafile 00005 to + DATA
channel ORA_AUX_DISK_1: restore datafile 00006 to + DATA
channel ORA_AUX_DISK_1: restore datafile 00007 to + DATA
channel ORA_AUX_DISK_1: reading from the backup /home/oracle/OlderDB/database_ProdDB_20141001_4157.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /home/oracle/OlderDB/database_ProdDB_20141001_4157.bkp piece
ORA-19504: cannot create the file '+ DATA '.
ORA-17502: ksfdcre:4 cannot create the file + DATA
ORA-15041: diskgroup space 'DATA' exhausted
switch to the previous backup
Oracle instance started
(...)
content of Script memory:
{
clone of SQL 'alter system set = db_name
"OlderDB" comment =
' Restore the original value by RMAN "scope = spfile;
clone of SQL 'alter system reset db_unique_name scope = spfile;
clone to stop immediately;
}
execution of Script memory
Errors in the script of the memory
RMAN-03015: an error has occurred in the script stored memory Script
RMAN-06136: the auxiliary database ORACLE error: ORA-01507: database not mounted
ORA-06512: at "SYS." "X$ DBMS_RCVMAN ', line 13466
ORA-06512: at line 1
RMAN-05556: not all data files have backups can be recovered on SNA 274262921
RMAN-03015: an error has occurred in the script stored memory Script
RMAN-06026: some targets not found - abandonment of restoration
RMAN-06023: no backup or copy of the file 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of the command duplicate Db at 15:39:11 01/10/2014
RMAN-05501: abandonment of duplicate target database
Complete recovery manager.
------------------------------------------------------------------
The first mistake of the stack was ORA-19504 while trying to restore the backup of the database.
First thing I took a glance was ASM occupation but it enough available space.
The second was a permission problem, but it doesn't seem to be the case because RMAN can correctly write the controlfile to ASM.
One have some advice on what I should look for?
Thanks in advance sorry for my English.
Select this option.
Hello.
Thanks, but is not the case. As I have said, that the DATA diskgroup has space enough he uses only a single disk in a RAID.
But I solved my problem... To the auxiliary database, I added the following to the spfile:
DB_FILE_NAME_CONVERT = '+ DATA/ProdDB', '+ DATA/OlderDB ".
LOG_FILE_NAME_CONVERT = '+ DATA/ProdDB', '+ DATA/OlderDB ".
I don't know why, but with these two clauses, it worked well. Perhaps RMAN was trying to restore it to the wrong place?
-
"Getting Started" VM said "ORA-01471: cannot create a synonym.
People,
I downloaded the VM with demo integration OGG + ODI for 12.1.3, as well as the PDF "Getting Started with Oracle Data Integrator 12 c". Try step 10.3.2 on pg 92: "Initial running load staged Mapping", but it throws the error message:
ODI-1228: task Create synonym on target-LKM Oracle for Oracle (DBLINK) - fails when connecting the TRG_ODIDEMO target.
Caused by: java.sql.SQLException: ORA-01471: cannot create a synonym with the same name as the object
He told the truth, I tried the code in sqlplus with the same error:
SQL > conn odi_staging/oracle;
Connected.
SQL > create synonym ODI_STAGING. C$ _0OGG_CUSTOMER1 for ODI_STAGING. C$_0OGG_CUSTOMER1@ORCL;
ERROR on line 1:
ORA-01471: cannot create a synonym with the same name as the object
Initially, the definition of database server did not have the Instance = orcl inside, I added and got the same error with and without "orcl". Why is this happening? Another odd piece that may be associated with: I tried this mapping even earlier, and it got stuck on the front line, trying to create a view, but was insufficient privs for ODI_STAGING select the ogg_customer table. So I just did "grant dba to odi_staging;" and that was not enough! Tried stop/start ODI, then the DB without change. Hmmm, s/n role not enough? I've also had "grant select any table of odi_staging;", then this line worked.
Back to the current problem: I can get the other procs to run, as the Clean Up target tables works very well, and the demo Client works very well.
(1) anyone has experience this problem of synonym?
(2) no matter who else get it to work?
-Thanks, Steve F.
I got the fix in the product manager. There are two very similar LKMs:
- LKM Oracle for Oracle (DBLINK) (must be imported)
- LKM Oracle for Oracle shoot (DB Link). GLOBAL (integrated)
Of course, they look the same to me except that the second works and one doesn't. In all honesty, the book on pg 89 says 'Pull' in the name. Chalk it up to user error. Detective Conan.
-
ORA-01157: cannot identify/lock data file error in database pending.
Hello
I have a back-end database and the base ensures (11.2.0.1.0) that runs in ASM with the names of different diskgroup. I applied an incremental backup on a standby database to solve the gap newspaper archive and generated a controlfile to standby in the primary database and restore the standby database controlfile. But when I started the MRP process his starts not and lift error in the alerts log ORA-01157: cannot identify/lock file. When I questioned the standby database file it shows the location on primary data filenames not the database pending.
******************************
PRIMARY DATABASE
*****************************
SQL > select name from v$ datafile;
NAME
--------------------------------------------------------------------------------
+Data/OraDB/datafile/system.256.788911005
+Data/OraDB/datafile/SYSAUX.257.788911005
+Data/OraDB/datafile/undotbs1.258.788911005
+Data/OraDB/datafile/users.259.788911005
****************************************
BACKUP DATABASE
****************************************
SQL > select name from v$ datafile;
NAME
--------------------------------------------------------------------------------
+STDBY/OraDB/datafile/system.256.788911005
+STDBY/OraDB/datafile/SYSAUX.257.788911005
+STDBY/OraDB/datafile/undotbs1.258.788911005
+STDBY/OraDB/datafile/users.259.788911005
The actual physical location of files of database Eve in ASM in the standby server is shown below
ASMCMD > pwd
+ STDBY/11gdb/DATAFILE
ASMCMD >
ASMCMD > ls
SYSAUX.259.805921967
SYSTEM.258.805921881
UNDOTBS1.260.805922023
USERS.261.805922029
ASMCMD >
ASMCMD > pwd
+ STDBY/11gdb/DATAFILE
I even tried to rename the data files in the database backup, but it throws error
ERROR on line 1:
ORA-01511: Error renaming data/log files
ORA-01275: RENAME Operation is not allowed if management undo file is
Automatic.
Kind regards
007
You must specify the complete location
*.db_file_name_convert='+data/OraDB/datafile/,'+STDBY/11gdb/DATAFILE /'
and to rename the data file, your standby_file_management parameter must be set to MANUAL.
Maybe you are looking for
-
My ports show to the MAX, but not available in my chasis lvproj using the scan Mode? All other modules work as expected. I've used this module mode of scanning in another chassis, but the 9146 is new to me. I did a series of loopback connector and r
-
password necessary to restart computer.dont know the password
need password to restart my computer. Help
-
I have a compaq f 700 presasio I try for 2 weeks order recovery disc (3) web site does not work... my order never ends
-
Reinstall Lightroom CC and from scratch
I installed CC Lightroom on my iMac, retina and made some mistakes import my files and screwed up in my catalog. I uninstalled Lightroom and reinstalled. I use a hard drive external to my catalog and deleted the old catalog of the car. I created a
-
How to change the author notices for all documents?
I just discovered the Note tool in Photoshop, which I think will be very useful to our society we are working a lot on projects.In my view, there is a way to add an author to individual notes, but there is nowhere to set the author for all future not