i have a procedure written below,it is compiled: ==================================================== CREATE OR REPLACE PROCEDURE myproc (vdept NUMBER) IS vsal number(10,2); CURSOR mycur IS
[code]...
but whenever i am trying to call this proc like below: ============================== begin myproc(10); end;
it is showing me error,i.e. :ORA-01410: invalid ROWID
I have a Multi layer Mviews and Views which i use to load a table. There are three base level Mview which is accessed by 4 views ... which are in turn accessed by a view which is used to load a table.
Before the insert called for the table .. the base mviews are refreshed.
I get the "ORA-01410 Invalid Rowid" error while inserting in to the table and while refreshing the mviews. They don't occur every time and not together as well.
The Mviews contains table joins and the top level views which accessing these mviews does aggregation. Below is the mview query for one of the mview.
I observed logical corruption in one of the database, while running select on some tables observed ORA-01410: invalid ROWID error. These errors or errors related to this logical corruption are not reported in alert log file.
Since our database is in NOARCHIVELOG mode and regular backups are not happening through RMAN (weekly cold mount point backup to tape), i was not able to use RMAN to investigate block corruption.
So used DBVERIFY on all datafiles of database to check the consistency of datafiles, and found DBV gives error for one of the datafile - 'Completely zero block found during dbv:' As i mentioned earlier, we are not taking regular backups using RMAN and database is in NOARCHIVE mode.
alter table shopowner.jobs add constraint uk_salary unique (min_salary, max_salary); insert into shopowner.jobs values (3, 'dba', 20002,55000, 'jobs');
Why does the above constraint not fail when one of these columns are not unique? It needs to fail both to fail the constraint.
3. what is a transaction? and how do you do it? how does deferred transaction look like?
4. How do you view constraints through isqlplus? 5. How do you drop multiple constraints at once? 6. When would you not use cascading delete? 7. How do you use create like cmd in enterprise Manger? I keep getting this error Failed to
commit: ORA-02264: name already used by an existing constraint even if you delete every constraint or rename ever constraint to anything.
8. how to make comments in isqlplus? 9. how do you add multiple insert values in at once in isqlplus?
I'm looking for a way to select 25% of a view.. I need to do this four time to get all the data. The size of the view changes constantly (I need to split my select because of heavy load on an application)
something like this:
Select * from MyView where [some condition that makes only 0-25% show ]
Select * from MyView where [some condition that makes only 25-50% show ]
Select * from MyView where [some condition that makes only 50-75% show ]
Select * from MyView where [some condition that makes only 75-100% show ]
I tried to search in the forum but found nothing.. maybe ROWID could be used to accomplish this somehow?
C:Documents and Settingsuser>sqlplus u1/u123456@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on Pn Wrz 12 12:56:14 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Po│╣czono z: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.7.0 - Production
SQL> update u1.tab1 set u1.tab1.col1=3 where u1.tab1.col1=1;
1 wiersz zosta│ zmodyfikowany.
SQL>
and now i can check which table is locked
SQL> SELECT lo.session_id, lo.OBJECT_ID, obj.object_name FROM v$locked_object lo 2 INNER JOIN Dba_Objects obj ON obj.object_id = lo.OBJECT_ID;
I am trying to delete duplicates from table without using rowid.
here is data:-
create table test(col1 number(3),col2 varchar2(20)); insert into test values(100,'rocky'); insert into test values(100,'rocky');
[Code]....
I know i am perfoming dml on view. IT wont allow me to perform DML on view which contain columns with expression. IS there any way to delete duplicates without using rowid?
I'm placing this here since the only tool I have is TOAD to hack database. I have discovered a bad record with the system but as the date field is '0000' and the values are all hieroglyphics which I can't place in UPDATE statement. Only fields able to determine are that it's a journal entry. I tried the blow code only to be forced out of TOAD via ORA-03113: end-of-file on communication channel error is a generic error. How can I update the bad date fields with such limited access? Is the ROWID acceptable?
Update ft_os set ost_upd_dt = '06-dec-2010' where ost_tran_code = 'JEN' and ost_doc_ref = 'IS'
I am a developer and not a DBA and I need to find th correct query to find the exact rowid of the record locked on a table. This is for a RAC database and locked record can be from the web form in oracle application server. When I try to get the correct row id, I get the following error:
ORA-01410 - Invalid row id For the criteria, the output is Dbms_Rowid.rowid_create(1, -1, 36, 7845, 0), why I get a -1 for the ROW_WAIT_OBJ#?
Additional Information: The lock type is DML and the lock mode is: Row Exclusive, the table is locked and the program is web oracle forms executing.
I am executing the query in Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
How to accomplish getting the correct rowid? Below is the selection criteria I have:
I have a report linked to a form. The link column is currently ROWID and I want to change it to the Primary Key of the DB table, which is called ID.
I have done this before on a previous report/form where that ID was a display column and it works fine. Now I'm trying to copy what I did, which is this:
On the report page, go to Interactive Report attributes, scroll down to Link Column, and for Item 1, change the Name and Value.
The problem is that Name does not list P52_ID. If I type it in, it throws an error when I run the page.
I think I added ID, which is also a Display column, later on, so I wonder whether Apex has a refresh issue and can't "see" P52_ID.
update tab1 set col1 = ( select col2 from tab2 where tab1.id = tab2.id) table 1 has arnd 10,000 rows
table 2 has arnd 1,700,000 rows and has a primary key on column id.This query is taking around 20 secs to execute. I checked the x-plan and most of time taken for table access by index rowid.I checked the stats for the tab2, its just three days old.
I am exporting using query parameter. I am trying to export subset of table using rowid.
SQL> select rowid , name from tab1;
ROWID NAME ------------------ --------------- AAAM0rAAEAAAAGMAAA sam AAAM0rAAEAAAAGMAAB sona AAAM0rAAEAAAAGMAAC rose AAAM0rAAEAAAAGMAAD chris AAAM0rAAEAAAAGMAAE san .................. .... .................. ....
how to select 1st record from duplicate vales in a table.
If we created one table with out primary key column In form in search block have uwi value and top_depth value when i enter uwi and top_depth value then when i click search button then it will display all values in master block.
but here duplicate values r there.
SQL> select rownum,uwi,top_depth,base_depth,test_start_date from well_pre_header;
Let's consider such table that all rows fit into single block:
SQL> create table test as select rownum id, '$'||rownum name from dual connect by level <= 530; Table created. SQL> create index i_test on test(id); Index created. SQL> SQL> begin
[code].....
why does approach with full scan take longer even if table occupies only one data block? PS. 11gR2
WITH DATA AS ( SELECT '100' GRP, '01-JAN-2012' EFFECTIVE_DATE, '30-JUN-2012' TERMINATION_DATE from DUAL UNION ALL SELECT '100' GRP, '01-JUL-2012' EFFECTIVE_DATE, '31-JUL-2012' FROM DUAL union all [code]......
The above mentioned output is produced by using the following business rules:
-- row no 1 = Valid records -- row no 2 = effective date is 1 day after termination date of row no 1. Means valid records -- row no 3 = effective date is equal to the row no 2 termination date -- Means invalid record -- row no 4 = effective date is 1 day after termination date of row no 2 Means valid records -- row no 5 = The gap between row no 4 termination date and row no 5 effective date is more than 1 day. Means record is invalid.
Query always compare effective date with previous valid record termination date by using the above mentioned condition and return result accordingly.
Summary is that there should be 1 day gap between termination date and next effective date as well as effective date is always less than termination date in same rows. In addition, if record is invalid then next record check with previous valid record termination date.
I am trying to do an update with an anonymous PL/SQL block because it has been absolutely impossible to get by the infamous "Single-row subquery returns multiple rows" Whatever.So this code below work... Obviously, I am updating it to a constant.. OK, duh.. Of course it works, it's easy.... Now, I really need to update it to a value in another table that is in my cursor. I believe that I probably need to declare a secondary cursor.
I'm just getting back in the DBA saddle, so I'm a little rusty..
set serveroutput on; DECLARE numrows NUMBER := 0; total NUMBER := 0; CURSOR upd_record_cur IS SELECT m.rowid, m.swcm_cycle, t.newcycle, p.aprem_no from toad.fswcmas m,
[code]...
Not so good here
ORA-06550: line 20, column 53: PL/SQL: ORA-00904: "TOAD"."TTP43425_LOAD"."NEWCYCLE": invalid identifier ORA-06550: line 20, column 10: PL/SQL: SQL Statement ignored
Doesn't work... BEGIN FOR upd_rec IN upd_record_cur LOOP update toad.fswcmas sw set sw.swcm_cycle = toad.ttp43425_load.newcycle WHERE rowid = upd_rec.rowid; total := total + 1;