Execution of the stored procedure Oracle EF6 error.
Hello
Need help with the oracle error
{"ORA-06550: line 1, column 8:"}
PLS-00306: wrong number or types of arguments in the call to "sp_name".
ORA-06550: line 1, column 8:
{"PL/SQL: statement ignored '}
This error occurs when the code runs the line in Vb.net application in Model Designer
MyBase.ExecuteFunction ("sp_name" para1, para2, para3, dOBpara4, para5)
I create the SSDL and CSDL, MSL files for oracle to MS SQL connection by the method mentioned in the link JasonShort - professional profile - CodeProject it worked perfectly fine without the stored procedures. I managed to insert, update, and delete records. Then, I created stored procedures for Insert, Update, Delete. It worked fine with MS SQL. I copied and updated oracle files respectively. I gives me the error mentioned above.
I executed stored procedures in Oracle SQL Developer, and it works without error. But when it is executed via the model there is light of the error. Can anyone let me know the solution for this error. I'm using VS2010, EF6, Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
Thank you
Prachin Soparkar
Hello
Sorry for the inconvenience. After I posted this question I took a break and saw that the error was nothing, but I had given FNAME as parameter name in MS SQL. In oracle when I created the sp I created the parameter with p_FNAME. Where the schema defined in the language SSDL and CSDL, MSL had to be changed to MS, but since I want to that it would be same in different databases, I choose to have changed it in oracle stored procedure. The error msg is confusing, it should be something not found parameter or incompatibility etc.
Thank you
Prachin Soparkar
Tags: Database
Similar Questions
-
Select problem with a statement in the stored procedure oracle
Hi guys,.
I am new to oracle. I have a simple sql stored procedure that needs to be converted to oracle. The procedure is,
CREATE PROCEDURE my_procedure
Char (4) @my_var = null
AS
Select * from my_table where my_variable = @my_var
I converted this SP as oracle and the convert SP is,
create or replace
My_procedure PROCEDURE
(
v_my_var in CHAR DEFAULT NULL
)
AS
BEGIN
SELECT * FROM my_table WHERE my_variable = v_my_var;
END;
But the SP above returns an error (Error (13.3): PLS-00428: an INTO clause in the following SELECT statement) when compiling.
So I used the slider to get the results and send back them. Updated the SP is,
create or replace
My_procedure PROCEDURE
(
v_my_var in CHAR NULL by DEFAULT,
cv_1 ON SYS_REFCURSOR
)
AS
BEGIN
OPEN cv_1 to SELECT * FROM my_table WHERE my_variable = v_my_var;
END;
Now, the SP is compiled successfully and return the result set correctly. My doubt is,
What is the right way to solve the problem that I mentioned above? Is there another way to get the select query result without using a cursor?
Please advice. Thank you for your help in advance.
RAMDepends on where you are calling from SP.
I assume you are using a windows client, as you referred to SQL Server.
The .NET Oracle provider, allowing return of pl/sql types and as you return only all columns in a single line, you could change your procedure to something like this:create or replace procedure my_procedure(v_my_var in char default null ,cv_1 OUT my_Table%rowtype) as rt my_table%rowtype; begin SELECT * into rt FROM my_table WHERE my_var = v_my_var; cv_1 := rt; END my_Procedure; /
-
DECLARE
the stored procedure varchar2 (25);
BEGIN
-DBMS_OUTPUT. Put_line ("enter the name of the procedure :'||: procname");
the stored procedure: =: procname;
DBMS_OUTPUT. Put_line (' procedure :'|| stored procedure);
stored procedure.
END;
: procname is a variable binding in the apex to switch the running value.
This is the error I get
ORA-06550: line 7, column 2:
PLS-00221: "STORED procedure" is not a procedure or is not defined
ORA-06550: line 7, column 2:
PL/SQL: Statement ignored
5the stored procedure: =: procname;
6 DBMS_OUTPUT. Put_line (' procedure :'|| stored procedure);
7. the stored procedure.
8 END;
SmtWtL wrote:
DECLARE
the stored procedure varchar2 (25);
BEGIN
-DBMS_OUTPUT. Put_line ("enter the name of the procedure :'||: procname");
the stored procedure: =: procname;
DBMS_OUTPUT. Put_line (' procedure :'|| stored procedure);
stored procedure.
END;
: procname is a variable binding in the apex to switch the running value.
This is the error I get
ORA-06550: line 7, column 2:
PLS-00221: "STORED procedure" is not a procedure or is not defined
ORA-06550: line 7, column 2:
PL/SQL: Statement ignored
5. the stored procedure: =: procname;
6 DBMS_OUTPUT. Put_line (' procedure :'|| stored procedure);
7. the stored procedure.
8 END;
What you're trying to achieve?
Bind variables cannot be used for the dynamic execution of stored programs. Dynamic SQL using lexical rather than bind substitution must be used to run when the program name is not known until execution of the programs.
declare sproc varchar2(25); begin sproc := :procname; dbms_output.put_line('procedure:'||sproc); execute immediate 'begin ' || sproc || '; end;'; -- DO NOT DO THIS! end;
It is a fundamental design flaw and a security disaster. It's stops essential compilation controls is performed and is open to attack by SQL injection and other security vulnerabilities. There is no good reason to do this.
-
Error on the definition of the stored procedure in the simultaneous program
Hello
I created a stored procedure and wanted it attached to the concurrent program. The purpose of this stored procedure when you run it in simultaneous program, the system retrieves the data from the csv file downloaded from the server, then it will insert in the tables of SO / the Interface API. Below, the error occurred.
* Starts * 18 April 2012 18:18:42
Error ORACLE 6550 in FDPSTP
Cause: FDPSTP failed due to the ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'SPKO1 '.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Steps I did to set the stored proc
< < simultaneous executable program > >
Executable: RDRAGON_SO_IMPORT
Short name: RDRAGON_SO_IMPORT
Application: Order management
Method of execution: PL/SQL, stored procedure
Run file name: SPKO1
< < concurrent program - set > >
Program: RDRAGON SO IMPORT
Short name: RDRAGON_SO_IMPORT
Application: Order management
Name of executable: RDRAGON_SO_IMPORT
Method: PL/SQL, stored procedure
Format: text
No set
-Here are my stored procedure-
CREATE OR REPLACE PROCEDURE APPS. SPKO1 IS
FH UTL_FILE. TYPE_DE_FICHIER;
v_line VARCHAR2 (32767).
v_source_id NUMBER (10);
v_created_by NUMBER (10);
v_creation_date DATE;
v_org_id NUMBER (10);
v_orig_sys_docref VARCHAR2 (50);
V_Customer VARCHAR2 (360);
v_customer_prev VARCHAR2 (360);
v_sold_to_org NUMBER (10);
v_orig_line_ref NUMBER (10);
v_item_code VARCHAR2 (2000);
v_ordered_qty NUMBER (10);
v_selling_price NUMBER (10);
v_count NUMBER (10);
v_stat NUMBER;
/******************************************************************************
NAME: SPKO
PURPOSE:
REVISIONS:
Worm Date Description of the author
--------- ---------- --------------- ------------------------------------
1.0 16/04/2012 administrator 1. Created this procedure.
NOTES:
Keywords to replace automatically available Auto:
Object name: SPKO
SYSDATE: 16/04/2012
Date and time: 16/04/2012, 17:55:42 and 16/04/2012 17:55:42
Username: admin (set in Options of TOAD, editor of the procedure)
Name of the table: (defined in the dialog box "New PL/SQL object")
******************************************************************************/
BEGIN
v_source_id: = 6;
v_created_by: = - 1;
v_org_id: = 204;
v_customer_prev: = null;
v_orig_line_ref: = 0;
v_stat: = 0;
SELECT header_id in (DE) v_orig_sys_docref
Select header_id
of OE_ORDER_HEADERS_ALL
creation_date desc order
) WHERE ROWNUM = 1;
FH: = UTL_FILE. FOPEN ('XXANDDIR2', 'myfile1.csv', 'R', 32767);
< < file_read_lines > >
LOOP
BEGIN
UTL_FILE. GET_LINE (fh, v_line);
V_Customer: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 1") ',' "') ','" ');
v_creation_date: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 2") ',' "') ','" ');
v_item_code: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 3") ',' "') ','" ');
v_ordered_qty: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 4") ',' "') ','" ');
v_selling_price: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 5") ',' "') ','" ');
v_orig_line_ref: = (v_orig_line_ref + 1);
If v_stat = 0 then
v_orig_sys_docref: = (v_orig_sys_docref + 1);
end if;
SELECT hca.cust_account_id from v_sold_to_org
OF hz_cust_accounts AOB.
HP hz_parties
WHERE hca.party_id = hp.party_id
AND hca.request_id is null
AND hp.party_name = v_customer;
If v_stat = 0 then
INSERT INTO OE_HEADERS_IFACE_ALL)
order_source_id,
orig_sys_document_ref,
org_id,
CREATION_DATE,
created_by,
last_update_date,
last_updated_by,
operation_code,
sold_to_org_id,
booked_flag)
VALUES)
v_source_id,
('TEST' | v_orig_sys_docref).
v_org_id,
v_creation_date,
v_created_by,
v_creation_date,
v_created_by,
"INSERT."
v_sold_to_org,
'Y') ;
commit;
end if;
INSERT INTO OE_LINES_IFACE_ALL)
order_source_id,
orig_sys_document_ref,
orig_sys_line_ref,
inventory_item,
org_id,
ordered_quantity,
unit_selling_price,
unit_list_price,
CREATION_DATE,
created_by,
last_update_date,
last_updated_by,
operation_code)
VALUES)
v_source_id,
('TEST' | v_orig_sys_docref).
v_orig_line_ref,
v_item_code,
v_org_id,
v_ordered_qty,
v_selling_price,
v_selling_price,
v_creation_date,
v_created_by,
v_creation_date,
v_created_by,
"INSERT");
commit;
v_customer_prev: = v_customer;
If v_customer_prev = v_customer then
v_stat: = 1;
on the other
v_stat: = 0;
end if;
-DBMS_OUTPUT. Put_line ('Col1: ' | v_source_id |', Col2: ' | v_creation_date |', Col3: ' | v_created_by |', Col4: ' | v_updated_date |', Col5: ' | v_updated_by);
EXCEPTION
WHEN NO_DATA_FOUND THEN
OUTPUT file_read_lines;
END;
END LOOP;
SELECT count (*) in the OE_HEADERS_IFACE_ALL v_count;
DBMS_OUTPUT. Put_line (' record Total inserted successfully: ' | v_count);
UTL_FILE. FCLOSE (FH);
END SPKO1;
/
But when I run the stored procedure using TOAD his work.
Help, please. This is my first time to attach the stored procedure in the concurrent program.
Thank you very much.
Kind regards
Diane
Published by: peopsquik08 on April 18, 2012 03:58as clive_t solier
>
You must explicitly reference the settings out
>Try
DECLARE VFILE VARCHAR2(32767); V_SOURCE_ID NUMBER; -- ERRBUF VARCHAR2(200); RETCODE NUMBER; BEGIN VFILE := 'myfile1.csv'; V_SOURCE_ID := 6; --APPS.OMORDERLOADER.SPKO1 ( VFILE, V_SOURCE_ID ); --COMMIT; APPS.OMORDERLOADER.SPKO1( ERRBUF => ERRBUF, RETCODE => RETCODE, VFILE => VFILE, V_SOURCE_ID => V_SOURCE_ID ); END;
but the code above to test your proc
to run concurrent SQL, you can use fnd_submit.submit_program
-
Hello
How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.
Thank you
Jay.
Hi if your task is running an informatica mapping you can set your DAC task to run the full mapping for incremental and full loads, so tab task just point to the mapping.
Hope that helps.
Thank you
-
can I export and import my database to oracle via the stored procedure?
Hi all
I need to export my database using the stored procedure, the stored procedure is called by the java application and it works well
Now I still get the "ULTIMATE QUESTION", could export and import the database using the stored procedure?
Really thanks for the reply.
Kind regards
KahlilHello
I think you can use DBMS_DATAPUMP (10.1 +), see [DBMS_DATAPUMP | http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_datpmp.htm#i1007277], for examples, see [http://www.psoug.org/reference/dbms_datapump.html]
Kind regards
-
Error in retrieving the stored procedure of the DB JDev adapter
Hello
I am facing a problem when configuring Jdeveloper stored procedures using the DB adapter. I use in my Sql Server 2005 database, version Jdeveloper 10.1.3.3 Version 10.1.3.1.Bpel. Connection to the database SQL Server 2005 is good, but it only displays the views and tables. I get the following error message when I try to add the sql stored procedure call
"An error occurred while getting the database schemas. Make sure the database connection is valid and is supported"
Can someone help me please.
Thank you
Phani
Published by: Brad on October 28, 2008 11:30Post your email and I'll send you a complete tutorial of SQL Server.
-
Call the stored procedure, and bind parameters by name
Hello
I use the Oracle ODBC 12 c driver to pass values from one Interface to our database Oracle 11.2. The Interface software collects data from modbus protocoll and calls a stored procedure. Right now my syntax to call the stored procedure looks like this:
CALL procedure-name ('STRING', 'Timestamp as String', numValue1);
It works very well. Now, I have to add a default setting to my procedure. To stay flexible to make other changes, I want to call the procedure and bind the parameters by name. Release 10.2.0.1.0 ISC ODBC Notes:
Added support for the named parameter, binding the parameters by name. ODBC Oracle driver now allows the application to specify the parameters of a stored procedure by name, in the procedure call. Named parameters are to be used in calls to stored procedures and should not be used in other SQL statements.
So, it shouldn't be a problem to use named notation, but how do I do this in ODBC? I tried like this, but oracle returns an ora-00936 error of missing expression:
call procedure-name (paramName1 = > 'STRING',= paramName2 > 'Timestamp as String',paramName3 = > numValue1).
Thank you for your help.
Finally, I was able to find the error. The syntax of the statement was very good. The problem was caused by another declaration that I edited before and the error has not attracted Attention immediately.
Thanks for reading and looking for an answer.
-
Problem with the stored procedure
Hello everyone,
I am French and I am trying to create a stored procedure in my oracle database 10 g R2.
Here's the code I developed:
create or replace procedure recgenerator (max_row in number, min_row number) is
Start
cursor c_nume_clie is
Select nume_clie
from (select rownum rn, nume_clie of the customer)
where < = max_row and rn > rn = min_row;
r_nume_clie c_nume_clie % ROWTYPE;
Start
Open c_nume_clie;
loop
extract the c_nume_clie in r_nume_clie;
When the output c_nume_clie % NOTFOUND;
dbms_output.put_line (r_nume_clie.numero);
end loop;
close c_nume_clie;
end;
end;
/
As you can see, the point is to allow a user to select the folder he wants only. I did a slider to get this, but oracle returns me an error and I can't find the source.
Here is the oracle error:
SQL > show errors
Mistakes pour the RECGENERATOR PROCEDURE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/11 PLS-00103: symbol 'C_NUME_CLIE' met instead of one of
following symbols:
:= . ( @ % ;
could you clarify me please?
Thank you
PaulNeroWhen you want to print something on the screen you should be sure that you have added your connection to DBMS output.
Go to the menu 'View'--> 'DBMS output. You can see that there is a new Dbms output window, where you can click the green sign to add your connection. Execute the statement again and you will see that the statement was printed.
-
Hello
I have a function in the db that returns a numeric value after passing an Id (digital). How do I create a join in physical layer as funtion will return a digital and given that it is a function, it can return only a single column.
is it possible that I can keep the id (parameter) in the phycisal layer which I'm passing to the function, so that I can join neccasy in the physical layer with fact/Sun to the stored procedure.
is the possible creation of mutiple stored procedure in physics if my function to only return a single column.
Concerning
IssueIf I understand your question, you have a function that returns a numerical value based on an ID, we'll call it Customer ID as a sample. What you need to do is to create a view like this:
CREATE THE VIEW IN CIRCULATION
SELECT CUSTOMER_ID, get_outstanding (CUSTOMER_ID) FROM CLIENTYou can then query this view like this:
SELECT * EXCEPTIONAL WHERE CUSTOMER_ID = 999
You could also use this point of view in your physical layer and attach it by customer ID. If you already have a table of facts, you could put a top view to add the extra column with your function. It of all good and should work fine with a warning. PL/SQL execution on SQL functions is not effective. Oracle has switch context between SQL and PL/SQL for each line and change in context is an expensive operation. In a proper system of DWH you préremplira your fact table with the results of get_outstanding for all customers so that there is no delay in the calculation it when OBIEE queries data.
-
Block based on the stored procedure cannot modify Default_where clause
Hi all
I tried to create a block based on the stored procedure that it works very well with the result set for the refcursor. But if I need to add filters on the block using where clause in the palette of goods or
using the property block set in where clause, it does not error but does not review filters .
tried everything to you please let me know. This is a restriction whereby we can set filters on the block when we create the block based on the stored procedure.
Thank you
Check in Form Builder Help:
Creating a block of data from a procedure that uses a ref cursor
... You can't pass a WHERE or ORDER BY clause clause in a stored procedure.
But you can send your WHERE condition using the query Source Arguments.
If the procedure is on the side of the database (not in the forms module), ensure that the procedure is not vulnerable to injection of SQL code.
Kind regards
Zlatko
-
user_table should be used in the stored procedure.
Hello
I want to find my permanent table user_tables and then drop and recreate it,
I can use this user_tables in my stored procedure for above purpose or is there any notice that must be used.
SP is admin sp, used to run in offline mode.
yorus truly
Published by: 944768 on 10 February 2013 23:44
Published by: 944768 on 10 February 2013 23:44944768 wrote:
but I wanted to know that can I use user_table in above proc stored to conclude and then drop and create it when Everitt runs?Oracle manages two "flavors" of the stored procedure - copyright and rights of the Summoner. Rights of the DEFINER (default) is always performed under stored security area of the owner of the procedure no matter who calls it. So, if you ask USER_TABLES (or any display USER_, besides) within DEFINER rights stored procedure, you will get a list of tables owned by the owner of the stored procedure, not stored calling procedure. Rights (AUTHID CURRENT_USER) stored Invoker procedure is always carried out under the domain of the calller security. Therefore, if you are querying USER_TABLES (or any display USER_, besides) within the Summoner rights stored procedure you will get a list of tables belonging to the appellant a stored procedure. Hope it answers your question.
SY.
-
Maximum number of parameters sent to the stored procedure
I have a web form where I insert data in Oracle. There are at least 20 fields on the form. For the INSERT, I want to use the stored procedure. But in this case for the section of the VALUES in the INSERT statement, I need to send that many - in this case 20 settings. Is it normal for a procedure to receive 20 parameters? If this isn't the case, then should how I follow to do? I know that technically there is only no problem but isn't normal programming or database managementwise? I think it's the basic thing any developer web do it all the time.Is it normal for a procedure to receive 20 parameters?
Sure. It is very good.
But what is normal programming or database managementwise
If you need to insert values for 20 fields then normal.
-
Need help, run the stored procedure in ASP.
I have a web page in which I would use a query like http://ereply.us/q/l.asp?id=383966476 string
It directs the user to a page that contains the following code:
<!-queue = "database_connection.asp #include" - > "
< %
If not isempty (request.querystring ("id")) then
SQL = "exec dbo.fp_qr_code @sequence (request.querystring ("id")) =" "
If rs.state = 1 then rs.close
RS. Open sql, conn, 3, 2
If rs.recordcount <>0 then
session("Name") = rs ("name")
session("JobID") = rs ("jobid")
session("SEQ") = rs ("seq")
If rs ("id") <>"" then the answer. " Redirect ("index.asp")
end if
end if
% >It queries a SQL database to return the value of 'name '. In turn, according to the code of the user should be directed to 'Index.asp' that contains:
Welcome < % response.write (session("name")) % >
And the page you should see the page with"Welcome". Instead, I get a server 500 error. The stored procedure runs as a stand-alone query in SQL Management Studio.
Any ideas would be greatly appreciated.
I solved this. This is the query that worked:
< %="">< br="">SQL = "" exec fp_qr_code ' "& request.querystring ("id") &" ' " < br=""> set rs = Conn.Execute (sql) < br=""> if rs.eof then response.write ("no registration") < br=""> while not rs.eof" ""
response.write (("name") rs)response.write (("imgname") rs)
response.write (rs ('url'))
RS.MoveNext
Wend < br=""> %> -
Can not see all the stored procedures in the Entity Data Model Wizard
I hope it is a simple oversight on my part I try to use the new beta version of odp.net with entity framework support. I can open the Entity Data Model Wizard, give him my information database, and I can choose various tables to use successfully. But in the list where I select the tables, views and stored procedures, the wizard does not see my stored procs or my point of view.
Does anyone know why he would see the tables but not views or stored procedures? My procs can be found under "packages" If that makes a difference. I tried to create a fictional stored procedure at the level above the title of 'procedures', but it is unclear whether.
Is it possible for me to debug this from here? The log files, I could watch that would help me?
Thank you
JimI belive your Oracle database 10 g such as 9iR2 predates.
ODP/EF Beta does not list the stored procedures or functions when connect you to a database Oracle 10 g before.Readme.txt:
4. the procedures are not compatible with the DB 9.2.
Thus, there is no stored procedure listed by the EDM Wizard for 9.2 DBs.
Maybe you are looking for
-
My guard macbook eject blank CD
I am trying to burn a cd from iTunes on my MacBook Pro, but whenever I insert a blank CD to the computer snoring a few times and ejects after about a minute to try. I checked the system preferences and I check the CD itself, but it seems that nothing
-
On my computer, "print" in the "file" menu drop-down is disabled. I don't have the option to export to PDF (only text epub options and when I try to export). And when I 'share' in pdf, all except the first page are empty. Any help is appreciated
-
Satellite A110-293 Windows does not start at the top. Ntoskrnl. No recovery CD
I have a Toshiba Satellite A110-293 with Windows XP. I've upgraded to Vista a few months ago. One day, I turned on my laptop computer and got the following error message: + "Unable to start Windows. A recent hardware or software change might be the c
-
Is it possible to increase the memory on iPad 2? Probably an external device?
Is it possible to increase the memory on my iPad2, without having to buy a new iPad?
-
Satellite L750 goes no more 'sleep' mode
I've had my L750 for 10 months now. Suddenly it will not go in mode 'sleep' when I close the lid. I checked the power settings and it is set to standby mode when closed. Everyone has ideas, I'm sick of working full time.