ORA-13786: missing SQL text of statement object - Unable to profile a sql_id in oracle 11g -

11.2.0.3.5 / 2 node rac on rhel-6 / 64-bit
I would like to a profile a sql_id since its following 4 plans and one of them is the optimal.
But im unable to do it as it throwing ORA-13786.
Steps I followed :
{code}
SET SERVEROUTPUT ON
-- Tuning task created for specific a statement from the AWR.
DECLARE
  l_sql_tune_task_id  VARCHAR2(100);
BEGIN
  l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
                          begin_snap  => 29676,
                          end_snap    => 29707,
                          sql_id      => 'fjndcnvzkjkb5',
                          scope       => DBMS_SQLTUNE.scope_comprehensive,
                          time_limit  => 60,
                          task_name   => '420tavt57dxkx_tuning_task',
                          description => 'Tuning task for statement 420tavt57dxkx in AWR.');
  DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'fjndcnvzkjkb5_CFO_tuning_task');
SET LONG 10000;
SET PAGESIZE 1000
SET LINESIZE 200
SELECT DBMS_SQLTUNE.report_tuning_task('420tavt57dxkx_tuning_task') AS recommendations FROM dual;
SET PAGESIZE 24
SQL>  execute dbms_sqltune.accept_sql_profile(task_name =>'420tavt57dxkx_tuning_task_task', replace => TRUE,force_match  => TRUE);
BEGIN dbms_sqltune.accept_sql_profile(task_name =>420tavt57dxkx_tuning_task', replace => TRUE,force_match  => TRUE); END;
ERROR at line 1:
ORA-13786: missing SQL text of statement object "1" for tuning task "420tavt57dxkx_tuning_task"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
ORA-06512: at "SYS.DBMS_SQLTUNE", line 7568
ORA-06512: at line 1
{code}
Can somebody help me out on this?

Hi Experts,
i too getting this error while attaching the tuning task to the sql profiler, below are the details, appreciate any help on this.
SQL> SQL> VAR profile_name VARCHAR2(30);
SQL> BEGIN
   :profile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name => 'sql_tuning_task');
END;
/  2    3    4
BEGIN
ERROR at line 1:
ORA-13786: missing SQL text of statement object "1" for tuning task "sql_tuning_task"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
ORA-06512: at line 2
SQL> select banner from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

Similar Messages

  • Sql Profile Error ORA-13786: missing SQL text of statement object "1"

    Hi,
    I am testing a Sql Profile sample executiion with the hint result_cache for faster execution of a query. I have created a tuning task but got no recommendations. But when i tried to create sql profile with the pkg dbms_sqltune.accept_sql_profile i am getting an error. The db version is 11.1.0.7. Given below is the sql and the output.
    Please let me know if you have any suggestions.
    -- Accept SQL Profiles
    SET SERVEROUTPUT ON
    DECLARE
    l_sql_tune_task_id VARCHAR2(2000);
    BEGIN
    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
    task_name => 'Permissionstab_tuning_task',
    name => 'Permissionstab_profile',
    description => 'sql profile for Permissionstab_profile',
    force_match => TRUE);
    --profile_type => DBMS_SQLTUNE.PX_PROFILE);
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    with profile_type commented out output
    DECLARE
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "Permissionstab_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 11049
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 30
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 5836
    ORA-06512: at line 4
    including profile_type
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    ERROR at line 9:
    ORA-06550: line 9, column 35:
    PLS-00302: component 'PX_PROFILE' must be declared
    ORA-06550: line 4, column 5:
    PL/SQL: Statement ignored
    Given below is the complete script and output
    CONN / AS SYSDBA
    GRANT CREATE ANY SQL PROFILE TO ariba;
    GRANT DROP ANY SQL PROFILE TO ariba;
    GRANT ALTER ANY SQL PROFILE TO ariba;
    conn ariba/****;
    EXEC DBMS_SQLTUNE.DROP_TUNING_TASK('Permissionstab_tuning_task');
    -- Tuning task created for a manually specified statement.
    DECLARE
    l_sql VARCHAR2(4000);
    l_sql_tune_task_id VARCHAR2(1000);
    BEGIN
    l_sql := 'SELECT /*+ result_cache */ rootId, pe_DefaultingSetBits, pe_Version, pe_Creator, pe_Active, pe_AdapterSource, pe_AdapterFlag, pe_PartitionN
    umber, '||
    'pe_PurgeState, pe_TimeCreated, pe_TimeUpdated, pe_CommonId, pe_ServerVersion, pe_UniqueName, pe_Name, mls_DefaultingSetBits, '||
    'mls_PrimaryString, mls_MaxTranslationID, mls_Translations, mls_PrimaryStringLanguageID, mls_LocalizationKey, pe_Description, '||
    'mls0_DefaultingSetBits, mls0_PrimaryString, mls0_MaxTranslationID, mls0_Translations, mls0_PrimaryStringLanguageID, '||
    'mls0_LocalizationKey, pe_Created, pe_Modified '||
    'FROM PermissionTab '||
    'where pe_UniqueName = '||''''||'PurchasingAgent'||''''||' '||
    'and ( pe_PurgeState = :1 ) AND pe_PartitionNumber = :2';
    l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
    sql_text => l_sql,
    user_name => 'ARIBA',
    scope => DBMS_SQLTUNE.scope_comprehensive,
    time_limit => 60,
    task_name => 'Permissionstab_tuning_task',
    description => 'Tuning task for an Permissionstab query.');
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'Permissionstab_tuning_task');
    SELECT task_name, status FROM dba_advisor_log WHERE owner = 'ARIBA';
    SET LONG 10000;
    SET PAGESIZE 1000
    SET LINESIZE 200
    SELECT DBMS_SQLTUNE.report_tuning_task('Permissionstab_tuning_task') AS recommendations FROM dual;
    SET PAGESIZE 24
    -- Accept SQL Profiles
    SET SERVEROUTPUT ON
    DECLARE
    l_sql_tune_task_id VARCHAR2(2000);
    BEGIN
    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
    task_name => 'Permissionstab_tuning_task',
    name => 'Permissionstab_profile',
    description => 'sql profile for Permissionstab_profile',
    force_match => TRUE,
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    11:17:17 SYS@FLBUYPM 02-APR-13> @sql_profile_result_cache.sql
    Connected.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Connected.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    TASK_NAME STATUS
    Permissionstab_tuning_task COMPLETED
    RECOMMENDATIONS
    GENERAL INFORMATION SECTION
    Tuning Task Name : Permissionstab_tuning_task
    Tuning Task Owner : ARIBA
    Workload Type : Single SQL Statement
    Scope : COMPREHENSIVE
    Time Limit(seconds): 60
    Completion Status : COMPLETED
    Started at : 04/02/2013 11:17:20
    Completed at : 04/02/2013 11:17:20
    Schema Name: ARIBA
    SQL ID : 2y6yar7r71tj1
    SQL Text : SELECT /*+ result_cache */ rootId, pe_DefaultingSetBits,
    pe_Version, pe_Creator, pe_Active, pe_AdapterSource,
    pe_AdapterFlag, pe_PartitionNumber, pe_PurgeState,
    pe_TimeCreated, pe_TimeUpdated, pe_CommonId, pe_ServerVersion,
    pe_UniqueName, pe_Name, mls_DefaultingSetBits,
    mls_PrimaryString, mls_MaxTranslationID, mls_Translations,
    mls_PrimaryStringLanguageID, mls_LocalizationKey,
    pe_Description, mls0_DefaultingSetBits, mls0_PrimaryString,
    mls0_MaxTranslationID, mls0_Translations,
    mls0_PrimaryStringLanguageID, mls0_LocalizationKey, pe_Created,
    pe_Modified FROM PermissionTab where pe_UniqueName =
    'PurchasingAgent' and ( pe_PurgeState = :1 ) AND
    pe_PartitionNumber = :2
    ADDITIONAL INFORMATION SECTION
    - At least one important bind value was missing for this sql statement. The
    accuracy of the advisor's analysis may depend on all important bind values
    being supplied.
    EXPLAIN PLANS SECTION
    1- Original
    Plan hash value: 778402129
    | Id | Operation | Name | Rows | Byte
    s | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 29
    8 | 1 (0)| 00:00:01 |
    | 1 | RESULT CACHE | 9qsg9vxnpk5r13h9gb3wcgujg1 | |
    | | |
    |* 2 | TABLE ACCESS BY INDEX ROWID| PERMISSIONTAB | 1 | 29
    8 | 1 (0)| 00:00:01 |
    |* 3 | INDEX UNIQUE SCAN | ARIBAINDEX341 | 1 |
    | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("PE_PURGESTATE"=TO_NUMBER(:1))
    3 - access("PE_UNIQUENAME"='PurchasingAgent' AND "PE_PARTITIONNUMBER"=TO_NUMB
    ER(:2))
    Result Cache Information (identified by operation id):
    1 - column-count=30; dependencies=(ARIBA.PERMISSIONTAB); attributes=(single-r
    ow); parameters=(nls, :1, :2); name="SELECT /*+ result_cache */ rootId, pe_Defau
    ltingSetBits, pe_Version, pe_Creator, pe_Active, pe_AdapterSource, pe_AdapterFla
    g, pe"
    DECLARE
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "Permissionstab_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 11049
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 30
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 5836
    ORA-06512: at line 4
    11:17:20 ARIBA@FLBUYPM 02-APR-13>
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    ERROR at line 9:
    ORA-06550: line 9, column 35:
    PLS-00302: component 'PX_PROFILE' must be declared
    ORA-06550: line 4, column 5:
    PL/SQL: Statement ignored
    Edited by: 997562 on Apr 2, 2013 8:34 AM

    Hi Experts,
    i too getting this error while attaching the tuning task to the sql profiler, below are the details, appreciate any help on this.
    SQL> SQL> VAR profile_name VARCHAR2(30);
    SQL> BEGIN
       :profile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name => 'sql_tuning_task');
    END;
    /  2    3    4
    BEGIN
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "sql_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at line 2
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

  • Need help in resolving ORA-06502: PL/SQL: related to WF objects

    Hi,
    We are getting the following error "Oracle error -6502: ORA-06502: PL/SQL: numeric or value error: character string buffer too small has been detected in FND_USER_RESP_GROUPS_API.UPDATE_ASSIGNMENT" when we add a new user or make changes to the existing user or anything associated with Workflow process. We have an SR open for over a week, but no resolution yet...!
    We ran autoconfig few times, complied Invalid objects etc ...but no luck!
    This is ERP 11.5.10.2 on Red Hat Linux 4.0 on a 2-node RAC cluster and 2-node Apps Cluster (PCP) ---; thanks in advance..!
    Subroto

    Did this work successfully before ? If so, what has changed ? Can this error be reproduced consistently on all instances ? Can you pl provide the navigation path to reproduce the error ?
    Are you using the Internal Controls Manager module ? If so, MOS Doc 456950.1 (Preventive Segregation of Duties Constraints On Users Form Fails With Ora-6512, Ora-4088) may help.
    HTH
    Srini

  • Oracle 12c getting ORA-4846 (missing read...permission on directory during ADR initialization)

    I'm in initial stages of testing Oracle 12c (12.1.0.1) on Windows, 64-bit with an application I develop.
    I had two working instances on the system. After an unscheduled power cycle, the instances refuse to start.
    The error I get is:
    C:\Users\b>sqlplus SQL*Plus: Release 12.1.0.1.0 Production on Thu Oct 17 13:54:27 2013
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    Enter user-name: / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORA-48146: missing read, write, or exec permission on directory during ADR initialization [d:\oracle\diag\rdbms\cldb12c] [0]
    ORA-48187: specified directory does not exist
    OSD-00002: additional error information O/S-Error: (OS 5) Access is denied.
    The directory exists, but appears to be read-only. I've changed that (just to check), and there's no change except that the permissions are set back to read-only after the attempt. Ideas?

    Is it Vista or 2008, by default in these severs only files have a read only attribute Any changes to the folder's read-only box will only affect the files inside the folder, then the read-only box will default back to blue when you check it again.
    Because the attribute is set on the file level, then unchecking the folder box doesn't remove the Read-Only attribute, Check his note for more understanding and solution.
    Directory Permission Problems While Creating Database On Windows Vista and Windows Server 2008 (Doc ID 838547.1)

  • ORA-00926: missing VALUES keyword

    Hello,
    when i try to start an insert statement at a remote database I m getting the following error message:
    ORA-00926: missing VALUES keyword
    the statement is INSERT INTO <TABLE> VALUES(100,12,01-Dec-10,'ENTRY')
    the table has the following form: COL1 (NUMC), COL2(NUMC, COL3(DATE) COl4 (VARCHAR255)
    i tried to use several formats but i m not getting any solution for inserting. The user i m using has the privileges for inserting.
    has anyone a solution what will be the error?
    Thanks

    Hi,
    Try to use the following format instead:
    INSERT INTO <table_name> (<field1>,<field2>,...) VALUES (<value1>,<value2>,...);
    Br,
    Javier

  • Migration of Database from Oracle to SQL Server in Business Objects XI 3.1

    Hi,
    Currently, We are working on Business Objects XI 3.1 and Database is  Oracle 11g. And now we have the requirement to migrate from Oracle 11g to SQL Server 2008 R2.
    I would like to know what are the key points to be considered in business objects XI 3.1 when the database is migrated from oracle to SQL server.
    If anyone can share the Impact analysis document for Business Objects, it would be great.
    Thanks,
    Lavanyaa TP

    If you use business objects tools for such migration , the impact should be minimal.
    CMSDBCopy mechanism from CCM should work fine for this purpose.

  • Create Type as Object not working in linux oracle 11g

    Pleae refer to the following simple create type as object statement.
    CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER)
    It is working in oracle 11g and windows server 2008 environment.
    But it is not working in oracle 11g with linux environment.
    I am executing this statement as dynamic sql as follows
    CREATE OR REPLACE PROCEDURE TEMP_SP
    AS
    BEGIN
    DECLARE vcType VARCHAR2(30);
    BEGIN
    SELECT OBJECT_TYPE into vcType FROM USER_OBJECTS
    WHERE OBJECT_NAME='EC_VIEWABLETYPES' AND OBJECT_TYPE='TYPE';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER) ';
    COMMIT;
    RETURN;
    END;
    END;
    exec TEMP_SP
    please let me know what i am missing ?

    And error is:ORA-00600: internal error code, arguments: [kothc_uc_md5:lxerr], [], [], [], [], [], [], [], [], [], [], []
    ORA-06512: at "ATIPAGENT.TEMP_SP", line 10
    ORA-01403: no data found
    ORA-06512: at line 1
    ..Query:exec TEMP_SP...Previous Query:CREATE OR REPLACE PROCEDURE TEMP_SP AS BEGIN DECLARE vcType VARCHAR2(30); BEGIN
    SELECT OBJECT_TYPE into vcType FROM USER_OBJECTS
    WHERE OBJECT_NAME='EC_VIEWABLETYPES' AND OBJECT_TYPE='TYPE'; EXCEPTION WHEN NO_DATA_FOUND THEN
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER) ';
    COMMIT;
    RETURN;
    END;
    END;

  • Connecting SQL server from Oracle 11g

    Hello,
    I know there are several threads available to this post but please help me in
    *step by step process to follow in connecting 2 servers.
    I tried everything in internet but got Connection closed error after tnsping of DNS name. Do i need to run any instance sort of thing in SQL server?
    I dont have any access on SQL server.Whatever i have to do that has to be only in Oracle server.I got all those information and created ODBC (using SQL server driver) and tested the connection successfully in Oracle server. Altered INIT*.ORA,TNSNAMES.ORA and LISTENER.ORA but when pinging TNS awfully getting the afore said error.
    My environment : Oracle 11g server - SQL server 2008 ( both in windows platform).
    My
    TNS names entry
    GSIS =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.1)(PORT = 63455))
    (CONNECT_DATA = (SID=GSIS)
    (SERVER = DEDICATED)
    (HS=OK)
    Listener entry
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    (ADDRESS = (PROTOCOL = TCP)(HOST = COB417147.cob.apac.bosch.com)(PORT = 1522))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    (SID_DESC =
    (SID_NAME = GSIS)
    (ORACLE_HOME = C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1)
    (PROGRAM = hsodbc)
    and
    initGSIS
    entry
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = GSIS
    HS_FDS_TRACE_LEVEL = OFF
    # Environment variables required for the non-Oracle system
    #set
    when tnsping i am getting
    TNS connection closed.
    I am awfully stuck here.
    Please guide..

    Status
    C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 11-MAY-2012 17:48
    :14
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date 11-MAY-2012 17:36:30
    Uptime 0 days 0 hr. 11 min. 48 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\network\
    admin\listener.ora
    Listener Log File c:\oracle\app\amk1cob\diag\tnslsnr\COB417147\listener\
    alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=COB417147.cob.apac.bosch.com)(PORT=1
    522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=COB417147.cob.apac.bosch.com)(PORT=8
    080))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "GSIS" has 1 instance(s).
    Instance "GSIS", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl.cob.apac.bosch.com" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.cob.apac.bosch.com" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    TNS ping
    C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>tnsping GSIS
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 11-MAY-2
    012 18:21:55
    Copyright (c) 1997, 2010, Oracle. All rights reserved.
    Used parameter files:
    C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.
    1.1)(PORT = 63455)) (CONNECT_DATA = (SID=GSIS)) (HS=OK))
    TNS-12537: TNS:connection closed
    C:\Oracle\app\amk1cob\product\11.2.0\dbhome_1\BIN>
    BTW it is 32-bit machine.
    Edited by: 933729 on May 11, 2012 5:57 AM

  • PL/SQL ORA-00936 missing expression

    Hello all,
    I'm having an issues and need help with this script... Please help, thanks.
    error:
    ====
    31 32 /
    AST_UPDATED_BY,LAST_UPDATE_LOGIN) values(i,'ERROR_LOG_ID'||i, 'PROCEDURE_NAME'||i||, 'REQUEST_ID' |i||, 'PROCESS_NAME' ||i||, 'ERROR_TYPE'|i|, 'MESSAGE_DETAILS' ||i||, 'ERROR_TIMESTAMP' |i|, 'STATUS' ||i||, 'CREATED_BY' ||i||, 'CREATION_DATE' ||i||, "to_char(last_update_date, 'dd-Mon-yyyy hh:mi:ss')" |i|, 'LAST_UPDATED_BY' ||i||, 'LAST_UPDATE_LOGIN');
    ERROR at line 28:
    ORA-06550: line 28, column 84:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 27, column 1:
    PL/SQL: SQL Statement ignored
    script.
    ====
    declare
    CURSOR c_iostats IS
    SELECT * from XXFRO.XXFRO_ERRORS;
    ERROR_LOG_ID NUMBER;
    PROCESS_NAME VARCHAR2(50);
    ERROR_TYPE VARCHAR2(20);
    STATUS VARCHAR2(20);
    MESSAGE_DETAILS VARCHAR2(2000);
    ERROR_LOG_ID NUMBER;
    PROCEDURE_NAME VARCHAR2(50);
    REQUEST_ID NUMBER;
    PROCESS_NAME VARCHAR2(50);
    ERROR_TYPE VARCHAR2(20);
    MESSAGE_DETAILS VARCHAR2(2000);
    ERROR_TIMESTAMP DATE;
    STATUS VARCHAR2(20);
    CREATED_BY NUMBER;
    CREATION_DATE DATE;
    LAST_UPDATE_DATE DATE;
    LAST_UPDATED_BY NUMBER;
    LAST_UPDATE_LOGIN NUMBER;
    Begin
    for i in 1..1000000 LOOP
    insert into IO_TEST(ERROR_LOG_ID
    ,PROCEDURE_NAME
    ,REQUEST_ID
    ,PROCESS_NAME
    ,ERROR_TYPE
    ,MESSAGE_DETAILS
    ,ERROR_TIMESTAMP
    ,STATUS,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATE_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_LOGIN)
    values(i,'ERROR_LOG_ID'||i, 'PROCEDURE_NAME'||i||, 'REQUEST_ID' |i||, 'PROCESS_NAME' ||i||, 'ERROR_TYPE'|i|, 'MESSAGE_DETAILS' ||i||, 'ERROR_TIMESTAMP' |i|, 'STATUS' ||i||, 'CREATED_BY' ||i||, 'CREATION_DATE' ||i||,'LAST_UPDATE_DATE' ||i||, 'LAST_UPDATED_BY' ||i||, 'LAST_UPDATE_LOGIN');
    END LOOP;
    end;
    Thanks,
    HCDBA

    Hi,
    Why are you using the concat(||) Symbol after i in the expression String 'CREATED_BY' ||i||. When you are padding between
    two text we use so.
    Ex: If you want to concat 'i' between String we use
    DBMS_OUTPUT.PUT_LINE('Five is between '|| i || 'and Six');The Insert Statement should be re-written as
    INSERT INTO io_test
                (error_log_id, procedure_name, request_id,
                 process_name, ERROR_TYPE, message_details,
                 error_timestamp, status, created_by,
                 creation_date, last_update_date,
                 last_updated_by, last_update_login
         VALUES (i, 'ERROR_LOG_ID' || i, 'PROCEDURE_NAME' || i,
                  'REQUEST_ID' || i, 'PROCESS_NAME' || i, 'ERROR_TYPE' || i,
                  'MESSAGE_DETAILS'
                  || i, 'ERROR_TIMESTAMP' || i, 'STATUS' || i,
                  'CREATED_BY' || i, 'CREATION_DATE' || i,
                  'LAST_UPDATE_DATE' || i, 'LAST_UPDATED_BY' || i,
                 'LAST_UPDATE_LOGIN'
                );Thanks,
    Shankar

  • Native SQL Query Error: DBIF_DSQL2_SQL_ERROR -- ORA-00936: missing express

    Hi,
    I tried to read data using the following SQL Query,
    fp_work = 'ABCD'.
      EXEC SQL PERFORMING WRITE_TO_ITAB .
      SELECT fp_code, bank_acc_code, bank_acc_num,
      INTO :gs_cds_data-FP_CODE,
               :gs_cds_data-BANK_ACC_CODE,
               :gs_cds_data-BANK_ACC_NUM,
       FROM  BANK_TABLE
      WHERE fp_code = :fp_wrk
      ENDEXEC.
    *&      Form  WRITE_to_itab
    FORM write_to_itab.
    To move the data into the Internal Table.
      APPEND gs_cds_data TO gt_cds_data.
      CLEAR  gs_cds_data.
    ENDFORM.                    "WRITE_to_itab
    and im getting the run time error..
    What happened?                                                                               
    The error occurred in the current database connection "SAPABC".                                                                               
    How to correct the error                                                                               
    Database error text........: "ORA-00936: missing expression"             
    Triggering SQL statement...: "FETCH NEXT "                               
    Internal call code.........: "[DBDS/NEW DSQL]"                           
    Please check the entries in the system log (Transaction SM21).                                                                               
    You may able to find an interim solution to the problem                  
    in the SAP note system. If you have access to the note system yourself,  
    use the following search criteria:                                                                               
    "DBIF_DSQL2_SQL_ERROR" C                                                                               
    If you cannot solve the problem yourself, please send the                
    following documents to SAP:
    Can anyone give me a solution to correct this error?
    In addition, Can i omit the WHERE clause, as i need to get all the data in the oracle database?

    BUT,
          EXEC SQL.
            connect to :LV_DB_NAME as :sy-uname
          ENDEXEC.
          EXEC SQL.
            SET CONNECTION :sy-uname
          ENDEXEC.
         check sy-subrc..
    connection is happening.. with sy-subrc value as ZERO

  • Issue in Database trigger for HZ_CUSTOMER_PROFILES PL/SQL: ORA-00936: miss

    Hi
    We are trying to create database trigger on update of table HZ_CUSTOMER_PROFILES when CREDIT_HOLD='Y'
    If this update is done from certain operating unit we are inserting into another custom table when compiling trigger we are getting error as given below
    LINE/COL ERROR
    5/2 PL/SQL: SQL Statement ignored
    17/2 PL/SQL: ORA-00936: missing expression
    SQL> l 5
    5*
    SQL> l 17
    17* COUNTRY,
    Copying code used for creating trigger
    CREATE OR REPLACE TRIGGER "APPS"."SDS_CREDIT_HOLD_ROW"
    BEFORE UPDATE ON HZ_CUSTOMER_PROFILES
    FOR EACH ROW
    WHEN ( new.CREDIT_HOLD='Y')
    BEGIN
    IF FND_PROFILE.VALUE('ORG_ID')=3217 THEN
    INSERT INTO SDS.SDS_CREDIT_HOLD
    (CUSTOMER_NAME,
    CUSTOMER_NUMBER,
    ADDRESS,
    CITY,
    COUNTRY,
    HOLD_BY,
    MAIL_LIST1,
    RESP_VALUE,
    ORG_ID,
    MAIL_LIST2)
    VALUES
    (select rc.customer_name,
    rc.customer_number,
    ra.address1,
    ra.city,
    ra.country,
    fu.user_name,
    fu.email_address,
    TO_NUMBER(FND_GLOBAL.RESP_ID),
    TO_NUMBER(fnd_profile.value('ORG_ID')),
    SDS_EMAIL_ADD_FNC('KAMALAKAR.GUDAPAREDDI,BRIAN.MILLER')
    from HZ_CUSTOMER_PROFILES hcp, ra_site_uses rsa,
    ra_addresses ra, ra_customers rc, fnd_user fu,
    (select distinct site_use_id from HZ_CUST_SITE_USES where site_use_code='BILL_TO'
    and status='A') site_acct
    where hcp.status='A'
    and cust_account_id in (select distinct cust_account_id from HZ_CUSTOMER_PROFILES
    where credit_hold='Y'
    and status='A')
    and hcp.site_use_id=rsa.site_use_id (+)
    and rsa.address_id=ra.address_id (+)
    and rsa.site_use_id= site_acct.site_use_id (+)
    and hcp.cust_Account_id=rc.customer_id
    and hcp.credit_hold='Y'
    and hcp.last_updated_by=fu.user_id
    and hcp.CUST_ACCOUNT_PROFILE_ID=:new.CUST_ACCOUNT_PROFILE_ID
    and hcp.ROWID=:new.ROWID);
    END IF;
    -- commit;
    END SDS_CREDIT_HOLD_ROW;
    tried to search for fix in forums checked all columns in select clause and insert they appear to be fine attaching table structure also for reference
    CREATE TABLE SDS_CREDIT_HOLD
    (CUSTOMER_NAME VARCHAR(50),
    CUSTOMER_NUMBER VARCHAR2(30),
    ADDRESS VARCHAR2(240),
    CITY VARCHAR2(60),
    COUNTRY VARCHAR2(60),
    HOLD_BY VARCHAR2(100),
    MAIL_LIST1 VARCHAR2(240),
    RESP_VALUE NUMBER,
    ORG_ID NUMBER,
    MAIL_LIST2 VARCHAR2(240))
    if any hint for fixing this issue it will be highly appreciated
    Thanks
    Kamalakar.G

    Problem is here:
    WHEN ( new.CREDIT_HOLD='Y')
    Should be using a colon in front of any new or old columns in your PL/SQL and SQL, thus try this:
    WHEN ( :new.CREDIT_HOLD='Y')
    FYI: when using triggers (unless you specify otherwise in the trigger definition itself):
    old values are referenced via :old.column and new values via :new.column

  • Error in MERGE statement - ORA-00969: missing ON keyword

    Hi All ,
    I am trying to write a Merge statement , but I am getting the below error .
       MERGE  INTO main_table m
                              USING  tab_1 l, tab_2 u
                              ON  (   l.col1        =  m.col1
                                       AND u.col2 = l.col2)
    When Matched then
    update........
    When not mached then
    Insert  ...... 
    But here I am using 2 tables in the USING clause . and here I am getting  this error :-
    142/17   PL/SQL: SQL Statement ignored
    143/42   PL/SQL: ORA-00969: missing ON keyword
    May I know where i am doing wrong ?

    Hi LuKKa, you are on the Portugues Forum, but we can help you, try the code mentioned below:
       MERGE  INTO main_table m
                              USING  (select l.col1, l.col2, u.col2 from tab_1 l join tab_2 u on (u.col2 = l.col2)) t
                              ON  (t.col1 =  m.col1)
    When Matched then
    update........
    When not mached then
    Insert  ......  
    Regards.

  • JBO-27122:SQL error during statement preparation + ORA-01006:bind variable not exists

    (1) I have built a BC4J View called CallFunctionView which acts as a view i used to call existing PL/SQL functions. My implementation servlet code is presented with the following structure:
    public class MyServlet extends HttpServlet {
    // Get vector element to perform validation for rule 1 and rule 2
    for (int i = 0; i < MyVector.size(); i++) {
    MyVectorRow MyRow = (MyVectorRow) MyVector.elementAt(i);
    MyRow.checkRule1(am, i);
    MyRow.checkRule2(am, i);
    (2) Both checkRule1 and checkRule2 will call the ViewObject CallFunctionView. Related codes for checkRule1 and checkRule2 are listed as follows:
    public void checkRule1(ApplicationModule am, int intRowIndex)
    throws JboException, Exception {
    ViewCdCallFunctionImpl vo = (CallFunctionViewImpl) am.findViewObject("CallFunctionView");
    if (vo == null) {             
    throw new JboException("View Object is null!");
    vo.setQuery("SELECT PKG1.MyFunctionOne(?,?,?,?) FROM DUAL");
    vo.setWhereClauseParam(0, param1); // param1 is string
    vo.setWhereClauseParam(1, param2); // param2 is string
    vo.setWhereClauseParam(2, param3); // param3 is String.valueOf(int)
    vo.setWhereClauseParam(3, param4)); // param4 is String.value Of(int)
    vo.executeQuery(); <- Point of exit where my mentioned error occurs at the second loop
    public void checkRule2(ApplicationModule am, int intRowIndex)
    throws JboException, Exception {
    ViewCdCallFunctionImpl vo = (CallFunctionViewImpl) am.findViewObject("CallFunctionView");
    if (vo == null) {             
    throw new JboException("View Object is null!");
    vo.setQuery("SELECT PKG2.MyFunctionTwo(?,?,?,?) FROM DUAL");
    vo.setWhereClauseParam(0, param1); // param1 is string
    vo.setWhereClauseParam(1, param2); // param2 is string
    vo.setWhereClauseParam(2, param3); // param3 is String.valueOf(int)
    vo.setWhereClauseParam(3, param4)); // param3 is String.valueOf(int)
    vo.setWhereClauseParam(4, (blnYes)?"Y":null);
    vo.setWhereClauseParam(5, (blnYes)?"Y":null));
    vo.executeQuery();
    (3)The called functions are from different package and with different parameters. For the loop i = 0, no error occurs and both functions generates expected result. For execution of the first function in the second loop (when i = 1), error occurs with the following messages(JBO-27122: SQL error during statement preparation. + java.sql.SQLException: ORA-01006: bind variable does not exist):
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT PKG1.MyFunctionOne(?,?,?,?) FROM DUAL
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetImpl.executeQuery()
         void oracle.jbo.server.ViewObjectImpl.executeQuery()
         void MyPkg.objects.MyVectorRow.checkRule1(oracle.jbo.ApplicationModule, int)
         void MyPkg.servlet.MyServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind.util.ThreadPoolThread.run()
    ## Detail 0 ##
    java.sql.SQLException: ORA-01006: bind variable does not exist
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
         void oracle.jdbc.ttc7.TTIoer.processError()
         void oracle.jdbc.ttc7.Oall7.receive()
         void oracle.jdbc.ttc7.TTC7Protocol.doOall7(byte, byte, int, byte[], oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int, oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)
         int oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(oracle.jdbc.dbaccess.DBStatement, byte, byte[], oracle.jdbc.dbaccess.DBDataSet, int, oracle.jdbc.dbaccess.DBDataSet, int)
         void oracle.jdbc.driver.OracleStatement.doExecuteQuery()
         void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()
         int oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()
         java.sql.ResultSet oracle.jdbc.driver.OraclePreparedStatement.executeQuery()
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetImpl.executeQuery()
         void oracle.jbo.server.ViewObjectImpl.executeQuery()
         void MyPkg.objects.MyVectorRow.checkRule1(oracle.jbo.ApplicationModule, int)
         void MyPkg.servlet.MyServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind.util.ThreadPoolThread.run()
    I have tried commented either MyRow.checkRule1 or MyRow.checkRule2 for execution. No error occurs for that. The problem occurs when i put the two together in a loop ... the parameter number for Pkg1.MyFunctionOne is less than Pkg2.MyFunctionTwo, which corresponds to the error message 'Bind variable does not exist' ... any cache for calling the function that causes the error at running the vo.executeQuery statement?
    Question: Does anyone has any ideas about the error origin and solution? (It is very important to me because i still have several check rules in addition to those mentioned 2 rules.)
    Thanks for replying!

    Oic ... thanks for your help, but i find a strange thing. No error message is prompted when i break the loop as follows:
    // Get vector element to perform validation for rule 1 and rule 2
    for (int i = 0; i < MyVector.size(); i++) {
    MyVectorRow MyRow = (MyVectorRow) MyVector.elementAt(i);
    MyRow.checkRule1(am, i);
    // Get vector element to perform validation for rule 1 and rule 2
    for (int i = 0; i < MyVector.size(); i++) {
    MyVectorRow MyRow = (MyVectorRow) MyVector.elementAt(i);
    MyRow.checkRule2(am, i);
    It works, but quite strange ... is it a bug for calling the interface setWhereClauseParam(int, object)? As long as all the bind variables have value (your bind-var array is filled perhaps due to previous setWhereClauseParam, the query will work. What's critical is you get the right query every time :)

  • Migrating from Sql server get SQL Error: ORA-00936: missing expression

    All,
    I'm migrating from Sql Server to oracle 10g and I'm getting a
    "SQL Error: ORA-00936: missing expression" error
    when the following create table statement is executed. It appears 10g does not like the CREATE DEFAULT xxxx as xxx syntax. Any ideas??
    CREATE TABLE EnvCapitalOtherCostAtom (
    EnvID CHAR(36) NOT NULL,
    CapitalID CHAR(36) NOT NULL,
    Seq FLOAT DEFAULT
    CREATE DEFAULT D_Set_To_Zero
         AS 0
    NOT NULL,
    AtomID CHAR(36) DEFAULT
    CREATE DEFAULT D_NewGUID
         AS newid
    NOT NULL,
    AtomName VARCHAR2(100) NOT NULL,
    AtomName_dqa NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_DQA_Dflt
         AS 10
    NOT NULL,
    CreatedOnTimeStamp TIMESTAMP(6) NOT NULL,
    LastEditedOnTimeStamp TIMESTAMP(6) NOT NULL,
    TFDubh_dqa NUMBER(5,0),
    record_flags NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_Record_Flags
         AS 0
    NOT NULL,
    record_dqa NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_Record_DQA
         AS 30
    NOT NULL
    );

    Hi Chris,
    not sure SQL Server accepts the syntax you provided either. Even more I have checked MSDN(http://msdn2.microsoft.com/en-us/library/ms173565.aspx) and they recommend:
    Avoid using CREATE DEFAULT in new development work, and plan to modify applications that currently use it. Instead, use default definitions created using the DEFAULT keyword of ALTER TABLE or CREATE TABLE. CREATE DEFAULT will be removed in a future version of Microsoft SQL Server.
    In Oracle you should do the same either use DEFAULT in CREATE TABLE statement or in ALTER TABLE, have a look at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_constraints.htm#sthref626 for more details.
    The proper Oracle syntax for your DDL should be something like:
    CREATE TABLE EnvCapitalOtherCostAtom (
    EnvID CHAR(36) NOT NULL,
    CapitalID CHAR(36) NOT NULL,
    Seq FLOAT DEFAULT 0 NOT NULL,
    AtomID CHAR(36) DEFAULT SYS_GUID() NOT NULL,
    AtomName VARCHAR2(100) NOT NULL,
    AtomName_dqa NUMBER(5,0) DEFAULT 10 NOT NULL,
    CreatedOnTimeStamp TIMESTAMP(6) NOT NULL,
    LastEditedOnTimeStamp TIMESTAMP(6) NOT NULL,
    TFDubh_dqa NUMBER(5,0),
    record_flags NUMBER(5,0) DEFAULT 0 NOT NULL,
    record_dqa NUMBER(5,0) DEFAULT 30 NOT NULL
    );

  • Oracle stored procedure+ jdbc+java.sql.SQLException: ORA-00936: missing exp

    Here is a chunk of code from my servlet, which is calling a stored procedure...
    String userID  = request.getParameter("hdnUserID");
            String serialNum = "123456789";
            String pinNum = "987654321";
            String cliNum = request.getParameter("txtclinum");
            String price = request.getParameter("txtprice");;
            String creationDate = "";
            String ActivationDate = "";
            String validityMonths = request.getParameter("ddlvaliditymonths");
            String balance = "100";
            String statusId = request.getParameter("ddlstatus");
            String batchId = request.getParameter("ddlbatch");
            String retID = request.getParameter("hdnID");
            String vID = retID;
    xDatabase db = new xDatabase();
             try {
                 CallableStatement pCall = db.m_conDatabase.prepareCall(
                         "{call bil_sp_add_scratch_card_batch(?,?,?,?,?,?,?,?,?,?,?,?)}");
                 pCall.setString(1, retID);
                 pCall.setString(2, serialNum);
                 pCall.setString(3 , pinNum);
                 pCall.setString(4 , cliNum);
                 pCall.setString(5 , price);
                 pCall.setString(6 , creationDate);
                 pCall.setString(7 , ActivationDate);
                 pCall.setString(8 , validityMonths);
                 pCall.setString(9 , statusId);
                 pCall.setString(10 , batchId);
                 pCall.setString(11 , balance);
                 pCall.setString(12 , userID);
                 pCall.executeQuery();
                 //close the statement
                 pCall.close();and here are the stored procedures parameters.. the stored procedure works fine as i tested it manually in oracle..
    create or replace procedure bil_sp_add_Edit_scratch_card
    v_CARD_ID              in         out        varchar2,
    v_CARD_SERIAL_NUM         in        varchar2,
    V_CARD_PIN_NO             in        varchar2,
    V_CLI_NO                  in        varchar2,
    V_CARD_PRICE                  in    varchar2, 
    V_CARD_CREATION_DATE          in    varchar2,
    V_CARD_ACTIVATION_DATE        in    varchar2,
    V_CARD_VALIDITY_MONTHS        in    varchar2,
    V_CARD_STATUS_ID              in    varchar2,
    V_SCRATCH_CARD_BATCH_ID      in    varchar2,
    V_CARD_BALANCE               in    varchar2,
    user_id in         varchar2
    )And i get this exception
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
         at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java)
         at ibill.xDatabase.executeSQL(xDatabase.java:143)
         at org.apache.jsp.iBillForms.scratchCardNewAddEdit_jsp._jspService(org.apache.jsp.iBillForms.scratchCardNewAddEdit_jsp:98)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)I am sending all the required parameters to the procedure then what is the problem?

    OOPPPSssssss..
    Oh GOD is there somebody out there. who would like to kill me..
    The only problem was that i was calling the wrong stored procedure
    :(

Maybe you are looking for

  • RFC system error: Screen output without connection to user

    After running transaction SMWP, we nagivate to the "Parameters for object load management" node using the following path: Runtime Information -> Adapter Status Information -> Parameters in R/3 Backend(s) -> ECC -> Parameters for object load managemen

  • How to give the header condition type in the CRM Sales Order for freight ?

    Hi,      We are creating Sales Order(SO) using FM 'CRMXIF_ORDER_SAVE'.And we are unable to track the FREIGHT condition type in the above FM to pass value.      We want to check this value in CRMD_ORDER tcode.     Pls let us know how to make it possib

  • How can I determine the number and sizes of redologs?

    Dear all, How can I determine the number and sizes of redologs are sufficient to allow redo log switching while hot backup is in progress? Please advice, Amy

  • Unable to upgrade to 6.1 SP4

    I have 2004Q3, SP3 running just fine and tried to install the latest version and unable to get admin server working. Get something like "unable to service this request" and when I look in the logs, there are messages that there was an issue with inde

  • Configuration of Flexible Real Estate Management IN SAP BW. 0REFX_C11,....

    Hi Can someone please help me in configuring Flexible Real Estate Management in SAP BW. I have loaded BUSINESS CONTENT and there are no datasources avaialble to me for for cubes 0REFX_C11, 0REFX_C12 and 0REFX_C14, as well as DSO'S 0REFXDS03, 0REFXDS0