SQL & PL/SQL :: ORA-06550 / Error Executing Stored Procedure

Nov 18, 2010

Procedure: CREATE OR REPLACE procedure test (a number, b varchar2) is

begin
dbms_output.put_line(a ||'->'||b);
end;

Anyonymous Block:

begin
exec test(1,'m');
end;
/
When i run this i am getting this error
ORA-06550: line 2, column 7:
PLS-00103: Encountered the symbol "TEST" when expecting one of the following
[code]...

View 5 Replies


ADVERTISEMENT

PL/SQL :: Executing SQLPLUS Command From Stored Procedure

Aug 28, 2012

I am trying to execute the SQLPLUS command (CONNECT) from the stored procedure.It is throwing below error message.

Stored Procedure:

SQL> select user from dual
2 ;
USER
------------------------------
SYS
SQL> create or replace
2 PROCEDURE PROCEDURE1 AS
3 BEGIN
4 sqlplus sys/sys@D as sysdba;
5 --execute immediate 'create user 'kkk' identified by 'kkk';
6 END PROCEDURE1;
7 /

Warning: Procedure created with compilation errors.

SQL> show err
Errors for PROCEDURE PROCEDURE1:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/9 PLS-00103: Encountered the symbol "SYS" when expecting one of the
following:
:= . ( @ % ;
The symbol ":=" was substituted for "SYS" to continue.
[code]....

View 29 Replies View Related

Executing Stored Procedure / Function From Database Link?

Feb 24, 2011

I have 2 databases:

Database A
Database B

In Database A I have a series of config tables and stored procedures/functions In Database B I have a lot of tables.

I would like to execute my stored procedures and all associated functions in database A on my data in database B.

Now I've figured out that creating a database link enables me to do SQL selects on data in both A and B...but how do I run SP/Funcs ? I've read something about packages but not sure if I'm heading in the right direction.

Do I need to create a simple synonym ? Can I use the existing DB link ? or is there a special way of calling them, or...

I like the A/B database set up since I can keep battle tested code in one location and have it work across multiple dbs...saves me having to create everything in every database.

View 2 Replies View Related

Client Tools :: Error / ORA-00900 / Invalid SQL Statement After Executing Procedure

Jan 3, 2011

CREATE OR REPLACE PROCEDURE test
IS
CURSOR cusers IS SELECT user_name, user_date FROM users;
uname users.user_name%TYPE;
udate users.user_date%TYPE;
BEGIN
OPEN cusers;

[code].....

When I try to execute this procedure I get following error:

ORA-00900: invalid SQL statement

Compilation of procedure is successful.

SQL code for creating the USERS table is here:

CREATE TABLE "USERS"
("USER_ID" NUMBER(10,0) NOT NULL ENABLE,
"USER_NAME" VARCHAR2(50) NOT NULL ENABLE,
"USER_EMAIL" VARCHAR2(50) NOT NULL ENABLE,
"USER_PASS" VARCHAR2(50) NOT NULL ENABLE,
"USER_DATE" DATE NOT NULL ENABLE,
CONSTRAINT "USERS_PK" PRIMARY KEY ("USER_ID") ENABLE
)

View 3 Replies View Related

SQL & PL/SQL :: Stored Procedure Function - Numeric Or Value Error

Apr 16, 2010

I have wrote a Stored Procedure Function that get all the rows from a Staging Table and assigns it to a CLOB and returns the CLOB. The issue is I'm getting the dreaded

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "F_CLOB_TEST", line 21
ORA-06512: at line 7

The error does not occur when I remove the 'PRC_ID', 'S_FIL_NAME' & 'exportDt' from the query. It works fine. The PRC_ID has data such as "700$702$7 05$706$707$708$709$710$711$712$713$714$715$294404$294405$294407$294408$294409$294410"

and S_FIL_NAM is the same for all columns - "SBENE_FILID810-2010-04-07-10.59.17"

The query returns 829 rows. Also I have to include a few more columns in the query which have data larger than the 'PRC_ID', but I have not included them here in the sample code, as this code by itself returns the ORA-6502 error.

create or replace
FUNCTION "F_CLOB_TEST" (job_id in Number)
return clob
is
c_clob clob;
[code]....

View 26 Replies View Related

SQL & PL/SQL :: Error When Tried Sending Email Through Stored Procedure?

Jan 6, 2011

I have this stored procedure that does implements some business logic and then sends an email.

I got the below error when it tried to send the email

Quote:Returned values:
ERR_CODE =-29279,
ERR_MESSAGE = "MSS DATABASE INCONSISTENCYOTHERS EXCEPTION in XCOM_X080_SUBMITORDER - SQL -29279 SQLERRM: ORA-29279: SMTP permanent error: 501 5.5.2 Syntax error in parameters scanning "TO""

How can I handle this error using exception and in case sending email fails instead of abnormal exit ?

View 2 Replies View Related

Insufficient Privileges Error While Updating Through Stored Procedure

Oct 2, 2008

I have a update statement that works fine when its run in SQL window but when i try it as part of a Stored Procedure its giving me the Insufficient privileges error on that table.

If i dont have privilege to update that table wont it not let me update while doing it outside the stored procedure as well?

View 4 Replies View Related

SQL & PL/SQL :: Error With Execute Immediate To Pass Db_link To Stored Procedure?

Oct 19, 2011

I have the following error when I try to pass a Procedure parameter carrying db_link name to a stored procedure:

SQL> CREATE OR REPLACE PROCEDURE AFESD.P_DM_VCONTRACT_ITEM (CON_CONNECTION VARCHAR2)
2 IS
3 T_CONNECTION VARCHAR2(50);
4 T_SQL VARCHAR2(500);
5 BEGIN
6 T_CONNECTION := 'X_DM_TEST@' || CON_CONNECTION;

[code]....

The insert statement succeeds when I try to run DBMS_OUTPUT.put_line output.

View 4 Replies View Related

SQL & PL/SQL :: Stored Procedure - Character To Number Conversion Error

Mar 14, 2011

I have written a stored procedure that has started returning the error:

Error starting at line 1 in command:
call p_glpost('DSTUK', 'L', '2008-01-01', '2008-01-01', '2011-02-18', 1, 1, 1, 0, 'Hi there')

Error report:
SQL Error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "CLARITY.P_GLPOST", line 173
06502. 00000 - "PL/SQL: numeric or value error%s"

I can't seem to find a tool that will let me step into the actual stored procedure line by line to see where the error occurs. It mentions line 173, which seems to be a red-herring, as line 173 is simply one of the 'END IF' lines within this block:

IF NVL(r_dist.transtype,'wild') = 'wild' THEN
NULL;
elsif r_wip.transtype = r_dist.transtype THEN
v_matchCount := v_matchCount+1;
elsif r_wip.transtype <> r_dist.transtype THEN
[code]......

Tell me if it is possible to trace through a SP, and which tool is best (I am trying to use Oracle SQL Developer).

View 8 Replies View Related

SQL & PL/SQL :: Accept Input And Output To Screen - Getting ORA-06550 Error

Jan 18, 2011

I am trying to accept three numbers and one string as input, and then display the values on the screen. I don't understand why I am getting these errors.

SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 id_number NUMBER := &id_number_input;
3 trans_num NUMBER := &trans_num_input;
4 remar VARCHAR2(75) := &remark_input;
5 receipt NUMBER := &receipt_input;

[Code] .....

ERROR at line 4:
ORA-06550: line 4, column 24:
PLS-00201: identifier 'HELLO' must be declared
ORA-06550: line 4, column 8:
PL/SQL: Item ignored
ORA-06550: line 10, column 61:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 10, column 2:
PL/SQL: Statement ignored

View 3 Replies View Related

Executing A Stored Proc On Sql Developer

Aug 9, 2011

I'm trying to run an sp to debug the issue. SQL Developer generated this script for me..

DECLARE
P_MMRRRR VARCHAR2(200);
P_DATA1 xxx_package.xxxtype;
P_DATA2 xxx_package.xxxtype;
BEGIN
P_MMRRRR := 04/2011;
[code]........

The package definition for xxxtype is

TYPE xxxtype IS REF CURSOR;

The error I keep getting is

Bind Variable "P_DATA1" is NOT DECLARED
anonymous block completed

View 5 Replies View Related

PL/SQL :: Call More Than One Stored Procedure In New Stored Procedure

Dec 24, 2012

Execute sp1 param1...param6
Execute sp2 param1...param8
Execute sp3 param1...param4

All these stored procedures deals with insert/updated transactions . i need to create a new stored procedure to execute all this in a single stored procedure which will be something like

create procedure sp4(param1...param8)
as
begin
Execute sp1 param1...param6
rollback if any error
Execute sp2 param1...param8
rollback if any error
Execute sp3 param1...param4
rollback if any error
end;

View 6 Replies View Related

Getting Errors While Executing Procedure

Oct 4, 2010

I am getting errors while executing the following block.

create TYPE c_Rec as object(a VARCHAR2(1), b NUMBER);
DECLARE
-- TYPE c_Rec as object(a VARCHAR2(1), b NUMBER);
TYPE c_collection IS TABLE OF c_Rec;
l_coll c_collection := c_collection();
BEGIN
[code]........

error

06530. 00000 - "Reference to uninitialized composite"

View 1 Replies View Related

PL/SQL :: Executing Procedure Using Variables

Feb 6, 2013

I'm trying to execute a procedure within a Declare/Begin/End statement and using variables as input parameters in my procedure but I keep on getting an Invalid SQL Statement Error. My code is below:

declare

  START_dt  VARCHAR2(30);
  END_DT VARCHAR2(30);
 
  begin
       
    SELECT '01-APR-2011'
    INTO END_DT
    FROM DUAL;
 [code]....

The table the procedure is pulling data from doesn't have proper date/time stamps but my procedure takes the varchar dates above and turns them into dates in the procedure so the input date parameters are left as just string characters.

View 6 Replies View Related

SQL & PL/SQL :: Executing Server Procedure From Oracle

Jul 31, 2013

How to execute Sql Server procedure from Oracle.I have created a dblink and when calling directly to that procedure it is throwing error.

--creationg sqlserver procedure
create proc getRecords
as
print 'testing';
--creating db link
create database link remote connect by ss identified by ss using 'remote';
[code]....

I have found DBMS_HS_PASSTHROUGH package is capable of doing it but not sure how to do.
Nathan

View 11 Replies View Related

PL/SQL :: Executing Procedure Having Refcursor As Out Parameter

May 13, 2013

I've the following package having a procedure with OUT parameter as refcursor .The following is the sample example having same structure with different table name,exception handling in my dev environment

CREATE OR REPLACE PACKAGE TEST_PACK
  IS
Type refCursor  is  REF CURSOR;
PROCEDURE TEST_PROC (out_data out refCursor);
END;
[code]...

i am getting the follwoing errror
ORA-00932: inconsistent datatypes: expected - got.

View 3 Replies View Related

Forms :: Executing Procedure Based On Variable Name

Apr 1, 2011

I need to execute a procedure based on a value in a form. So the procedure name will be changing for value selected in a list.

I need to know a method where i could store the procedure name in a table and when ever i select a value from the list, the respective procedure needs to be executed.

View 1 Replies View Related

SQL & PL/SQL :: Executing Dynamic Procedure With Record Type

Jul 26, 2012

I'm not attaching any tables / data..etc...I just want to know how to pass the record type to a procedure (which are actually obtained from a table) -- see ** below where I'm getting an error..Need to pass the whole record type "l_shl_order_msg"

CREATE OR REPLACE PROCEDURE CM_BUILD_MSG_PRC (P_IN_BLD_MSG_CURSOR IN SYS_REFCURSOR,
P_OUT_BLD_MSG_CURSOR OUT SYS_REFCURSOR)
IS
l_shl_order_msg CRAE_INTERFACE.GLB_VAR_PKG.deid_SHELL_order_typ;
V_MSG_SHELL_NAME VARCHAR2(1000);
V_MESG_TEXT_SEGMENT VARCHAR2(1000);
V_TEXT VARCHAR2(1000);
V_MSG_TEXT VARCHAR2(4000);
V_MSG_FINAL_TEXT VARCHAR2(4000);
V_MSG_PROC VARCHAR2(1000);
V_SQL VARCHAR2(4000);
V_CNT NUMBER;
L_STATUS VARCHAR2(100);
L_REASON VARCHAR2(1000);
[code]...

I get an error saying that "wrong number or types of arguments in call to ||"..Not sure how to pass record type dynamically...

View 10 Replies View Related

SQL & PL/SQL :: Executing A Procedure Containing A Global Temporary Table

Mar 3, 2010

create or replace procedure test
as
stmt varchar2(2000);
begin
EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE tt_Local(ID VarChar2(38)) ON COMMIT PRESERVE ROWS';

stmt := 'INSERT INTO tt_Local SELECT cardnumber FROM cards';
execute immediate stmt;
end;

-- when am trying to execute this

begin
test;
end;
-- showing ora-01031, insufficient privileges.

View 9 Replies View Related

SQL & PL/SQL :: Executing Procedure - Command Not Properly Ended

Jan 18, 2012

After creating this procedure...we r not able to execute it...

SQL> ed
Wrote file afiedt.buf
1 create or replace procedure dyn_pro1
2 (tablename varchar2,colname varchar2, prodid number) is
3 cmd varchar2(100);
4 begin
5 cmd := 'delete ' || tablename || ' where'|| colname|| '=' ||prodid;
6 execute immediate cmd ;--using College_id;
7* end;
SQL> /

Procedure created.

SQL> exec dyn_pro1('stu_4','COLLEGE_ID',200);
BEGIN dyn_pro1('stu_4','COLLEGE_ID',200); END;
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
ORA-06512: at "APPS.DYN_PRO1", line 6
ORA-06512: at line 1

View 8 Replies View Related

SQL & PL/SQL :: How To Send Email In HTML Format By Executing Anonymous Procedure

Oct 11, 2010

How to send email in HTML format as an attachment/email body by executing oracle anonymous procedure

View 1 Replies View Related

SQL & PL/SQL :: ORA-29913 / Error In Executing ODCIEXTTABLEOPEN Callout

Mar 10, 2012

I had run the following code in Oracle 10g..

SQL> CREATE TABLE ext(
2 empno varchar2(100),
3 login Varchar2(100))
4 ORGANIZATION EXTERNAL
5 (TYPE ORACLE_LOADER

[code]....

Table created.

But got this errors...

SQL> select * from ext;
select * from ext
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file empxt.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 19

View 16 Replies View Related

Spatial :: Error While Executing Oracle Query From C#

Apr 18, 2013

I am trying to execute an inline spatial query from c# using ODP.NET. This is a select query and I am passing 2 parameters to this query, one is string and other one is SDO_GEOMETRY. I am able to send SDO_Geometry parameter from c# using Oracle UDT custom designed classes.

Query is working as intended but occasionally giving the following errors:

ORA-29902: error in executing ODCIIndexStart() routine
ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13031: Invalid Gtype in the SDO_GEOMETRY object for point object
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333

I could not figure out the cause of this issue (as it is not failing frequently). Am i getting this issue with the actual query or with Oracle UDT conversion.

View 5 Replies View Related

Reports & Discoverer :: REP-0066 Error Executing CA Utility

Jul 17, 2010

I have an Report .My report worked correct . But Now this Error :

REP-0066 Error executing CA utility
REP-3335 Unhandled Internal CA Error

View 3 Replies View Related

Reports & Discoverer :: REP-0066 / Error Executing CA Utility

Jul 6, 2010

I have An Application with 30 reports. these report run without error but Now when I want to Run Reports , I see this error :

Quote:

REP-0066: Error Executing CA utility .

REP-3335:Unhandled Internal CA error calaa 1

View 1 Replies View Related

Server Utilities :: Error Executing Impdp Utility

Nov 9, 2012

I exported three databases : servicedesk, report and mostcmdb on server A to a dumpfile. Moved them to similar dump location on server B. Now, I want to import them into B by using:

[SQL> impdp system/OSS_MOS7100 dumpfile=MOSTCMDB_0211.DMP schemas=mostcmdb

The error was:

SP2-0734: unknown command beginning "impdp syst..." - rest of line ignored.

View 7 Replies View Related

RAC/ASM Clusterware Installation :: GI Gives Error While Executing Root.sh For ASM Diskgroup?

Oct 4, 2012

We are implementing a 2 node RAC configuration with ASM on vmware and openfiler on LINUX RHEL 6.2. We started our installation with grid infrastructure. While executing root.sh on node 1 it gives error diskgroup cannot be mounted and no alterntions perfomed as below.

+[main] [ 2012-10-04 05:38:33.150 PDT ] [UsmcaLogger.logException:173] SEVERE:method oracle.sysman.assistants.usmca.backend.USMDiskGroupManager:mountDiskGroups+
+[main] [ 2012-10-04 05:38:33.151 PDT ] [UsmcaLogger.logException:174] ORA-15032: not all alterations performed+
ORA-15017: diskgroup "CRS" cannot be mounted

[code]...

View 1 Replies View Related

Server Utilities :: ORA-29913 / Error In Executing ODCIEXTTABLEFETCH Callout

Jul 6, 2012

while i'm importing schemas i came accross

ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-02291: integrity constraint (STATICO.FK_PROD_REQ_LIS_TAG_GEN_2) violated - parent key not found
ORA-31693: Table data object "STATICO"."PROD_REQ_LIS_TAG_GEN":"GEN_DS_LOAN" failed to load/unload and is being skipped due to error:

View 2 Replies View Related

Server Utilities :: Privileges Error - Executing INSERT Statement For Table

Jul 9, 2013

I am using OWB to load a table which write sql loader command. When running the load i am getting below error.

SQL*Loader-643: error executing INSERT statement for table "STG_EWORK"."STG_ISF_LUCC"

I am unable to guess which privileges is missing.

My control file as below

OPTIONS (SKIP=2,BINDSIZE=50000,ERRORS=0,ROWS=200,READSIZE=65536)
LOAD DATA
CHARACTERSET WE8MSWIN1252
INFILE '\devora003.dev.tfl.localPDWPDW_SourceISF_LUCC_Loadfile.csv'
CONCATENATE 1
INTO TABLE "STG_EWORK"."STG_ISF_LUCC"

[code]....

View 4 Replies View Related

Scheduling Job In Stored Procedure

Dec 21, 2011

PFB code i used to schedule a job as per my requirement. And the procedure is executing fine, but when im about to run it is getting hang.

create or replace procedure scheduler_alert(frq varchar2,intrvl number) is
begin
dbms_scheduler.create_job(
job_name=>'scheduler_alert',
job_type=>'stored_procedure',
job_action=>'alertlog_error',
start_date=>SYSTIMESTAMP,
repeat_interval=>'FREQ='||frq||';INTERVAL='||intrvl,
enabled=>true,
auto_drop=>false);
end;
/

When im trying to run the job it is getting hang.

exec dbms_scheduler.run_job('scheduler_alert');

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved