ORA-21700 Error when running C# stored procedure to do a spatial query
Hi All
I'm having trouble running a C# stored procedure that (via another object) that falls over running a spatial query with the following error.
OAR-21700 object does not exist or is marked for delete
If I take the sql of the spatial query out and run it separately in SqlPlus it runs as expected.
If I use the object that executes the spatial query via NUnit (i.e. executed on the client, rather than the server) it also works as expected.
Can anyone help? Is there some issue using Oracle Spatial queries with the Oracle Database Extensions for .NET?
I can indeed. Here is a slightly simplified version:
SELECT secondary_catch.mi_prinx AS primarykey
FROM mapinfo_data.secondary_catch
WHERE sdo_relate (secondary_catch.geoloc,
(SELECT geoloc
FROM training_6.building_polygons
WHERE building_id = 10002507117),
'mask=anyinteract querytype=WINDOW'
) = 'TRUE'
Interestingly, if I attempt to run this query inside a C# stored procedure using the implicit context connection (i.e. OracleConnection.ConnectionString = "context connection=true") it fails with the error I described above.
If however I create a new connection and connect as a regular user on my database, the query works correctly.
So in that sense I have a workaround, but I'd like to avoid using it if I can as creating a new explicit connection is an overhead I can do without.
Similar Messages
-
ORA-03115 error when calling a Stored Procedure
Hi All,
I'm in the process of porting a Pro/C app from NT to Linux. I've installed 8.1.5 on our Linux box and patched it up to 8.1.5.02.
It all kind of works ok, except that I'm sometimes getting ORA-03115 errors when the app calls a stored procedure. The call in question looks like this:
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR resprows[50][3998];
int numret = 0;
int numrows= 50;
int done= 0;
unsigned long resp_id = 0;
EXEC SQL END DECLARE SECTION;
EXEC SQL AT DB_NAME EXECUTE
BEGIN pkg_something.getdata(
:resp_id, /* IN */
:numrows, /* IN */
:done, /* OUT */
:resprows, /* OUT */
:numret /* OUT */
END;
END-EXEC;
The stored procedure basically uses the resp_id value to select rows from a table;
in each row there is a VARCHAR2(4000) column which it copies into the hostarray resprows.
There may be anything from 1 to numrows returned from the SP.
Initially, the resprows rows were defined to be size [4000]. Unfortunately, this caused ORA-02005 errors - I then changed the size to [3998], which seemed to fix the 02005's (although I'm unclear as to the reasons why).
Now I'm getting the 03115 errors when calling the SP. The oracle manual is not very helpful on what this error means.
This all works chipper on NT.
Any ideas?
Thanks in advance,
Nigel.
PS: The database the app is talking to is still hosted on NT.
nullHiston FTM wrote:
ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
>
The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
And just checking:
You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM -
ORA-04062 error when running forms with different users
ORA-04062 error when running forms with different users
I have a form that has a block that should display some data from another users tables. (The other user's name is dynamic, it's selected from a list box)
I wrote a stored procedure to get the data from other user's tables.
When I compile the form and run it with the same user I compiled, it works without any error. But when I run the compiled form with another user I get the ORA-04062 (signature of procedure has been changed) error.
I tried setting REMOTE_DEPENDENCIES_MODE to SIGNATURE in init.ora but it didn't help.
My Forms version is 6i with Patch 15.
Database version is 9.
Here is my stored procedure:
TYPE Scenario_Tab IS TABLE OF NUMBER(34) INDEX BY BINARY INTEGER;
TYPE Open_Curs IS REF CURSOR;
PROCEDURE Get_Scenarios(User_Name IN VARCHAR2, Scen_Table OUT Scenario_Tab) IS
Curs Open_Curs;
i NUMBER;
BEGIN
OPEN Curs FOR
'SELECT Seq_No FROM '|| User_Name ||'.scenario';
i := 1;
LOOP
FETCH Curs INTO Scen_Table(i);
EXIT WHEN Curs%NOTFOUND;
i := i + 1;
END LOOP;
END Get_Senarios;
I would be happy to solve this problem. It's really important.
Maybe somebody can tell me another way to do what I want to do. (getting a list of values from another users tables)I think it should be a better solution to create a package,
and put your own TYPES and procedure into it.
CREATE OR REPLACE PACKAGE PKG_XXX IS
TYPE TYP_TAB_CHAR IS TABLE OF .... ;
PROCEDURE P_XX ( Var1 IN VARCHAR2, var2 IN OUT TYP_TAB_CHAR );
END ;
Then in your Form :
Declare
var PKG_XXX.TYP_TAB_CHAR ;
Begin
PKG_XXX.P_XX( 'user_name', var ) ;
End ; -
Error while running a stored procedure in SBO
Hi all,
i have a stored procedure that i run in my sbo. When i run the stored procedure i get the following error :
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation.
'Servicecontracten' (OCTR) 05/10/2011 18:03:36 -1
i launch my sp like this :
exec [spu_DS_HistProjektUserVeldenViewBetalingen] (i pass no parameters while testing. i put them fix in my sp)
my stored procedure looks like this :
USE [def1]
GO
/****** Object: StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen] Script Date: 10/05/2011 18:03:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
ALTER PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
/* @project_number varchar(20),
@billperiod_type varchar(10) */
AS
BEGIN
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
isnull(billperiod_type,'') as billperiod_type
INTO #tempDS_HistProjektUserVeldenViewBetalingen
FROM DS_HistProjektUserVeldenViewBetalingen t1
WHERE project_number = '08053A'
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnnr) as lijntotaal,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnNr and billperiod_type = '110-01' ) as lijntotaalKetting
FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
WHERE fase,'') is not null
ORDER BY t1.fase
DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
END
GO
Somebody has a clue what i'm doing wrong ?
thnxThanks Gordon for your reply.
i've changed my sp to :
USE [def1]
GO
/****** Object: StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen] Script Date: 10/05/2011 18:56:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
CREATE PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
/* @project_number varchar(20),
@billperiod_type varchar(10) */
AS
BEGIN
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
isnull(billperiod_type,'') as billperiod_type
INTO #tempDS_HistProjektUserVeldenViewBetalingen
FROM DS_HistProjektUserVeldenViewBetalingen t1
WHERE isnull(project_number,'') = '08053A'
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnnr,0)) as lijntotaal,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnNr,0) and isnull(billperiod_type,'') = '110-01' ) as lijntotaalKetting
FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
WHERE isnull(fase,'') <> ''
ORDER BY t1.fase
DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
END
GO
but that didn't solved my problem. Any other idea's ?
kind regards.
Kurt -
ORA-06502 - Error when running "Ask The Expert 0.9"
Hi ,
I successfully installed "Ask the Expert" package with Apex 3.0 on Oracle 10g Database 10.2.0.1.0. No error ocurred during the import in my Apex environment.
Besides that, i'm having problems when i tried to run the "Aks the Expert". It always shows the following message errors:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Error Unable to write activity log.
I think it was a problem with APEX instalation, but i could run the Sample Application of Apex without any problem.
I opened an SR in Metalink, but to my surprise, the analist of support don't know what's wrong with the demo "Ask de Expert".
The debug function of the application show the following commands before the error ocurrs:
0.01:
0.01: S H O W: application="103" page="1" workspace="" request="" session="6648566035252817"
0.01: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
0.01: alter session set nls_language="AMERICAN"
0.01: alter session set nls_territory="AMERICA"
0.01: NLS: CSV charset=WE8MSWIN1252
0.01: ...NLS: Set Decimal separator="."
0.01: ...NLS: Set NLS Group separator=","
0.02: ...NLS: Set date format="DD-MON-RR"
0.02: ...Setting session time_zone to -03:00
0.02: NLS: Language=en-us
0.02: Application 103, Authentication: CUSTOM2, Page Template: 667896385843019243
0.02: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
0.02: ...ok to reuse builder session for user:nobody
0.03: ...Application session: 6648566035252817, user=nobody
0.03: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
0.03: Session: Fetch session header information
0.03: ...Metadata: Fetch page attributes for application 103, page 1
0.03: Fetch session state from database
0.03: Branch point: BEFORE_HEADER
0.03: Fetch application meta data
0.04: Computation point: BEFORE_HEADER
0.04: ...Perform computation of item: P1_CLEAN_CRITERIA, type=FUNCTION_BODY
0.04: ...Performing function body computation
0.06: ...Session State: Save "P1_CLEAN_CRITERIA" - saving same value: ""
0.06: Processing point: BEFORE_HEADER
0.06: ...Process "Read and Write Activity Cookie": PLSQL (BEFORE_HEADER) declare l_cookie_id number; begin owa_util.mime_header('text/html', FALSE); -- ate_api.read_activity_cookie; l_cookie_id := ate_api.fetch_activity_cookie_val( 'COOKIE_ID' ); -- if l_cookie_id is null then l_cookie_id :=
Content-type: text/html; charset=ISO-8859-1 Set-Cookie: activity_ask_expert=1|2400346189796; expires=Wed, 01-Jan-2020 08:00:00 GMT; path=/;
0.06: Encountered unhandled exception in process type PLSQL
0.06: Show ERROR page...
0.06: Performing rollback...
Please, could any one help me to solve this problem ? Metalink couldn't help me diagnosing what's wrong.
Thanks,
Sergio CoutinhoHi,
I don´t know if it help the analisis, but i collect some informations about my environment:
1) HTML DB version
3.0.1
2) Database version
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
3) Database server operating system (as well, if 32-bit or 64-bit)
Solaris 5.9 - 64 bits
4) Database Parameters:
PARAMETER VALUE
NLS_CALENDAR GREGORIAN
NLS_CHARACTERSET WE8ISO8859P1
NLS_COMP BINARY
NLS_CURRENCY $
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_DUAL_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_LANGUAGE AMERICAN
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS .,
NLS_RDBMS_VERSION 10.2.0.1.0
NLS_SORT BINARY
NLS_TERRITORY AMERICA
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
Could it explain why ASK THE EXPERT is running on hosted apex site and it´s
generating error when running in my environment?
Thanks for the help !
Sergio -
ORA-03113 error when running the Java stored proc demos
Hi there,
Has anyone else run into this issue. When attempting to transfer an object type from Java to Oracle - through a Java stored proc - the session crashes with:
ORA-03113: end-of-file on communication channelLooking in the trace file generated the error message looks something like:
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [0x8fe04468] [SIGTRAP] [unknown code] [0x8FE59034] [] []
Current SQL statement for this session:
select pointruntime.jdistance(point(1, 2), point(2, 3)) from dual
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
ksedmp+764 call ksedst 0 ? 2C4F4A ? 2C ? 98968000 ?
DB02C ? 27A50000 ?
ssexhd+956 call ksedmp 3 ? 0 ? 8FE5E790 ? 5905870 ?
8FE0434C ? 40895E4 ?
0x9012c860 call ssexhd 5 ? BFFEEF70 ? BFFEEFB0 ? 0 ?
0 ? 0 ?As you can see from the trace snippet above, I was attempting to run one of the Oracle Java stored procedure demos. Has anyone successfully run those demos? Specifically the ones where complex types (table objects or the Point object) are passed back to Oracle from the JVM.
I would appreciate some help with this. The code works fine in a Windows or Solaris environment but barfs on Apple. Truly annoying....
Anyone?
Thanks in advance,
AlexYes,
Apologies for not stating that information, Steve. Was a bit naughty of me! I guess the reason I didn't was because I just wanted to hear if anyone else running Oracle on Mac received such errors when executing the Java stored proc demos (specifically, the execution of PointRuntime.jDistance). Nevertheless, here's the relevant info from the trace file:
Dump file /Users/oracle/admin/sandbox/udump/sandbox_ora_1861.trc
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
ORACLE_HOME = /Users/oracle/product/10.1.0/db
System name: Darwin
Node name: maczilla.local
Release: 8.3.0
Version: Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC
Machine: Power Macintosh
Instance name: sandbox
Redo thread mounted by this instance: 1
Oracle process number: 10
Unix process pid: 1861, image: [email protected] for the Java version, according to the readme file in the javavm directory, I am running 1.4.1:
1.5 Java Compatibility
This release has been thoroughly tested with Sun's Java Compatibility
Kit for the JDK 1.4.1. Oracle is committed to OracleJVM keeping pace
with Java and other Internet standards. -
Error when calling a stored procedure from a SQL Script
Apologies if this is a really dumb question but I can't seem to call a procedure in package from a SQL script. I have a simple package.procedure containing a loop to populate a table. I would like to include a call to this procedure from my database install script, that also includes my CREATE and INSERT statements. I run the script using "@install_databae" and the CREATE and INSERT statements run fine. The script gives an error when it reaches the line below:
exec lazarus.PopulateGridPositions;
and gives the error.....
BEGIN lazarus.PopulateGridPositions; END;
ERROR at line 1:
ORA-04063: package body "LAZARUS.LAZARUS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "LAZARUS.LAZARUS"
ORA-06512: at line 1
The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.
I've obviously missed some fundamental concept with scripts and SQL. Please can anybody help me?Histon FTM wrote:
ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
>
The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
And just checking:
You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM -
Ora-04021 error while compiling a stored procedure
Hi Gurus,
I am getting a ora-04021 timeout error while trying to compile a stored procedure. My Oracle version is 9i on Unix.
Thanks
Amitava.amitavachatterjee1975 wrote:
Hi Gurus,
I am getting a ora-04021 timeout error while trying to compile a stored procedure. My Oracle version is 9i on Unix.
Thanks
Amitava.
my car won't go.
tell me how to make my car go.
How do I ask a question on the forums?
https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002
[oracle@localhost ~]$ oerr ora 4021
04021, 00000, "timeout occurred while waiting to lock object %s%s%s%s%s"
// *Cause: While waiting to lock a library object, a timeout occurred.
// *Action: Retry the operation later.
[oracle@localhost ~]$ -
Error while running the stored procedure
hi , all
I am geeting the error when im trying to run any procedures, even a simple procedure. Plz help me.. the error is PLS-00306: wrong number or types of arguments in call to 'PROC2'While calling procedure 'PROC2' - passed number of arguments wrong or Datatype mismatch.
For Example.
1) passed number of arguments wrong
PROC2 have arguments - 5. but you passed 4 arguments then you will get this type of error.
2) Datatype mismatch
First arugument declared in procedure is Number, but you passed character then you will get this type of error. -
ORA-27369 Error when running Scheduler jobs
We have an Oracle 11g Standard Edition (11.1.0.7) instance running on virtualized Oracle Enterprise Linux, hosted on VMWare. Every external job submitted via the Scheduler ends with the above error, although the jobs all run to completion - all steps are completed.
All of the external jobs are executed by a specific shell script that dynamically queries a table in the database with all the steps/programs that need to be executed. This varies from job to job. The script receives several parameters that are used to extract the task information.
If we run the same script from the OS, with the same parameters, the script runs to completion and no error is raised. We have tested this exhaustively and have never had the script raise any OS level errors.
Even a simple external script (e.g. a one-line shell script with something like "sleep 10") returns the same error code. The alert log always shows the same error text for every job:
ORA-12012: error on auto execute of job 73527
ORA-27369: job of type EXECUTABLE failed with exit code: No child processes
In our company we have at least 3 other similar 11g SE/Enterprise Linux/VMWare installations, and ours is the only one with this issue. I have had an open SR with Oracle support since January 2010 on this problem, but that has been an endless cycle of questons, replys, information requests, and requests for more info. No progress whatsoever. Since the jobs run to completion, it is not preventing us from workign with the scheduler, but the end users have become a little complacent with the "Error" status attached to their jobs so if one really fails, it may get missed.
The only difference we know of between our installation and the other similar installs is that we use Arcserve Agent for Linux to do (cold) backups to a remote Arcserve host. The other 3 sites use other backup software.
What we have observed is the following:
1. If we simply bounce the database, the problem persists.
2. If we shut down and restart the virtual server OS, the problem persists.
3. If we shut down the VMWare host server (and all the other VM's on that host!) and restart it, the problem persists.
4. If we shut down the virtual server OS and make a significant change to the server (e.g. add a new virtual disk) and restart it, the scheduler runs fine and no error is reported. But only until the next backup cycle. Then the problem returns and is persistent until the next time we make a similar significant change in the host virtual machine.
With no clear suggestions from Oracle Support, we are at our wit's end as to what we might be able to do to resolve this issue. There does appear to be a cause and effect link to Arcserve, but implementing a different backup solution is not an option at this time.
I wanted to post this issue in the hope that someone may have a tip or suggestion that could lead to a solution.....I think it should be a better solution to create a package,
and put your own TYPES and procedure into it.
CREATE OR REPLACE PACKAGE PKG_XXX IS
TYPE TYP_TAB_CHAR IS TABLE OF .... ;
PROCEDURE P_XX ( Var1 IN VARCHAR2, var2 IN OUT TYP_TAB_CHAR );
END ;
Then in your Form :
Declare
var PKG_XXX.TYP_TAB_CHAR ;
Begin
PKG_XXX.P_XX( 'user_name', var ) ;
End ; -
No method found error when calling java stored procedured
hi:
i am rather confused about this. i have written several
java stored procedures and all of them work fine. but when i tried another one , the error message 'no method found 'occurs
when i call the procedure from sqlplus.
it' s a simple procedure . but it's very strange and happens
from time to time
my compile shell as following
javac -classpath $ORACLE_HOME/jdbc/lib/classes12.zip GenFiles.java
$ORACLE_HOME/bin/loadjava -u zw/zw@aixtest GenFiles.class
and
my definition as following
create or replace procedure files(chargeCyckeID varchar2, cycleStart varchar2,cycleEnd varchar2,
loginName varchar2, filePath varchar2, start1 number, end1 number, step number)
AS LANGUAGE JAVA
NAME 'GenFiles.genFile(String , String , String , String , String , int , int , int )';
and my java code is here :
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.*;
public class GenFiles{
public static void main(String[] args){
04UU<F7QV\FZ#,V\FZ?*J<#,V\FZ=aJx#,5GB<C{#, ND<~B7>6#,Pr:E?*J<#,Pr:E=aJx#,2=3$#(Iz3IND<~5D<GB<J}#)
public static void genFile(String chargeCycleID, String cycleStart, String cycleEnd, String loginName, String filePath, int start, int end, int step){
try{
String sqllist = "select customer_id,contract_code, usercode,ani,ord,"
+ " agent_code,linkman, customer_name , postcode,paymethod_category_id ,"
+ " ltrim(to_char(cost,'999999990.99')) cost,call_duration,from listani_file where ord> ? and ord<? order by contract_code";
String sqlcalls1 = "select a.ani || ',' || a.PASS || ',' || to_char(a.START_TIME,'yyyy-mm-dd hh24:mi:ss') stime || ',' || trunc(a.CALL_DURATION/60)||':'||ltrim(to_char(mod(a.CALL_DURATION,60),'09')) CALL_DURATION || ',' || ltrim(to_char((CALL_AMOUNT/ceil(CALL_DURATION/60)),'999999990.99')) RATE || ',' || ltrim(to_char(a.CALL_AMOUNT,'999999990.99')) CALL_AMOUNT"
+" from call_fact_mind a "
+" where a.usercode=?"
+ " and a.ani=? "
+ " and a.period_key<='" + end + "'"
+ " and a.period_key>='" + start + "'"
+ " and a.charge_flag='Y' "
+ " and a.CALL_DURATION>6"
+ " and a.CALL_AMOUNT>0"
+" order by a.period_key";
String sqlcalls2 = "select a.ani || ',' || a.PASS || ',' || to_char(a.START_TIME,'yyyy-mm-dd hh24:mi:ss') stime || ',' || trunc(a.CALL_DURATION/60)||':'||ltrim(to_char(mod(a.CALL_DURATION,60),'09')) CALL_DURATION || ',' || ltrim(to_char((CALL_AMOUNT/ceil(CALL_DURATION/60)),'999999990.99')) RATE || ',' || ltrim(to_char(a.CALL_AMOUNT,'999999990.99')) CALL_AMOUNT "
+ " from call_fact_mind a "
+ " where a.usercode=?"
+ " and a.period_key<='" + end + "'"
+ " and a.period_key>='" + start + "'"
+ " and a.charge_flag='Y' "
+ " and a.CALL_DURATION>6"
+ " and a.CALL_AMOUNT>0"
+" order by a.period_key";
Connection con = new OracleDriver().defaultConnection();
try{
int i = start;
//8y>]2=3$Q-;7
while( true){
if( i>=end ) break;
genFile(con, i , i+step, chargeCycleID, loginName, filePath, sqllist, sqlcalls1, sqlcalls2);
i += step;
}catch(Exception ex){
}finally{
if( con != null) con.close();
}catch(Exception exx){}
8y>]2=3$Iz3IND<~
private static void genFile(Connection con, int start, int end, String chargeCycleID, String loginName, String filePath, String sqllist, String sqlcalls1, String sqlcalls2) throws Exception{
PreparedStatement ps1 = null;
PreparedStatement ps2 = null;
PreparedStatement ps3 = null;
ResultSet rs1 = null;
ResultSet rs2 = null;
String fileName = filePath + System.getProperty("file.separator") + start + "_" + end + ".txt";
BufferedWriter writer = null;
try{
writer = new BufferedWriter(new FileWriter(fileName));
ps1 = con.prepareStatement(sqllist);
ps2 = con.prepareStatement(sqlcalls1);
ps3 = con.prepareStatement(sqlcalls2);
ps1.setInt(1, start);
ps1.setInt(2, end);
rs1 = ps1.executeQuery();
//Iz3Ibuffer,V;SPR;6(<GB<J12EP4HkND<~
StringBuffer strBuffer = new StringBuffer();
int i =0;
//Q-;7:OM,=a9{</
String preContractCode = "";
String currentContractCode = "";
while( rs1.next()){
currentContractCode = rs1.getString("contract_code");
if( rs1.getString("ani") == null){
ps2.setString( 1, rs1.getString("usercode"));
rs2 = ps2.executeQuery();
}else{
ps1.setString(1, rs1.getString("usercode"));
ps1.setString(2, rs1.getString("ani"));
rs2 = ps1.executeQuery();
//Hg9{3vOVPB5D:OM,:E#,<SHk:OM,OnM7,contract_costJG:OM,On7QSC
if( ! preContractCode.equals(currentContractCode)){
//TZG0Cf<SHk?UPP
strBuffer.append("\r\n");
String contractHead = "\"1\"" + ",\"" + rs1.getString("linkman") + "\",\"" + rs1.getString("customer_name")
+ "\",\"" + rs1.getString("contract_code") + "\",\"" + rs1.getString("agent_code")
+ "\",\"" + chargeCycleID + "\",\"" + rs1.getString("contract_cost") + "\"";
strBuffer.append(contractHead);
while( rs2.next()){
if( i<1000){
i++;
strBuffer.append("\"2\"" + rs2.getString(1));
}else{
String str = strBuffer.toString();
writer.write(str, 0, str.length());
strBuffer = new StringBuffer();
strBuffer.append(rs2.getString(1));
i = 1;
//<SHk7QSC:O<F
if( rs1.getString("ani") == null){
String trail = "\"2\"" + ",\"" + "ani: " + "\",\"" + rs1.getString("ani") + "\",\"" + "Total Amount: " + "\",\"" + rs1.getString("cost") + "\"\r\n";
strBuffer.append(trail);
}else{
String trail = "\"2\"" + ",\"" + "usercode: " + "\",\"" + rs1.getString("usercode") + "\",\"" + "Total Amount: " + "\",\"" + rs1.getString("cost") + "\"\r\n";
strBuffer.append(trail);
preContractCode = currentContractCode;
writer.close();
rs2.close();
}catch(Exception ex){
}finally{
if( rs1 != null) rs1.close();
if( rs2 != null) rs2.close();
if( ps1 != null) ps1.close();
if( ps2 != null) ps2.close();
i need your help!
regards
daniel wangHi again, Daniel,
I'm only guessing here, but unless you've made lots of mistakes when
you copied your code to your post to the forum, your method signatures
don't match. The definition of "genFile" in your java class is quite
different to what you wrote in your PL/SQL wrapper.
Also, you have defined "genFile" to be a private method -- I think it
needs to be public.
Also, I think the "main" method doesn't need to be in the "GenFiles"
class -- perhaps you should remove it.
Also, I think in your PL/SQL wrapper you need to use fully qualified
names, so use "java.lang.String" and not just "String".
Lastly, I think you should use the "-force" and "-resolve" flags
with the "loadjava" command.
Good Luck,
Avi. -
ORA-22275 error when running a USER_DATASTORE index on CLOB column
Running Oracle 9.2.0.8
Getting the following errors thrown for every row in the table when creating the index:
DRG-12604: execution of user datastore procedure has failed
DRG-50857: oracle error in drsinopen
ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275
ORA-06512: at "SYS.DBMS_LOB", line 347
ORA-06512: at "CRT_DEV.MULTI_INDEX_EN_PRC", line 27
ORA-06512: at "CTXSYS.CTXSYS_MULTI_INDEX_EN_PRC", line 7
ORA-06512:
Index scripts:
ctx_ddl.create_preference( 'crt_user_datastore_en', 'user_datastore' );
ctx_ddl.set_attribute( 'crt_user_datastore_en', 'procedure', 'ctxsys_multi_index_en_prc' );
ctx_ddl.set_attribute('crt_user_datastore_en', 'output_type', 'CLOB');
CTX_DDL.create_preference('CRT_PREF_EN','BASIC_WORDLIST');
ctx_ddl.set_attribute('CRT_PREF_EN','FUZZY_MATCH','ENGLISH');
ctx_ddl.set_attribute('CRT_PREF_EN','STEMMER','ENGLISH');
ctx_ddl.set_attribute('CRT_PREF_EN','SUBSTRING_INDEX','TRUE');
CTX_DDL.create_section_group('CRT_HTML_SECTION','HTML_SECTION_GROUP');
CTX_DDL.add_zone_section('CRT_HTML_SECTION', 'title', 'TITLE');
ctx_ddl.create_preference('CRT_LEXER_EN', 'BASIC_LEXER');
ctx_ddl.set_attribute('CRT_LEXER_EN', 'skipjoins', '-');
ctx_ddl.set_attribute ( 'CRT_LEXER_EN', 'index_text', 'YES');
ctx_ddl.set_attribute ( 'CRT_LEXER_EN', 'base_letter', 'YES');
ctx_ddl.set_attribute ( 'CRT_LEXER_EN', 'index_stems', 'ENGLISH');
ctx_ddl.set_attribute ( 'CRT_LEXER_EN', 'index_themes', 'YES');
ctx_ddl.set_attribute ( 'CRT_LEXER_EN', 'theme_language', 'ENGLISH');
CREATE INDEX MULTI_CONTENT_EN_IDX ON CONTENTS
(top_content_html_en)
INDEXTYPE IS CTXSYS.CONTEXT
parameters ('filter ctxsys.null_filter DATASTORE crt_user_datastore_en LEXER CRT_LEXER_EN wordlist CRT_PREF_EN section group CRT_HTML_SECTION');I have issued the following grants:
grant execute on CTXSYS.ctxsys_multi_index_fr_prc to CRT;
grant execute on CTXSYS.ctxsys_multi_index_en_prc to CRT;
grant execute on CRT_DEV.multi_index_fr_prc to CTXSYS;
grant execute on CRT_DEV.multi_index_en_prc to CTXSYS;CRT is the index owner schema
CRT_DEV is the schema owning the user_datastore procedure. (Could this be the problem?) Should the procedure reside in the same schema as index owner?
Here are my procedures:
CTXSYS stub:
CREATE OR REPLACE PROCEDURE ctxsys_multi_index_en_prc (
rid IN ROWID,
tlob IN OUT CLOB
IS
BEGIN
crt_dev.multi_index_en_prc (rid, tlob);
END;Actual procedure:
CREATE OR REPLACE PROCEDURE multi_index_en_prc (rid IN ROWID, tlob IN OUT CLOB)
IS
BEGIN
FOR c1 IN (SELECT '<TITLE>'
|| cc.content_category_name_en
|| '</TITLE>' content_title,
c.content_html_content_en, c.top_html_content_en
FROM content_categories cc, CONTENTS c
WHERE cc.content_category_id = c.content_category_id
AND c.ROWID = rid)
LOOP
DBMS_LOB.writeappend (tlob, LENGTH (c1.content_title),
c1.content_title);
DBMS_LOB.append (dest_lob => tlob, src_lob => c1.top_html_content_en);
DBMS_LOB.append (dest_lob => tlob,
src_lob => c1.content_html_content_en
END LOOP;
END multi_index_en_prc;I can run the following test script, and get no errors:
declare
rid rowid;
tlob clob;
begin
dbms_lob.CREATETEMPORARY(tlob,false);
CRT_DEV.multi_index_en_prc('AAAC0UAAMAAAAMAAA2',tlob);
dbms_output.put_line(dbms_lob.GETLENGTH(tlob));
dbms_output.put_line(dbms_lob.substr(tlob,25));
dbms_lob.FREETEMPORARY(tlob);
end;Output:
25
<TITLE>References</TITLE>
I'm at a total loss on the cause of the error.
Any help/tips is appreciated!
Thanks
Edited by: pl_sequel on Feb 9, 2010 11:25 AMThanks Roger.
I did add those in... DBA insists that didn't matter, since explicit "select" privs were granted to CRT_DEV to select CRT tables. He did say that a length check was required on the CLOBS before appedning them to the destination lob (tlob) to prevent NULL lob locators being appended and raising the exception.
In any case, it works now... however, unsure if it's due to the schema prefix on the tables, or the lob length checks... -
Error in running a stored procedure....
I have a sp that was converted from mssql to pl/sql Oriacle 9i
It is basically supposed to find the current id and add one to it and output it..
the error message i get is System.Data.OracleClient.OracleException was unhandled by user code
Message="ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GETNEWCLIENTID_SP'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
Source="System.Data.OracleClient"
ErrorCode=-2146232008
Code=6550
the sp is
PROCEDURE "GETNEWCLIENTID_SP"
v_ClientID IN OUT INT,
cur_OUT IN OUT SYS_REFCURSOR
AS
BEGIN
SELECT MAX(Client_ID)) + 1 INTO v_ClientID
FROM ClientList;
OPEN cur_OUT FOR
SELECT NVL(GetNewClientID_sp.v_ClientID, 1) as NewClientID
FROM SYS.DUAL;
END;
Can someone help with this problem?
If I run the first part Select (max) then I get v_Clientid= (nothing)
but i thought that was the reason for the second part.ha.. thanks..
here is the issue..
allthe ms sql doesn't use the output paramter..
example:
CREATE PROCEDURE [dbo].[sp_f_DoesUserExist]
-- Add the parameters for the function here
@v_UserName NVARCHAR(50),
@v_ProfileID INT
AS
BEGIN
DECLARE @result BIT;
IF EXISTS (SELECT NULL FROM GroupUsers WHERE UserName=@v_UserName AND ProfileID = @v_ProfileID)
SET @result = 1
ELSE
SET @result = 0
IF EXISTS (SELECT NULL FROM ProfileAdmin WHERE UserName = @v_UserName)
SET @result = 1
SELECT @result AS DoesUserExist
END
But the oracle version uses an OUT parameter.
PROCEDURE "SP_F_DOESUSEREXIST" (
v_username IN NVARCHAR2 DEFAULT NULL,
v_profileid IN INTEGER DEFAULT NULL,
cur_OUT OUT sys_refcursor
AS
RESULT pls_integer;
v_temp PLS_INTEGER := 0;
BEGIN
BEGIN
SELECT 1
INTO v_temp
FROM DUAL
WHERE EXISTS (SELECT NULL
FROM groupusers
WHERE username = v_username AND profileid = v_profileid);
END;
IF v_temp = 1
THEN
RESULT := 1;
ELSE
RESULT := 0;
END IF;
BEGIN
SELECT 1
INTO v_temp
FROM DUAL
WHERE EXISTS (SELECT NULL
FROM profileadmin
WHERE username = v_username);
END;
IF v_temp = 1
THEN
RESULT := 1;
END IF;
OPEN cur_OUT FOR
SELECT RESULT doesuserexist
FROM DUAL;
END "SP_F_DOESUSEREXIST";
so the microsoft.data.application block tells me I don't have parameters correct.
I am so new to this oracle stuff, I am not sure how to get around this issue. -
Hello,
I'm trying to run a PLSQL script containing an ORACLE API but its failing on compilation with the message:
'PLS-00363: expression '<expression>' cannot be used as an assignment target'.
As far as I understand its connected to my IN-OUT parameters but I can't figure out which (I must admit I'm still hiking up a steep learning curve here and I've cut and pasted someone elses example and modified it).
I would be most grateful if one of you pro's could read through my code and advise..
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
error_msg varchar2(2000) := '';
l_status varchar2(10) := 'True';
l_validate_cnt number;
l_ass_count number;
l_business_group_id number := 0;
l_validate BOOLEAN DEFAULT FALSE;
l_city varchar2(30);
l_mode varchar2(20) := 'UPDATE';
l_sup_join_date date;
l_organization_id hr_organization_units.organization_id%type;
l_person_id per_all_people_f.person_id%type;
l_object_version_number per_all_assignments_f.object_version_number%type;
l_job_id per_jobs.job_id%type;
l_position_id per_positions.position_id%type;
l_location_id number := 233; -- number;
l_grade_id number := 3; -- per_grades.grade_id%type;
l_supervisor_id number := 2; -- per_all_assignments_f.supervisor_id%type;
l_assignment_status_type_id number;
l_pay_basis_id number := 33;
l_join_date date;
l_assignment_id per_all_assignments_f.assignment_id%type;
l_soft_coding_keyflex_id per_all_assignments_f.soft_coding_keyflex_id%type;
l_people_group_id per_all_assignments_f.people_group_id%type;
l_payroll_id per_all_assignments_f.payroll_id%type;
l_effective_start_date per_all_assignments_f.effective_start_date%type;
l_effective_end_date per_all_assignments_f.effective_end_date%type;
l_assignment_sequence per_all_assignments_f.assignment_sequence%type;
l_comment_id per_all_assignments_f.comment_id%type;
l_concatenated_segments varchar2(240);
l_group_name varchar2(100);
l_other_manager_warning boolean;
l_org_now_no_manager_warning boolean;
l_spp_delete_warning boolean;
l_entries_changed_warning varchar2(200);
l_tax_district_changed_warning boolean;
l_special_ceiling_step_id number;
l_no_managers_warning boolean;
l_other_manager_warnings boolean;
l_cagr_grade_def_id number;
l_cagr_concatenated_segments varchar2(100);
l_total_records number := 0;
l_success_records number := 0;
l_failure_records number := 0;
BEGIN
dbms_output.put_line('#############################################################');
dbms_output.put_line('Data Migration Of Employee Assignments :');
dbms_output.put_line('#############################################################');
dbms_output.put_line('Start Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
l_person_id := null;
l_object_version_number := null;
l_organization_id := 0;
l_location_id := null;
l_grade_id := null;
l_job_id := null;
l_position_id := null;
l_supervisor_id := null;
l_assignment_status_type_id := null;
error_msg := null;
l_status := 'True';
hr_assignment_api.update_emp_asg_criteria
p_validate => l_validate
,p_effective_date => sysdate --to_date('11-Jan-2009','DD-MON-YYYY')
,p_datetrack_update_mode => l_mode
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number +1
,p_organization_id => l_organization_id
,p_location_id => l_location_id --assignment_v.location_id
,p_grade_id => l_grade_id
,p_job_id => l_job_id
,p_position_id => l_position_id
,p_payroll_id => l_payroll_id --21--hardcoding this you should change this
-- ,p_segment1 => assignment_v.people_group
-- ,p_employment_category => assignment_v.employee_category
,p_pay_basis_id => l_pay_basis_id
,p_special_ceiling_step_id => l_special_ceiling_step_id
,p_people_group_id => l_people_group_id
,p_group_name => l_group_name
,p_org_now_no_manager_warning => l_org_now_no_manager_warning
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_other_manager_warning => l_other_manager_warning
,p_spp_delete_warning => l_spp_delete_warning
,p_entries_changed_warning => l_entries_changed_warning
,p_tax_district_changed_warning => l_tax_district_changed_warning
hr_assignment_api.update_emp_asg
p_validate => l_validate --false
,p_effective_date => to_date('11-Jan-2009','DD-MON-YYYY') --assignment_v.date_of_change
,p_datetrack_update_mode => 'CORRECTION'
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number
,p_supervisor_id => l_supervisor_id
,p_normal_hours => '7.5'
,p_frequency => 'D'
,p_time_normal_start => '09:30'
,p_time_normal_finish => '17:30'
,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id
,p_comment_id => l_comment_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_concatenated_segments => l_concatenated_segments
,p_no_managers_warning => l_no_managers_warning
,p_other_manager_warning => l_other_manager_warnings
,p_cagr_grade_def_id => l_cagr_grade_def_id
,p_cagr_concatenated_segments => l_cagr_concatenated_segments
dbms_output.put_line('End Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
dbms_output.put_line('
END;
commit;
exit;many thanks,
StevenThanks for the suggestions people. Here's the other API description requested:
PROCEDURE UPDATE_EMP_ASG
Argument Name Type In/Out Default?
P_VALIDATE BOOLEAN IN DEFAULT
P_EFFECTIVE_DATE DATE IN
P_DATETRACK_UPDATE_MODE VARCHAR2 IN
P_ASSIGNMENT_ID NUMBER IN
P_OBJECT_VERSION_NUMBER NUMBER IN/OUT
P_SUPERVISOR_ID NUMBER IN DEFAULT
P_ASSIGNMENT_NUMBER VARCHAR2 IN DEFAULT
P_CHANGE_REASON VARCHAR2 IN DEFAULT
P_ASSIGNMENT_STATUS_TYPE_ID NUMBER IN DEFAULT
P_COMMENTS VARCHAR2 IN DEFAULT
P_DATE_PROBATION_END DATE IN DEFAULT
P_DEFAULT_CODE_COMB_ID NUMBER IN DEFAULT
P_FREQUENCY VARCHAR2 IN DEFAULT
P_INTERNAL_ADDRESS_LINE VARCHAR2 IN DEFAULT
P_MANAGER_FLAG VARCHAR2 IN DEFAULT
P_NORMAL_HOURS NUMBER IN DEFAULT
P_PERF_REVIEW_PERIOD NUMBER IN DEFAULT
P_PERF_REVIEW_PERIOD_FREQUENCY VARCHAR2 IN DEFAULT
P_PROBATION_PERIOD NUMBER IN DEFAULT
P_PROBATION_UNIT VARCHAR2 IN DEFAULT
P_SAL_REVIEW_PERIOD NUMBER IN DEFAULT
P_SAL_REVIEW_PERIOD_FREQUENCY VARCHAR2 IN DEFAULT
P_SET_OF_BOOKS_ID NUMBER IN DEFAULT
P_SOURCE_TYPE VARCHAR2 IN DEFAULT
P_TIME_NORMAL_FINISH VARCHAR2 IN DEFAULT
P_TIME_NORMAL_START VARCHAR2 IN DEFAULT
P_BARGAINING_UNIT_CODE VARCHAR2 IN DEFAULT
P_LABOUR_UNION_MEMBER_FLAG VARCHAR2 IN DEFAULT
P_HOURLY_SALARIED_CODE VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE_CATEGORY VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE1 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE2 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE3 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE4 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE5 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE6 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE7 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE8 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE9 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE10 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE11 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE12 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE13 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE14 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE15 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE16 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE17 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE18 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE19 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE20 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE21 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE22 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE23 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE24 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE25 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE26 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE27 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE28 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE29 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE30 VARCHAR2 IN DEFAULT
P_TITLE VARCHAR2 IN DEFAULT
P_SEGMENT1 VARCHAR2 IN DEFAULT
P_SEGMENT2 VARCHAR2 IN DEFAULT
P_SEGMENT3 VARCHAR2 IN DEFAULT
P_SEGMENT4 VARCHAR2 IN DEFAULT
P_SEGMENT5 VARCHAR2 IN DEFAULT
P_SEGMENT6 VARCHAR2 IN DEFAULT
P_SEGMENT7 VARCHAR2 IN DEFAULT
P_SEGMENT8 VARCHAR2 IN DEFAULT
P_SEGMENT9 VARCHAR2 IN DEFAULT
P_SEGMENT10 VARCHAR2 IN DEFAULT
P_SEGMENT11 VARCHAR2 IN DEFAULT
P_SEGMENT12 VARCHAR2 IN DEFAULT
P_SEGMENT13 VARCHAR2 IN DEFAULT
P_SEGMENT14 VARCHAR2 IN DEFAULT
P_SEGMENT15 VARCHAR2 IN DEFAULT
P_SEGMENT16 VARCHAR2 IN DEFAULT
P_SEGMENT17 VARCHAR2 IN DEFAULT
P_SEGMENT18 VARCHAR2 IN DEFAULT
P_SEGMENT19 VARCHAR2 IN DEFAULT
P_SEGMENT20 VARCHAR2 IN DEFAULT
P_SEGMENT21 VARCHAR2 IN DEFAULT
P_SEGMENT22 VARCHAR2 IN DEFAULT
P_SEGMENT23 VARCHAR2 IN DEFAULT
P_SEGMENT24 VARCHAR2 IN DEFAULT
P_SEGMENT25 VARCHAR2 IN DEFAULT
P_SEGMENT26 VARCHAR2 IN DEFAULT
P_SEGMENT27 VARCHAR2 IN DEFAULT
P_SEGMENT28 VARCHAR2 IN DEFAULT
P_SEGMENT29 VARCHAR2 IN DEFAULT
P_SEGMENT30 VARCHAR2 IN DEFAULT
P_CONCAT_SEGMENTS VARCHAR2 IN DEFAULT
P_CONTRACT_ID NUMBER IN DEFAULT
P_ESTABLISHMENT_ID NUMBER IN DEFAULT
P_COLLECTIVE_AGREEMENT_ID NUMBER IN DEFAULT
P_CAGR_ID_FLEX_NUM NUMBER IN DEFAULT
P_CAG_SEGMENT1 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT2 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT3 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT4 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT5 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT6 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT7 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT8 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT9 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT10 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT11 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT12 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT13 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT14 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT15 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT16 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT17 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT18 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT19 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT20 VARCHAR2 IN DEFAULT
P_NOTICE_PERIOD NUMBER IN DEFAULT
P_NOTICE_PERIOD_UOM VARCHAR2 IN DEFAULT
P_EMPLOYEE_CATEGORY VARCHAR2 IN DEFAULT
P_WORK_AT_HOME VARCHAR2 IN DEFAULT
P_JOB_POST_SOURCE_NAME VARCHAR2 IN DEFAULT
P_SUPERVISOR_ASSIGNMENT_ID NUMBER IN DEFAULT
P_CAGR_GRADE_DEF_ID NUMBER IN/OUT
P_CAGR_CONCATENATED_SEGMENTS VARCHAR2 OUT
P_CONCATENATED_SEGMENTS VARCHAR2 OUT
P_SOFT_CODING_KEYFLEX_ID NUMBER IN/OUT
P_COMMENT_ID NUMBER OUT
P_EFFECTIVE_START_DATE DATE OUT
P_EFFECTIVE_END_DATE DATE OUT
P_NO_MANAGERS_WARNING BOOLEAN OUT
P_OTHER_MANAGER_WARNING BOOLEAN OUT
P_HOURLY_SALARIED_WARNING BOOLEAN OUT
P_GSP_POST_PROCESS_WARNING VARCHAR2 OUT On looking on the web I've found that my latest error message - ORA-20001: The primary key specified is invalid
Cause: The primary key values specified are invalid and do not exist in
the schema.
Action: Check the primary key values... - relates to incorrect combination of person_id,object_version_number,effective_start_date and effective_end_date - all of which seem OK to me - her's my latest version of my code.. Many thanks again.
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
error_msg varchar2(2000);
l_status varchar2(10);
l_validate_cnt number;
l_ass_count number;
l_validate BOOLEAN DEFAULT FALSE;
l_city varchar2(30);
l_mode varchar2(20) := 'UPDATE';
l_organization_id number;
l_effective_date date := '12-FEB-09';
l_person_id number := '29987';
l_object_version_number number := '3';
l_effective_start_date date := '12-FEB-09';
l_effective_end_date date := '12-FEB-56';
l_job_id per_jobs.job_id%type;
l_position_id per_positions.position_id%type;
l_location_id number;
l_grade_id number;
l_supervisor_id number;
l_assignment_status_type_id number;
l_pay_basis_id number;
l_join_date date;
l_soft_coding_keyflex_id number;
l_people_group_id per_all_assignments_f.people_group_id%type;
l_payroll_id per_all_assignments_f.payroll_id%type;
l_assignment_sequence per_all_assignments_f.assignment_sequence%type;
l_comment_id per_all_assignments_f.comment_id%type;
l_normal_end varchar2(15) := '17:30';
l_normal_start varchar2(15) := '09:30';
l_frequency varchar2(10) := 'D';
l_normal_hours varchar2(25) := '7.5';
l_assignment_id number := '29884';
l_gsp_post_process_warning varchar2(30);
l_entries_changed varchar2(30);
l_old_obj_ver_number per_addresses.OBJECT_VERSION_NUMBER%type;
l_segment1 varchar2(25);
l_segment2 varchar2(25);
l_segment3 varchar2(25);
l_concatenated_segments varchar2(240);
l_group_name varchar2(100);
l_other_manager_warning boolean;
l_org_now_no_manager_warning boolean;
l_spp_delete_warning boolean;
l_entries_changed_warning varchar2(200);
l_tax_district_changed_warning boolean;
l_special_ceiling_step_id number;
l_no_managers_warning boolean;
l_other_manager_warnings boolean;
l_cagr_grade_def_id number;
l_cagr_concatenated_segments varchar2(100);
l_datetrack_update_mod varchar2(10);
l_total_records number := 0;
l_success_records number := 0;
l_failure_records number := 0;
BEGIN
dbms_output.put_line('#############################################################');
dbms_output.put_line('Data Migration Of Employee Assignments :');
dbms_output.put_line('#############################################################');
dbms_output.put_line('Start Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
l_person_id := null;
l_object_version_number := null;
l_organization_id := null;
l_location_id := null;
l_grade_id := null;
l_job_id := null;
l_position_id := null;
l_supervisor_id := null;
l_assignment_status_type_id := null;
error_msg := null;
l_status := 'True';
hr_assignment_api.update_emp_asg_criteria (
p_effective_date => l_effective_date ,p_datetrack_update_mode => l_datetrack_update_mod ,p_assignment_id => l_assignment_id ,p_called_from_mass_update => NULL ,p_grade_id => l_grade_id ,p_position_id => l_position_id ,p_job_id => l_job_id ,p_payroll_id => l_payroll_id ,p_location_id => l_location_id ,p_organization_id => l_organization_id ,p_pay_basis_id => l_pay_basis_id
,p_segment1 => l_segment1
,p_segment2 => l_segment2
,p_segment3 => l_segment3 ,p_employment_category => NULL ,p_concat_segments => NULL ,p_contract_id => NULL ,p_establishment_id => NULL ,p_scl_segment1 => NULL ,p_grade_ladder_pgm_id => NULL ,p_supervisor_assignment_id => NULL ,p_object_version_number => l_old_obj_ver_number ,p_special_ceiling_step_id => l_special_ceiling_step_id ,p_people_group_id => l_people_group_id ,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id ,p_group_name => l_group_name ,p_effective_start_date => l_effective_start_date ,p_effective_end_date => l_effective_end_date ,p_org_now_no_manager_warning => l_org_now_no_manager_warning ,p_other_manager_warning => l_other_manager_warning ,p_spp_delete_warning => l_spp_delete_warning ,p_entries_changed_warning => l_entries_changed ,p_tax_district_changed_warning => l_tax_district_changed_warning ,p_concatenated_segments => l_concatenated_segments ,p_gsp_post_process_warning => l_gsp_post_process_warning);
hr_assignment_api.update_emp_asg
p_validate => l_validate
,p_effective_date => l_effective_date
,p_datetrack_update_mode => l_datetrack_update_mod --'CORRECTION'
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number
,p_supervisor_id => l_supervisor_id
,p_normal_hours => l_normal_hours --'7.5'
,p_frequency => l_frequency --'D'
,p_time_normal_start => l_normal_start --'09:30'
,p_time_normal_finish => l_normal_end --'17:30'
,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id
,p_comment_id => l_comment_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_concatenated_segments => l_concatenated_segments
,p_no_managers_warning => l_no_managers_warning
,p_other_manager_warning => l_other_manager_warnings
,p_cagr_grade_def_id => l_cagr_grade_def_id
,p_cagr_concatenated_segments => l_cagr_concatenated_segments
dbms_output.put_line('End Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
dbms_output.put_line('
END;
commit;
exit; -
ORA-01005 error when running app on standalone server
Hello All:
When I run an application on stand alone weblogic 10.3 server, I am getting error:
ORA-01005: null password given; logon denied.
In IDE it is running well and password field is filled checkboxes Save Password, Deploy Password checked in Database Connection.
Thanks,
SNikiforovTry searching the forum for ORA-01005...
Maybe you are looking for
-
Every time I used to open a new tab it comes as top site. Now not anymore , instead it open in a website called Only Search, I went to safari preferences and made all changes but after I quit Safari and open again all changes are gone. I can not chan
-
File 2 Proxy Sync - BPM - Mapping
Hi Guys, I am doing file 2 proxy sync interface. I am getting 2 files from 2 locations. First file contains group of records and second file contains the total records in the file 1. File 1: File :1 GroupNo InvoiceNo InvoiceDate InvoiceAmoun
-
What causes choppy streaming video?
I have a problem with playing streaming video on my powerbook. The video is choppy but the sound is fine. What exactly causes that? I have a 6 Mbps DSL connection at the house, so I figured it was something internal with the Powerbook. Would this be
-
I Bought the new iPhone 6 around the middle of October and around the middle of December the microphone stopped working. I even tried using the earbuds with the mic on them for hands free service but that doesn't work either. It actually makes it wor
-
Not able to update pixelator. Purchases show "an error has occurred" repeatedly
I am having problems in updating Pixelator which I purchased from App Store. When I click update I am informed that it can not be down loaded go to Purchases. When I do that I get the message that an error has ocurred. What do I do?