Warnings in stored procedure
i am new to oracle i am writing a stored procedure of about 1600 lines when i compiled the stored procedure
it is giving me warnings AND not any error and got compiled successfully which i write below
warnings
Warning(6,2): PLW-07203: parameter 'P_RN' may benefit from use of the NOCOPY compiler hint
Warning(168,72): PLW-07204: conversion away from column type may result in sub-optimal query plan
Warning(169,48): PLW-07204: conversion away from column type may result in sub-optimal query plan
Warning(1,1): Only first 20 issues are reported -- coming at last
and when check the status of the stored procedure by running the below query
informing that object is INVALID
select status from all_objects where object_name='USP_GENERATERUNNINGNUMBER';
and as far as i know that if warnings come and no error then it means procedure has been
compiled successfully and becomes VALID
please help me somebody
thanks for your reply but its status is coming INVALID this i am not understanding when the procedure has been compiled its status should become valid and this also giving me this message
Warning(1,1): Only first 20 issues are reported
what i am thinking that after 20 warnings there may be a error which it is not showing
please guide me in this aspect
Similar Messages
-
Calling Stored Procedure for Multiple records
Hi,
I have an use case where I have more than 2000 item and for every item I need to fetch around 70 more values as out parameters. Also i need to show all thoes values on UI.
So calling SP in loop is a problem as I can see the rendering the values and it's very slow.
Can anyone suggest better way to handle this case?
-AjitHi...
I don't know about the function you have written but...
Procedure will be created like following
Take an example: i want to create a procedure to take only first letter from the city of City column.
For this...
1). Create a physical table manually under the schema folder.
2). Give the name and select Table Type as "Stored Proc".
3). In "Default Initialization String" field, you should write the query saying "select substr(city,1,1) as Col1 from Regions". In query Col1 is the alias name i have given for the new column. (Click OK)
4). So, now this column should be part of the table newly created. So create a physical column under this newly created table with "Col1" name.
5). Double-click the column and specify the data type of that particular column. (This should be done otherwise you can't move it to BMM layer)
6). Now you can add this table to BMM layer by performing necessary joins w/o any errors or warnings. (This would be depending on your business requirement, for this some times you need to add keys also to the procedure to perform the joins and all)
7). By adding it to the presentation layer, in answers you can watch the results..
NOTE:
1). While writing the function names in Stored procedures, DB you are using is important. Because, functions will vary between the DB's.
2). Column name of newly created should match with the name you specified in the procedure as alias.
3). If you are retrieving 'n' no. of columns from the procedure then you need to create 'n' no. of columns manually.
4). For physical columns created manually, you need to specify the data type according to the type of data it's retrieving.
It may helpful to you in achieving your requirement. If not sorry... but i am sure it's helpful to you...
mark as helpful if it's helpful else mark as correct if correct ;)
Thanks & Regards
Kishore Guggilla -
Applying an XSLT against results from XSU in Java Stored Procedure
Is there an easy way to have a Java Stored Procedure apply an XSLT against the results of an OracleXMLQuery? The only examples I can find are with regular Java code outside the database.
I'm running 9.2.0.2 on Windows 2000 Server.This is what I use:
(I have table called params where I have stored encodinf, XSL, and stuff like that)
DOMParser parser;
XMLDocument xml, xsldoc, outXML;
URL xslURL;
URL xmlURL;
Connection conn = getConnection();
Statement stmt = conn.createStatement();
ResultSet rset= stmt.executeQuery("select xsl_varchar2,encoding,version,host,port,host_path,usrnm,passwrd from params");
rset.next();
String strXSL=rset.getString(1); //This is XSL transformation
String strEncoding=rset.getString(2);
String strVersion=rset.getString(3);
rset.close();
stmt.close();
parser = new DOMParser();
parser.setPreserveWhitespace(true);
StringReader rXSL= new StringReader(strXSL);
xslURL=createURL("test");
parser.parse(rXSL);
xsldoc=parser.getDocument();
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from somewhere");
xml=(XMLDocument) qry.getXMLDOM();
// instantiate a stylesheet
XSLStylesheet xsl = new XSLStylesheet(xsldoc, xslURL);
XSLProcessor processor = new XSLProcessor();
// display any warnings that may occur
processor.showWarnings(true);
processor.setErrorStream(System.err);
// Process XSL
DocumentFragment result = processor.processXSL(xsl, xml);
// create an output document to hold the result
outXML = new XMLDocument();
outXML.setVersion(strVersion);
outXML.setEncoding(strEncoding);
outXML.appendChild(result);
outXML is your XML. -
Hi, i am creating my first stored procedure and really need some help...i have managed to put together the following:
CREATE OR REPLACE PROCEDURE DRL_PROCEDURE(var_SOURCE_OBJECTID IN varchar2, var_NEW_OBJECTID OUT varchar2)
IS
var_temp_newobjectid varchar2(20);
BEGIN
SELECT MAX(NEW_OBJECTID)
INTO var_temp_newobjectid
FROM DRL_CONVERSION
WHERE SOURCE_OBJECTID = var_SOURCE_OBJECTID;
var_NEW_OBJECTID := var_temp_newobjectid;
return;
END;
I'm not sure if this is correct however, i've tried executing it with the following but when it does execute no results show...it just says procedure successfully completed:
VARIABLE RETVAL VARCHAR2(20)
EXEC DRL_PROCEDURE('ab',:RETVAL);
Do i need to change it somehow to make it show the result?
Also if you know how i can call the procedure in C# and show the result that way that would be equally helpful...thanksHi and welcome to the forums!
The last step you forgot was to PRINT your result. See the example below:
SQL> CREATE OR REPLACE PROCEDURE TEST_PROC
2 (
3 pOwner IN VARCHAR2
4 , pCnt OUT VARCHAR2
5 )
6 AS
7 BEGIN
8 SELECT COUNT(*) INTO pCnt
9 FROM ALL_OBJECTS
10 WHERE OWNER = pOwner;
11 END;
12 /
SP2-0804: Procedure created with compilation warnings
SQL> VAR result NUMBER;
SQL> EXECUTE TEST_PROC(USER,:result);
PL/SQL procedure successfully completed.
SQL> PRINT result
RESULT
7090Additionally, you don't need the variable VAR_TEMP_NEWOBJECTID. You can SELECT ... INTO VAR_NEW_OBJECTID instead.
HTH! -
Could not execute stored procedure
hello,
I have a stored procedure in oracle and I want to call it from a java bean. The stored procedure works when I did an "EXEC change_info()" call.
However, when I tried it in the Java Bean using:
CallableStatement stmt = conn1.prepareCall("{call change_info(?,?,?,?,?)}");
or
CallableStatement stmt = conn1.prepareCall("BEGIN change_info(?,?,?,?,?); END;");
stmt.execute();
The stored procedure doesn't work any more, i.e., it doesn't change the information. There are no errors or warnings indicating that there was any problems with the stored procedure.
Does anyone have any idea what I can do to make the stored procedure work?
Thanks for your helpsorry, I missed out a section of my code from the original post:
CallableStatement stmt = conn1.prepareCall("{call change_info(?,?,?,?,?)}");
or
CallableStatement stmt = conn1.prepareCall("BEGIN change_info(?,?,?,?,?); END;");
stmt.setString(1, 'id001938');
stmt.setString(2, 'namename');
stmt.setString(3, '1');
stmt.setString(4, '15');
stmt.setString(5, 'id002837');
stmt.execute();
thanks -
DBI - ORA-04065: stored procedure "APPS.HRI_BPL_CONC_ADMIN
Hi!
When I tried to process DBI request, I hava the next error:
ORA-04065: no se ha ejecutado porque se ha modificado o borrado
ORA-04065: stored procedure "APPS.HRI_BPL_CONC_ADMIN" no se ha ejecutado porque se ha modificado o borrado
ORA-06508: PL/SQL: no se ha encontrado la unidad de programa llamada : "APPS.HRI_BPL_CONC_ADMIN"
ORA-04065: no se ha ejecutado porque se ha modificado o borrado
ORA-04065: stored procedure "APPS.HRI_BPL_CONC_ADMIN" no se ha ejecutado porque se ha modificado o borrado
ORA-06508: PL/SQL: no se ha encontrado la unidad de programa llamada : "APPS.HRI_BP
+---------------------------------------------------------------------------+
Inicio de mensajes de registro desde FND_FILE
+---------------------------------------------------------------------------+
ORA-04065: no se ha ejecutado porque se ha modificado o borrado
ORA-04065: stored procedure "APPS.HRI_BPL_CONC_ADMIN" no se ha ejecutado porque se ha modificado o borrado
ORA-06508: PL/SQL: no se ha encontrado la unidad de programa llamada : "APPS.HRI_BPL_CONC_ADMIN"
I followed the note:
ORA-06508: PL/SQL: Could not Find Program Unit Being Called: "APPS.HRI_BPL_CONC_ADMIN" Error on HRI Incremental Event Capture Process [ID 1069280.1] but this finished Completed with warnings
INFO:1) OUI-67078:Interim patch 9010222 is a superset of the patch(es) [ 9010222 ] in OH /u02/CLON/db/tech_st/11.1.0
INFO:--------------------------------------------------------------------------------
SEVERE:OUI-67204:OPatch Session completed with warnings.
I reviewed the objects invalid and the db does not have APPS.HRI_BPL_CONC_ADMIN object invalid.
The database version is 11.0.7.0 and the plataform is i686.
Can you help me?
ThanksACTION PLAN
===========
a) Invalidate all the objects by running utlirp.sql
b) Recompile all the objects using utlrp.sql
c) Retest the issue
d) Just in case the issue persists, please upload the output of the following query in an excel format. Ensure column headings are visible -
select owner, object_type, object_name
from dba_objects
where status = 'INVALID' -
Get variable values from a stored procedure
I am using SQL 2008R2 and I want to replace a view inside a stored procedure with a new stored procedure to return multiple variable values. Currently I am using the code below to get values for 4 different variables. I would rather get the 4 variables
from a stored procedure (which returns all of these 4 values and more) but not sure how to do so. Below is the code for getting the 4 variable values in my current sp.
DECLARE @TotalCarb real;
DECLARE @TotalPro real;
DECLARE @TotalFat real;
DECLARE @TotalLiquid real;
SELECT @TotalCarb = ISNULL(TotCarb,0),
@TotalPro = ISNULL(TotPro,0),
@TotalFat = ISNULL(TotFat,0),
@TotalLiquid = ISNULL(TotLiq,0)
FROM dbo.vw_ActualFoodTotals
WHERE (MealID = @MealID);You can replace the view with inline table valued user-defined function:
http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
See example: SQL create INLINE table-valued function like a parametrized view
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Pointbase : How can I create a stored procedure with Pointbase database?
Hello,
Excuse me for my english, I'm not anglophone. I try to create a stored procedure.
This is my file SampleExternalMethods.java :
import java.sql.*; //import com.pointbase.jdbc.jdbcInOutDoubleWrapper; public class SampleExternalMethods { // A connection object to allow database callback static Connection conn = null; static Statement l_stmt; static Statement m_stmt; static CallableStatement m_callStmt = null; static ResultSet l_rs = null; public static void main(String[] args) { try { String url = "jdbc:pointbase:server://localhost/pointbaseDB"; String username = "PBPUBLIC"; String password = "PBPUBLIC"; conn = DriverManager.getConnection(url, username, password); doCreateProcedure(); doInvokeProcedure(); } catch (SQLException e) { e.printStackTrace(); } finally { if (m_stmt != null) { try { m_stmt.close(); } catch (Exception e) { e.printStackTrace(); } } if (m_callStmt != null) { try { m_callStmt.close(); } catch (Exception e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (Exception e) { e.printStackTrace(); } } } } public static void getCountry(String Iso_Code) { try { // Query the database for the country iso code l_stmt = conn.createStatement(); l_rs = l_stmt.executeQuery( "SELECT * FROM countries" + " WHERE country_iso_code ='" + Iso_Code + "'"); //Affichage du résultat de la requête l_rs.next(); System.out.print(l_rs.getString(1) + " - "); System.out.print(l_rs.getString(2) + " - "); System.out.println(l_rs.getString(3)); // Close the result set l_rs.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (l_rs != null) { try { l_rs.close(); } catch (Exception e) { e.printStackTrace(); } } if (l_stmt != null) { try { l_stmt.close(); } catch (Exception e) { e.printStackTrace(); } } } } public static void doCreateProcedure() throws SQLException { // SQL statement to create a stored procedure String SQL_CREATE_PROC = "CREATE PROCEDURE getCountry(IN P1 VARCHAR(30))" + " LANGUAGE JAVA" + " SPECIFIC getCountry" + " NO SQL" + " EXTERNAL NAME \"SampleExternalMethods::getCountry\"" + " PARAMETER STYLE SQL"; // Create a SQL statement m_stmt = conn.createStatement(); // Execute the SQL m_stmt.executeUpdate(SQL_CREATE_PROC); // Close the statement //m_stmt.close(); } public static void doInvokeProcedure() throws SQLException { // Create SQL to invoke stored procedures String SQL_USE_PROC = "{ call getCountry(?) }"; // Create a callable statement with three binding parameters m_callStmt = conn.prepareCall(SQL_USE_PROC); m_callStmt.setString(1, "CA"); m_callStmt.executeQuery(); // Close the callable statement //m_callStmt.close(); } }
Afterwards, I have read this note in a Pointbase document:
To invoke the dateConvert external Java method from a stored function, you must use the
CREATE FUNCTION statement. The dateConvert external Java method is called from the
class, SampleExternalMethods.
In order for the database to access this external Java method, the class SampleExternalMethods
must be included in the database CLASSPATH. For PointBase Embedded - Server Option, it
must be in the Server CLASSPATH, but not in the Client CLASSPATH.
If PointBase Server is run with the Java Security Manager, in the java policy file grant
’com.pointbase.sp.spPermission’ to the class that implements the external Java method.
An "spPermission" consists of a class name with no action. The class name is a name of a class
that could be used in creating a Stored Procedure in PointBase. The naming convention follows
the hierarchical property naming convention and that is supported by
"java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded
by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
contain any white spaces.
I'm not sure, but I suppose that I must include the class SampleExternalMethods in a .jar file.
The database CLASSPATH could be : C:\Sun\AppServer\pointbase\lib\
These my files in this database CLASSPATH:
pbclient.jar
pbembedded.jar
pbtools.jar
pbupgrade.jar
I have tryed to include the class SampleExternalMethods in pbclient.jar and pbembedded.jar with this command:
jar -uf pbembedded.jar SampleExternalMethods
Afterwards I do that,
1) Start Pointbase
2) Configuration of classpath
set classpath=C:\Sun\AppServer\pointbase\lib\pbclient.jar
set classpath=%classpath%;D:\J2EE\Ch07Code\Ch07_06
I precise that my file SampleExternalMethods is into D:\J2EE\Ch07Code\Ch07_06\Ch07.
Then, I run the program:
D:\J2EE\Ch07Code\Ch07_06>java -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver Ch07.SampleExternalMethods
But I have an error message:
Exception in thread "main" java.lang.NoClassDefFoundError: Ch07.SampleExternalMethods (wrong name: SampleExternalMethods)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.DefineClass(ClassLoader.java:539)
The problem, I suppose, comes from that the class SampleExternalMethods
must be included in the database CLASSPATH, but there is a pbserver.jar with pointbase normally, but I didn't find it. That's why I use pbembedded.jar or pbclient.jar in order to include the class SampleExternalMethods. May be I must start from C:\Sun\AppServer\pointbase\lib\ instead of D:\J2EE\Ch07Code\Ch07_06\Ch07?
Please, can somebody helps me?
Thank you in advance.
cagou!jschell wrote:
And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
>And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
>
And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
Thank you for your response, I have done two classes:
SampleExternalMethods.java:
package Ch07;
import java.sql.*;*
*public class SampleExternalMethods*
*public static void getCountry(String Iso_Code)*
*// A connection object to allow database callback*
*Connection l_conn = null;*
*Statement l_stmt = null;*
*ResultSet l_rs = null;*
*try*
*String url = "jdbc:pointbase:server://localhost/pointbaseDB";*
*String username = "PBPUBLIC";*
*String password = "PBPUBLIC";*
*l_conn = DriverManager.getConnection(url, username, password);*
*// Query the database for the country iso code*
*l_stmt = l_conn.createStatement();*
*l_rs = l_stmt.executeQuery( "SELECT* FROM PBPUBLIC.COUNTRIES"
+" WHERE country_iso_code ='"+ Iso_Code +"'");+
+//Affichage du résultat de la requête+
+l_rs.next();+
+System.out.print(l_rs.getString(1)+ " - ");
System.out.print(l_rs.getString(2) +" - ");+
+System.out.println(l_rs.getString(3));+
+// Close the result set+
+l_rs.close();+
+} catch (SQLException e) {+
+e.printStackTrace();+
+} finally {+
+if (l_rs != null) {+
+try {+
+l_rs.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (l_stmt != null) {+
+try {+
+l_stmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (l_conn != null) {+
+try {+
+l_conn.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+}+
+}+
+}+
CreateMethods.java:
+package Ch07;+
+import java.sql.*;+
+public class CreateMethods+
+{+
+// A connection object to allow database callback+
+static Connection m_conn = null;+
+static Statement m_stmt;+
+static CallableStatement m_callStmt = null;+
+public static void main(String[] args)+
+{+
+try+
+{+
+String url = "jdbc:pointbase:server://localhost/pointbaseDB";+
+String username = "PBPUBLIC";+
+String password = "PBPUBLIC";+
+m_conn = DriverManager.getConnection(url, username, password);+
+doCreateProcedure();+
+doInvokeProcedure();+
+} catch (SQLException e) {+
+e.printStackTrace();+
+} finally {+
+if (m_stmt != null) {+
+try {+
+m_stmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (m_callStmt != null) {+
+try {+
+m_callStmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (m_conn != null) {+
+try {+
+m_conn.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+}+
+}+
+public static void doCreateProcedure() throws SQLException {+
+// SQL statement to create a stored procedure+
+String SQL_CREATE_PROC = "CREATE PROCEDURE PBPUBLIC.getCountry(IN P1 VARCHAR(30))"+
" LANGUAGE JAVA"
+" SPECIFIC getCountry"+
" NO SQL"
+" EXTERNAL NAME \"SampleExternalMethods::getCountry\""+
" PARAMETER STYLE SQL";
// Create a SQL statement
m_stmt = m_conn.createStatement();
// Execute the SQL
m_stmt.executeUpdate(SQL_CREATE_PROC);
// Close the statement
//m_stmt.close();
public static void doInvokeProcedure() throws SQLException {
// Create SQL to invoke stored procedures
String SQL_USE_PROC = "{ call getCountry(?) }";
// Create a callable statement with three binding parameters
m_callStmt = m_conn.prepareCall(SQL_USE_PROC);
m_callStmt.setString(2, "CA");
m_callStmt.executeQuery();
// Close the callable statement
//m_callStmt.close();
}But I have the same error message that previously.
I have read this note and I suppose that the problem is linked:
If PointBase Server is run with the Java Security Manager, in the java policy file grant
*com.pointbase.sp.spPermission to the class that implements the external Java method.*
An "spPermission" consists of a class name with no action. The class name is a name of a class
that could be used in creating a Stored Procedure in PointBase. The naming convention follows
the hierarchical property naming convention and that is supported by
*"java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded*
by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
contain any white spaces.
Can you explain me what I must to do in order to solve this problem of spPermission.
Thanks. -
How to view the returned data from a stored procedure in TOAD?
Hi,
I created ref cursor in the stored procedure to return data. The stored procedure works fine, just want to view the result in TOAD. The BEGIN... EXEC... END can execute the stored procedure, but how to make the result display?
Thanks!Right click the editor and choose
"Prompt For Substitution Variables".
Run for example the following code:
DECLARE
PROCEDURE p (cur OUT sys_refcursor)
AS
BEGIN
OPEN cur FOR
SELECT *
FROM DUAL;
END p;
BEGIN
p (:cur);
END;
The result will display in Toad's Data Grid!
Regards Michael -
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 -
Error while deploying a Java Stored Procedure using JDeveloper
Hi,
I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm)
One of the items in this article is - "Creating and Deploying a Java Stored Procedure"
I was able to create a java class, compile it. Created a deployment profile. created a pl/sql wrapper. While trying to deploy the java stored procedure, I am getting the following error:
Invoking loadjava on connection 'hr_conn' with arguments:
-order -resolve -thin
errors : class package1/mypackage/JavaStoredProc
ORA-29521: referenced name java/lang/StringBuilder could not be found
The following operations failed
class package1/mypackage/JavaStoredProc: resolution
oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:474)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:361)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:285)
at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
#### Deployment incomplete. #### Oct 27, 2005 1:38:56 PM
Appreciate your help on this..I am using Jdeveloper 10.1.3 Early Access Version. JDK comes with it. I also have another JDK on my machine (JDK1.4.2_09)
-
Error while executing a stored procedure from forms6i
When I execute a STORED PROCEDURE from ORACLE DB 10g this procedure works perfectly fine.
But when I execute the same from the FORMs 6i I get the following error:
PDE-PLU022 Don't have access to the stored program unit
XMLPARSERCOVER in schema CARE.
where XMLPARSERCOVER is the class and
CARE is the schema.
Regards,
Jignesh SI have tried this with both the owner of the schema and the intended user, -from both forms and directly.
All rights was granted on the stored procedure. Since posting I have found that one of the tables that the procedure might insert into, was not explicitly granted to the intended user, and after rectifying that the error message went away.
-however, the procedure now silently "finishes" without any evidence that it ever ran, if invoked from the forms application. When invoked from SQL Plus (or JDev, or Toad) it runs as expected.
I have no public synonym for the procedure, -is that necessary?
The stored procedure in question is implemented in java, and published as a stored procedure. It does rather heavy lifting, when running, using a view against another server , updating local tables and quite a lot of data validation/cleansing, and logging. All recourses are within the same schema.
Any ideas? -
Error while calling a stored procedure using SQLJ
I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, thereby enabling us to create a cursor.
When I give a hard-coded value as a parameter, I get an error stating that the assignment is not correct as the query is expecting a variable and not a literal. Hence I removed the hard-coded value and included a dymanic value in the SQLJ call.
String strVal = "A";
#sql{CALL ASSIGNMENTS_PKG.INSERT_ROW :{strVal},'SALARY_CODE_GROUP','BU',3,105,sysdate,1,sysdate,1,1)};
Here "ASSIGNMENTS_PKG" is a package name and INSERT_ROW is the procedure.
When the SQLJ program is run, I get an error stating:
"PLS-00201: identifier 'A' must be declared"
I read the error message, but I am not able to understand where I need to give the GRANT permission to.If you're using Oracle Provider for OLE DB (OraOLEDB) to execute this stored procedure, you need to set PLSQLRSet attribute. This attribute can be set in registry, connection string, or command object. Please refer to User Documentation for more information.
-
ORA-03111 - JCA Binding error while invoking a stored procedure in DB
Hi,
We are facing this problem for one interface alone.
Need expert advice to fix this problem..
This is scheduled to run once in a day and fails daily for past 2 weeks..
We receive below error as response..
Same interface worked fine for past 1 yr..
Also it works fine if we reprocess the batch in next day morning...
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-03111: break received on communication channel ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
AND
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-01013: user requested cancel of current operation ORA-06512: at "IRSOA.XXIR_AR_SOA_CUSTOMER_INVOICE", line 213 ORA-06512: at line 1 ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution
Thanks,
SundaramLooks like the SQL might be taking a longer time to execute and might be timing out.
Please refer the following:
Re: ORA-01013: user requested cancel of current operation
http://www.dba-oracle.com/t_ora_01013_user_requested_cancel_of_current_operation.htm
Additionally, ORA-06512 indicates that there is a mismatch of the with the data length that is being processed. Refer http://www.techonthenet.com/oracle/errors/ora06512.php
Hope this helps.
Thanks,
Patrick -
I am getting ORA-01403: no data found error while calling a stored procedur
Hi, I have a stored procedure. When I execute it from Toad it is successfull.
But when I call that from my java function it gives me ORA-01403: no data found error -
My code is like this -
SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
IF L_N_CNT >0 THEN
DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
RETURN;
ELSE
DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
INSERT INTO TLSI_SI_MAST
( CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
VALUES( R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN, R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
END IF;Hi,
I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
Regards, Gerwin
Maybe you are looking for
-
Won't reboot from install disk
i can't boot from a bootable disk (my install disk or norton). i'll hold down the c button just like i've always been able to do before, but it goes straight to the login page, instead of starting up from the disk. if i try and go into account settin
-
Scheduled Maintenance basic start and finish date
Hi Expert, I'm using WO type say PM04 for schedule maintenance. In its maintenance plan i'm using prioity "medium" that starts form 7 - 14 days.I also have already set the scheduling type in OPU7 - adjust scheduling into "Do not adjust basic dates, d
-
Greetings one and all, I've just built a Windows 8.1 Enterprise system on an Asus Z9PA-D8 with dual processors installed. When any of the sound blaster drivers (CD or downloaded) are installed the card stops working. Uninstall everything, and it work
-
hello all, i want to convert days into weeks. can any of u please suggest function module to convert form days to weeks.
-
i've just updated my iphone, and now I can't open no app, and can't sync music and photos. WHY?????