Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512
I have two Schemas ISYS and ISYSTWO
I had created a Stored Procedure RECINC2 in Schema ISYS
as
procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
AS
cQry VARCHAR2(1000);
BEGIN
cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
dbms_output.put_line(cqry);
EXECUTE IMMEDIATE cQry;
end;
NOW WHEN in Run it gives error
SQL> begin
2 recinc2('ISYSTWO','CODE=4','AGENTS');
3 end;
4 /
INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
begin
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "ISYS.RECINC2", line 8
ORA-06512: at line 2
BUT IF I EXECUTE
the DBMS output
INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
it executes and gives fine result
Please help
Thanks
Chaand kackria
SQL> conn ISYSTWO/ISYSTWO
Connected.
SQL> grant all on agents to isys;
Grant succeeded.
SQL> conn isys/isys
Connected.
SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
PL/SQL procedure successfully completed.
Similar Messages
-
VS2010 errs ORA-00942 and ORA-00904
Platform: Windows XP 2002 SP3, VS2010
After making connections to Oracle in the Server Explorer Data Connections node +(so I can use the VS2010 tools for Oracle)+, the following two errors occur spontaneously after a compile of a Solution:
ORA-00942: table or view does not exist
ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
I seem to get one pair of these popups per connection. When I remove the connection(s), the errors go away. I have been forced to use Oracle SQL Developer instead.
Do you have any clue?SMerrill8 wrote:
Platform: Windows XP 2002 SP3, VS2010
After making connections to Oracle in the Server Explorer Data Connections node +(so I can use the VS2010 tools for Oracle)+, the following two errors occur spontaneously after a compile of a Solution:
ORA-00942: table or view does not exist
ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
I seem to get one pair of these popups per connection. When I remove the connection(s), the errors go away. I have been forced to use Oracle SQL Developer instead.
Do you have any clue?What my be happening is that your DBA has been very restrictive on some tables and packages that are usually available to normal Oracle user accounts. Our tools need to get metadata about various database objects including (in this case) Java stored procedures.
What we can do is have you run a trace so I can see the SQL being executed with errors. Then, after I let you know, you can tell your DBA what privileges you don't have, and I can check with our developers to see if hiding some of the nodes in Server explorer via the options pages or connection filters could prevent this.
To create the trace do the following:
1) Close Visual Studio and all applications that are connected to Oracle
2) In the same Oracle Home as the ODT install, please find the SQLNET.ORA file
3) In that file, add a line:
TRACE_LEVEL_CLIENT=16
4) Start Visual Studio
5) Reproduce the errors as efficiently as possible (with no extra steps)
6) Close Visual Studio immediately
7) Search for the newly created SQLNET.TRC file
8) Zip the file and email to christian(dot)shay(at)oracle(dot)com
9) Remove the TRACE_LEVEL_CLIENT entry in SQLNET.ORA
10) Post here to let me know you emailed it. -
Data Loading using SQL* Loader giving errors..
While loading the data using SQL* Loader, I came across the following errors:
- SQL*Loader-00604 Error occurred on an attempt to commit
- ORA-01041 internal error. hostdef extension doesn't exist
My Control and Data files have proper Carriage Returns i.e. the last line of both the files is blank.
So, if somebody know about this, plz help me.
ThanxORA-00604 error occurred at recursive SQL level string
Cause: An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
Action: If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Support Services
This kind of error occurs when data dictionary is
query a lot.
Joel P�rez -
hi
how i can get the following date using sql, ie i want to get '01-APR-2005'
if the sysdate is between (01/04/2005 - 31/3/2006). in the same way if it is
01/04/2004 - 31/3/2005 i want to get '01-apr-2004'...in the same way for any year..
how i can get this...
thx in adv
Kris
Message was edited by:
KrisSQL> select dt, add_months(trunc(add_months(dt, -3), 'yyyy'), 3) new_dt
2 from t
3 order by dt;
DT NEW_DT
01-APR-04 01-APR-04
31-DEC-04 01-APR-04
01-JAN-05 01-APR-04
31-MAR-05 01-APR-04
01-APR-05 01-APR-05
31-DEC-05 01-APR-05
01-JAN-06 01-APR-05
31-MAR-06 01-APR-05
8 rows selected.
SQL> select add_months(trunc(add_months(sysdate, -3), 'yyyy'), 3) from dual;
ADD_MONTH
01-APR-05 -
Loading data with dates using SQL*Loader
Dear everyone
I am currently trying to load some data containing dates using SQL*Loader.
For termination of fields I have been using ^ because I have some book titles which contain " and ' as part of their title. I found that the TO_DATE function did not seem to work using ^ instead of ". Would I be correct? I think the Oracle manual says that " must be used.
After some Web research I eventually amended my control file to as follows:
load data
infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
REPLACE
into table SCAN_FILE_INFO
fields terminated by "," optionally enclosed by '^'
TRAILING NULLCOLS
(scan_id, scan_filename
file_format_id
orig_scanning_resolution_dpi
scanner_id, scanner_operator_id
scanning_date "TO_DATE (:scanning_date, 'YYYY-MM-DD')"
original_map_publication_id
reprint_publication_id)
A simple line of data is as follow:
280001, ^1910 - London^, 270001, 400, 250001, 260001, "TO_DATE('2007-06-06', 'YYYY-MM-DD')", 200019,
The final column being null.
However when I attempt that I get the following error message:
Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
If I change the scanning_date part to:
scanning_date "EXPRESSION TO_DATE (:scanning_date, 'YYYY-MM-DD')",
or
scanning_date "CONSTANT TO_DATE (:scanning_date, 'YYYY-MM-DD')",
I get the error message:
Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
ORA-00917: missing comma
As soon as I do the following:
scanning_date "EXPRESSION, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
or
scanning_date "CONSTANT, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
I get too many values error message:
Record 1: Rejected - Error on table SCAN_FILE_INFO.
ORA-00913: too many values
I also tested out scanning_date DATE "YYYY-MM-DD", but that just gave the same ORA-01841 error message as above.
I must be doing something very simple which is wrong but I cannot figure it out.
Kind regards
TimAnd why do you have scanning date as "TO_DATE('2007-06-06', 'YYYY-MM-DD')" in your infile? All you need is 2007-06-06. If you can not change infile generation code, use:
load data
infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
REPLACE
into table SCAN_FILE_INFO
fields terminated by "," optionally enclosed by '^'
TRAILING NULLCOLS
(scan_id, scan_filename
file_format_id
orig_scanning_resolution_dpi
scanner_id, scanner_operator_id
scanning_date "TO_DATE(REPLACE(REPLACE(:scanning_date,'TO_DATE('),'''YYYY-MM-DD'')'), 'YYYY-MM-DD')"
original_map_publication_id
reprint_publication_id)SY. -
How to view clob data using sql
Hi,
In our database, we have one table that is having one column of CLOB datatype but now i want to view the data using sql select query but it throws error: "Datatype not supported".
Could any one please let me know how to view the clob data using select query.
Oracle DB version : 10.2.0.3
Thanksh5.
use read procedure
PROCEDURE READ (
lobsrc IN BFILE|BLOB|CLOB ,
amount IN OUT BINARY_INTEGER,
offset IN INTEGER,
buffer OUT RAW|VARCHAR2 );
example Updating LOB by Using DBMS_LOB in PL/SQL
DECLARE
lobloc CLOB; -- serves as the LOB locator
text VARCHAR2(32767):='Resigned: 5 August 2000';
amount NUMBER ; -- amount to be written
offset INTEGER; -- where to start writing
BEGIN
SELECT resume INTO lobloc
FROM employees
WHERE employee_id = 405 FOR UPDATE;
offset := DBMS_LOB.GETLENGTH(lobloc) + 2;
amount := length(text);
DBMS_LOB.WRITE (lobloc, amount, offset, text );
text := ' Resigned: 30 September 2000';
SELECT resume INTO lobloc
FROM employees
WHERE employee_id = 170 FOR UPDATE;
amount := length(text);
DBMS_LOB.WRITEAPPEND(lobloc, amount, text);
COMMIT;
END; -
Getting ORA-17629 and ORA-17627 during setting up of data guard
Hi All,
I am working on data guard setup, and getting ORA-17629 and ORA-17627. The orapwd file was copied to DR server, but still getting the same error when doing a duplicate database command.
RMAN> run{
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> allocate auxiliary channel a1 type disk;
5> allocate auxiliary channel a2 type disk;
6> duplicate target database for standby from active database
7> spfile
8> set db_unique_name='DRTELPRD'
9> set standby_file_management='AUTO'
10> set FAL_CLIENT='DRTELPRD'
11> set FAL_SERVER='TELRPD'
12> nofilenamecheck;
13> }
allocated channel: c1
channel c1: SID=950 device type=DISK
allocated channel: c2
channel c2: SID=942 device type=DISK
allocated channel: a1
channel a1: SID=97 device type=DISK
allocated channel: a2
channel a2: SID=96 device type=DISK
Starting Duplicate Db at 26-AUG-11
contents of Memory Script:
backup as copy reuse
file 'e:\app\product\11.1.0\db_1\DATABASE\PWDtelprd.ORA' auxiliary format
'e:\app\product\11.1.0\db_1\DATABASE\PWDdrtelprd.ORA' file
'E:\APP\PRODUCT\11.1.0\DB_1\DATABASE\SPFILETELPRD.ORA' auxiliary format
'E:\APP\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEDRTELPRD.ORA' ;
sql clone "alter system set spfile= ''E:\APP\PRODUCT\11.1.0\DB_1\DATABASE\SPF
ILEDRTELPRD.ORA''";
executing Memory Script
Starting backup at 26-AUG-11
RMAN-03009: failure of backup command on c1 channel at 08/26/2011 14:44:17
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01031: insufficient privileges
ORA-17629: Cannot connect to the remote database server
continuing other job steps, job failed will not be re-run
released channel: c1
released channel: c2
released channel: a1
released channel: a2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/26/2011 14:44:17
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on c2 channel at 08/26/2011 14:44:17
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01031: insufficient privileges
ORA-17629: Cannot connect to the remote database server
RMAN>Thanks for your instructions. It worked very good. But, I am getting errors for redo01.log files. The redo log files are not created.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'E:\ORACLE\ORADATA\TELPRD\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Errors in file e:\app\diag\rdbms\drtelprd\drtelprd\trace\drtelprd_mrp0_352.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'E:\ORACLE\ORADATA\TELPRD\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Clearing online redo logfile 1 E:\ORACLE\ORADATA\TELPRD\REDO01.LOG
Clearing online log 1 of thread 1 sequence number 3418
Errors in file e:\app\diag\rdbms\drtelprd\drtelprd\trace\drtelprd_mrp0_352.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'E:\ORACLE\ORADATA\TELPRD\REDO01.LOG' -
How to use SQL Procedure in SDK
Hi Experts
I have a form with grid. It is not attached with UDO to save data. I am using SQL Query (oRecordset.DoQuery() )to update and add records of this grid to the table. if there is ten rows then I have to insert records one be one . If five records are updated and after that there is some problem and rest of records does not update in the table. I want to use RollBack command of SQL so that all updated record must removed. Can i use SQL Procedure for that . If I can then how can I transfer all grid data to Sql procedure. Plz give your suggestion.
Thanks
Regards
GorgeHi,
I guess u can use oCompany.StartTransaction and end transaction after that u can commit or rollback.
Vasu Natari. -
DB Adapter calling PL/SQL Procedure gives error
Created partner link, calling pl/sql procedure with one in variable and one out variable. Invoke works fine. Assigning pl/sql return value to output is causing run time error. "Rebuild" and "Deploy" works file.
Here is the error:
Assign_2
[2007/08/03 14:18:06]
Error in evaluate <from> expression at line "93". The result is empty for the XPath expression : "/ns3:OutputParameters/ns3:OUT_STATUS_CODE".
oracle.xml.parser.v2.XMLElement@ba1893
Copy details to clipboard
[2007/08/03 14:18:06]
"{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
- <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
- <part name="summary">
<summary>
empty variable/expression result.
xpath variable/expression expression "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is empty at line 93, when attempting reading/copying it.
Please make sure the variable/expression result "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is not empty.
</summary>
</part>
</selectionFailure>
Any input would be appreciated..
Thanks.Thanks, it works.
In the “Assign Variables”
Changed from:
<copy>
<from variable="Invoke_1_ASNDBTest103_OutputVariable"
part="OutputParameters" query="/ns3:OutputParameters/ns3:OUT_STATUS_CODE"/>
<to variable="outputVariable" part="payload"
query="/ns2:ASNReturnStatus102"/>
</copy>
Changed to:
<copy>
<from variable="Invoke_1_ASNDBTest103_OutputVariable"
part="OutputParameters" query="/ns3:OutputParameters"/>
<to variable="outputVariable" part="payload"
query="/ns2:ASNReturnStatus102"/>
</copy>
So far so good, but one question, compiler gives warning…but everything works well.
Warning(97):
[Error ORABPEL-10041]: Trying to assign incompatible types
[Description]: in line 97 of "C:\HOME\jdevOAExt3\jdevhome\jdev\mywork\ASNTest101\BPELProcess1\bpel\BPELProcess1.bpel", <from> value type "{http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XRX_BPEL_INSERT_ASN_TMP102/}OutputParameters anonymous type" is not compatible with <to> value type "{http://www.thiscompany.com/ns/sales}ASNReturnStatus102".
[Potential fix]: Please make sure that the return value of from-spec query is compatible with the to-spec query.
Also, instead of direct variable to variable copy, used expression to variable copy and it works. You can avoid the warning from the compiler.
Does not work ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters/ns3:OUT_STATUS_CODE')
Works ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters’)
So, why the compiler warning? -
Can we change the system date using Sql
can we change the system date using Sql statement..
can anyone help
Tariq.There is an initialization parameter called FIXED_DATE which lets you set a fixed sysdate for testing purposes, and you can alter that date using the ALTER SYSTEM command, but as implied by the name you are setting a data/time that doesn't change. Since the normal sysdate is derived from the O/S it cannot be altered through SQL
-
How can I validate a date using sql
How can I validate a date using sql or pl/sql
select to_date('01/01/2009','mm/dd/yyyy') from dual this is a good date
but how can I check for a bad date
select to_date('0a/01/2009','mm/dd/yyyy') from dual
HowardWilliam Robertson wrote:
It'll be complicated in pure SQL, as you'll have to parse out day, month and year and then validate the day against the month and year bearing in mind the rules for leap years. It would be simpler to write a PL/SQL function and call that.Nah, not that complicated, you just need to generate a calender to validate against.
SQL> ed
Wrote file afiedt.buf
1 with yrs as (select rownum-1 as yr from dual connect by rownum <= 100)
2 ,mnth as (select rownum as mn, case when rownum in (4,6,9,11) then 30
3 when rownum = 2 then 28
4 else 31
5 end as dy
6 from dual
7 connect by rownum <= 12)
8 ,cent as (select (rownum-1) as cen from dual connect by rownum <= 21)
9 ,cal as (select cen, yr, mn,
10 case when ((yr = 0 and mod(cen,400) = 0)
11 or (mod(yr,4) = 0 and yr > 0))
12 and mn = 2 then dy+1
13 else dy
14 end as dy
15 from cent, yrs, mnth)
16 --
17 ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
18 --
19 select case when cal.cen is null then 'Invalid Date'
20 when not regexp_like(dt,'^[0-9]{1,2}[\/.-_][0-9]{1,2}[\/.-_][0-9]{4}$') then 'Invalid Date'
21 else dt
22 end as dt
23 from dt left outer join
24 cal on (to_number(regexp_substr(dt,'[0-9]+')) between 1 and cal.dy
25 and to_number(regexp_substr(dt,'[0-9]+',1,2)) = cal.mn
26 and floor(to_number(regexp_substr(dt,'[0-9]+',1,3))/100) = cal.cen
27* and to_number(substr(regexp_substr(dt,'[0-9]+',1,3),-2)) = cal.yr)
SQL> /
Enter value for date_dd_mm_yyyy: a1/02/2008
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select 'a1/02/2008' as dt from dual)
DT
Invalid Date
SQL> /
Enter value for date_dd_mm_yyyy: 01/02/2008
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '01/02/2008' as dt from dual)
DT
01/02/2008
SQL> /
Enter value for date_dd_mm_yyyy: 29/02/2008
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '29/02/2008' as dt from dual)
DT
29/02/2008
SQL> /
Enter value for date_dd_mm_yyyy: 30/02/2008
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '30/02/2008' as dt from dual)
DT
Invalid Date
SQL> /
Enter value for date_dd_mm_yyyy: 29/02/2009
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '29/02/2009' as dt from dual)
DT
Invalid Date
SQL> /
Enter value for date_dd_mm_yyyy: 28/02/2009
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '28/02/2009' as dt from dual)
DT
28/02/2009
SQL> /
Enter value for date_dd_mm_yyyy: 0a/01/2009
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '0a/01/2009' as dt from dual)
DT
Invalid Date
SQL> /
Enter value for date_dd_mm_yyyy: 00/01/2009
old 17: ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
new 17: ,dt as (select '00/01/2009' as dt from dual)
DT
Invalid Date
SQL> -
Work around/Alternate solution for Oracle error ORA-01460 and ORA-02063
After the installation of Oracle.DataAccess version 2.111.7.20, I get the following error.(the code worked fine with Oracle.DataAccess version 9.2.0.700 )
I have attached the error as well as the sample code.
ORA-01460 and ORA-02063 are known bugs in the new ODP but would like to know if there is any Work around/Alternate solution for this problem(other than
the use of stored procs)..
Thanks!
Error:
ORA-01460: unimplemented or unreasonable conversion requested
ORA-02063: preceding line from BSREAD_STAGINGRO at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader()
SampleCode
private bool isValidFieldData(string clientName, string fieldNumber, string uniqueID, string clientID)
using (OracleConnection mBSConnection = new OracleConnection(mBSConnectionString))
OracleDataReader oRdr = null;
OracleCommand Valid_FieldData_Command = null;
try
Valid_FieldData_Command = new OracleCommand();
Valid_FieldData_Command.Connection = mBSConnection;
Valid_FieldData_Command.CommandText = "SELECT uniqueid FROM EXTDB.BSData WHERE agencyid = :agencyid and agencyname=:agencyname AND fieldnumber =:fieldnumber AND uniqueid = :uniqueid";
Valid_FieldData_Command.Parameters.Add(":agencyid", OracleDbType.Varchar2, 255).Value = agencyID;
Valid_FieldData_Command.Parameters.Add(":agencyname", OracleDbType.Varchar2, 255).Value = agencyName;
Valid_FieldData_Command.Parameters.Add(":fieldnumber", OracleDbType.Varchar2, 255).Value = fieldNumber;
Valid_FieldData_Command.Parameters.Add(":uniqueid", OracleDbType.Varchar2, 255).Value = uniqueID;
mBSConnection.Open();
oRdr = Valid_FieldData_Command.ExecuteReader(); ->Error occurs here
The error occurs whenever the length of any of the parameter is increased. But there is no specific length where it is breaking down.
For example in this case, it breaks down with the given error if
agencyID > 8
agencyName > 6
fieldNumber > 9
uniqueid > 6The problem was mapping input parameter type.
VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't. -
ORA-00001 and ORA-06512 error on DBMS_WM.ResolveConflicts
We are getting unique constraint error in Production Database. We are able to merge most of the workspaces with no issues. One workspace is givign errors on merge.
Here is the code
begin
dbms_wm.gotoworkspace('denialletterspoc_onmzpulp');
dbms_wm.setdiffversions('denialletterspoc_onmzpulp','LIVE');
dbms_wm.SetConflictWorkspace('denialletterspoc_onmzpulp');
commit;
DBMS_WM.BeginResolve('denialletterspoc_onmzpulp');
DBMS_WM.ResolveConflicts(
workspace => 'denialletterspoc_onmzpulp',
table_name => 'MCM_MESSAGE',
where_clause => ' id in (8403026,10134822,8259485,8259488,8426289,8426287,10186643,8426288) ',
keep => 'CHILD'
exception when others then
DBMS_WM.RollbackResolve('denialletterspoc_onmzpulp');
raise;
end;
ORA-00001: unique constraint (T2.MCM_MESSAGE_PK) violated
ORA-06512: at line 16
I looked at the date in XXX_lt tables and it does not look suspecious. Please help us understand
ORA-00001 and ORA-06512 error.
Amit GangwarHi, Ben
Our OWM_VERSION is 10.2.0.4.3.
I tried disable and enable constraint MCM_MESSAGE_PK. But didn't fix our issue.
Split where clause from " id in (...) " syntax to " id = ... " syntax will reduce performance heavily. And I did some test that " id in (...) " syntax works well in our dev env.
I opened our trace file and get below plsql block. When I perform it get same error with our original codes. Please notice the part of "forall wm_indx in WM_rowids.first .. WM_rowids.last execute immediate 'begin insert into T2.MCM_MESSAGE_lt ... ...", error occurred here. But if I change the "forall" syntax to normal " for ... loop" syntax then no error here. Can you give me some advice or suggestion?
DECLARE
WM_rowids wmsys.lt_ctx_pkg.rowidTabType;
WM_rowids_vt wmsys.lt_ctx_pkg.rowidTabType;
WM_curver wmsys.lt_ctx_pkg.int_tab;
WM_vtRow wmsys.lt_ctx_pkg.int_tab;
WM_nextver wmsys.lt_ctx_pkg.nextver_tab;
WM_found integer := 0;
BEGIN
dbms_wm.gotoworkspace('denialletterspoc_onmzpulp');
dbms_wm.setdiffversions('denialletterspoc_onmzpulp','LIVE');
dbms_wm.SetConflictWorkspace('denialletterspoc_onmzpulp');
/* update the auxilliary table of snapshots */
/* These are rows in the current version that have already been resolved once */
update T2.MCM_MESSAGE_aux st
set (snapShotChild, snapShotParent, versionParent) =
(select p.WM_childds, p.WM_parentds, p.WM_parentver
from T2.MCM_MESSAGE_pkc p
where p.ID = st.ID),
value = '0',
wm_opcode = 'CC'
where st.versionChild = 614
and (ID) in (select ID
from T2.MCM_MESSAGE_pkc p
where (id in (8403026,
10134822,
8259485,
8259488,
8426289,
8426287,
10186643,
8426288)));
select distinct WM_ridchild bulk collect
into WM_rowids
from T2.MCM_MESSAGE_pkc
where (id in (8403026,
10134822,
8259485,
8259488,
8426289,
8426287,
10186643,
8426288))
and WM_childver != 614;
if (WM_rowids.first is not null) then
WM_found := 1;
forall wm_indx in WM_rowids.first .. WM_rowids.last
update T2.MCM_MESSAGE_lt
set retireTime = wmsys.owm_9ip_pkg.activeTimeForDML,
nextver = wmsys.lt_ctx_pkg.getNextVer(nextver,
614,
version,
'denialletterspoc_onmzpulp',
'CRS_LEAF',
22)
where rowid = WM_rowids(wm_indx)
returning wmsys.lt_ctx_pkg.getCurNextVer bulk collect into WM_nextver;
/* These are the rows that have not yet been resolved after the latest BeginResolve */
forall wm_indx in WM_rowids.first .. WM_rowids.last execute immediate
'begin insert into T2.MCM_MESSAGE_lt(ID,DPS_APPLICATION_ID,TYPE_ID,NAME,PRIVILEGED,CAMPAIGN_ID,TEXT,FILE_NAME,GRAPHIC_WIDTH,GRAPHIC_HEIGHT,DESCRIPTION,ACTIVE,INCLUDE_IN_LIBRARY,MESSAGE_FILTER_ID,OP_USER_ID,OP_WORKSPACE,OP_TIME,version,createtime,retiretime,nextver,delstatus,ltlock)
(select t1.ID,t1.DPS_APPLICATION_ID,t1.TYPE_ID,t1.NAME,t1.PRIVILEGED,t1.CAMPAIGN_ID,t1.TEXT,t1.FILE_NAME,t1.GRAPHIC_WIDTH,t1.GRAPHIC_HEIGHT,t1.DESCRIPTION,t1.ACTIVE,t1.INCLUDE_IN_LIBRARY,t1.MESSAGE_FILTER_ID,t1.OP_USER_ID,t1.OP_WORKSPACE,t1.OP_TIME,614, wmsys.owm_9ip_pkg.activeTimeForDML, null,:1, sign(delstatus)*(abs(delstatus)+1),
wmsys.lt_ctx_pkg.checkngetlock(''C'', t1.ltlock, t1.nextver, ''denialletterspoc_onmzpulp'', 0,
''MODIFY'', t1.version, t1.delstatus, 0, 1)
from T2.MCM_MESSAGE_lt t1
where t1.rowid = :2); end;'
using WM_nextver(wm_indx),
WM_rowids(wm_indx)
end if;
if (WM_found = 1) then
wmsys.lt_ctx_pkg.update_modified_tables('T2',
'MCM_MESSAGE',
614,
'denialletterspoc_onmzpulp',
22);
end if;
if (WM_found = 1) then
forall wm_indx in WM_rowids.first .. WM_rowids.last
delete from T2.MCM_MESSAGE_aux
where (ID) in (select ID
from T2.MCM_MESSAGE_lt
where rowid = WM_rowids(wm_indx))
and childState = 'denialletterspoc_onmzpulp';
end if;
/* now insert new syncing information about these rows */
execute immediate 'insert into T2.MCM_MESSAGE_aux (
select ID,
p.WM_childstate, p.WM_parentstate,
p.WM_childds, 614, p.WM_parentds, p.WM_parentver, ''0'',''CC''
from T2.MCM_MESSAGE_pkc p
where ( id in (8403026,10134822,8259485,8259488,8426289,8426287,10186643,8426288) ) )';
END;
Thanks
Amos -
How to resolve ora error ORA-00604 and ORA-00036.
I am getting this error in alert.log:
ORA-00604: ERROR OCCURED AT RECURSIVE SQL LEVEL 51
ORA-00036: MAXIMUM NUMBER OF RECURSIVE SQL LEVELS (50) EXCEEDED.Did someone create an 'after servererror' trigger?
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4018285967344
Read the part where he provides a query to find the trigger:
select owner, trigger_name
from dba_triggers
where trigger_type = 'AFTER EVENT'; -
Trying to download Itunes and am getting error messages 7 and R6034
Trying to download Itunes and am getting error messages 7 and R6034?
Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
Remove all of these items in the following order:
iTunes
Apple Software Update
Apple Mobile Device Support (if this won't uninstall move on to the next item)
Bonjour
Apple Application Support
Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
Please note:
Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
HT1925: Removing and Reinstalling iTunes for Windows XP
HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
tt2
Maybe you are looking for
-
New computer, music IS on it, can't sync ipod??
OK, so a year ago my computer crashed. A friend of mine re-housed the harddrive, and saved all my music and pictures. I have been using my ipod touch and never did hook it up to the new computer. Got ambitious and fired up a new itunes, copied in all
-
Failure of flash movie to run on iWeb
Hi, I've only started using Flash CS4 a short time ago and I'm having a problem being able to run a short flas movie on an iWeb site. Here's what I did to create the movie from scratch through to its failure to run on iWeb 1. A QuickTime movie was en
-
Remove duplicates for list object
Hi, I have retrieved all the xml node values in List<object>. Now, I want to remove all the duplicates objects from that list. Example: If the object has n properties, I should remove only duplicate objects that have same values in all the n properti
-
I just bought the Nikon D610 a few days ago. I took it out for a test shoot. My PS CS5 won't read the raw files. I clicked on Update under Help menu. After it went through the updates, it still not recognizing the raw files. Please help. Thank
-
I would like to use a song I have already purchased in Itunes for a ringtone. I am a little confused. Do I need to purchase it again to use as ringtone on my iphone? Thanks..