Error while executing procedure

Create PROCEDURE CHECK_DAY (PDATE IN DATE, DAY_FLAG OUT VARCHAR2) IS

   h_dt date;
   t_dt date;
   C_R  VARCHAR2(1);

begin

  DAY_FLAG := 'W';

  SELECT C_R_FLAG INTO C_R FROM TIMEKEEP.HOLIDAY_MAST 
  WHERE H_DATE = PDATE AND C_R_FLAG <>'R' ;

 IF    C_R ='C' THEN
      DAY_FLAG := 'C';
 ELSIF C_R ='W' THEN
                DAY_FLAG := 'W';
 ELSE 
               T_DT := PDATE-1;

      SELECT NEXT_DAY(T_DT,'SATURDAY') INTO  H_DT FROM SYS.DUAL;

     IF (H_DT = PDATE) THEN 
          DAY_FLAG :='A';
     ELSE
          SELECT NEXT_DAY(T_DT,'SUNDAY') INTO  H_DT  FROM SYS.DUAL;

          IF (H_DT = PDATE) THEN 
               DAY_FLAG :='S';
          ELSE
               DAY_FLAG :='W';
          end if;
     end if;

 END IF;

 EXCEPTION when no_data_found then     
     T_DT := PDATE-1;
      SELECT NEXT_DAY(T_DT,'SATURDAY') INTO  H_DT FROM SYS.DUAL;

     IF (H_DT = PDATE) THEN 
          DAY_FLAG :='A';
     ELSE
          SELECT NEXT_DAY(T_DT,'SUNDAY') INTO  H_DT  FROM SYS.DUAL;

          IF (H_DT = PDATE) THEN 
               DAY_FLAG :='S';
          ELSE
               DAY_FLAG :='W';
          end if;
     end if;

end ;

-----------------------------


Create or replace PROCEDURE PREVIOUS_TWO_WORKING_DAY(pno in number,PDATE IN DATE,PRIV_DATE2 OUT DATE) IS

PRV                                     DATE;
PRV1                                   DATE;
DAY_FLAG                            VARCHAR2(1);
ATT_CNT_PRIV_DATE                      NUMBER(2);
ATT_CNT_PRIV_DATE1                       NUMBER(2);
PRIV_DATE1                           date;

BEGIN

PRV    := PDATE;

LOOP
EXIT WHEN ATT_CNT_PRIV_DATE <> 0;
PRV := PRV -1;
CHECK_DAY(PRV,DAY_FLAG);
IF DAY_FLAG = 'W' THEN
SELECT COUNT(*) INTO ATT_CNT_PRIV_DATE FROM TIMEKEEP.PRESENTI_MAST 
WHERE PERS_NO = pno AND DATE_PRE= PRV;
END IF;
END LOOP;
PRIV_DATE1 := PRV;  -- GET FIRST PREVIOUS WORKING DAY 
DAY_FLAG :='';
ATT_CNT_PRIV_DATE := 0;

PRV1      := PRIV_DATE1;

LOOP
EXIT WHEN ATT_CNT_PRIV_DATE1 <> 0;
PRV1 := PRV1 - 1;
CHECK_DAY(PRV1,DAY_FLAG);
IF DAY_FLAG = 'W' THEN
SELECT COUNT(*) INTO ATT_CNT_PRIV_DATE1 FROM TIMEKEEP.PRESENTI_MAST 
WHERE PERS_NO = pno AND DATE_PRE= PRV1;
END IF;
END LOOP;

PRIV_DATE2 := PRV1; -- GET SECOND PREVIOUS WORKING DAY

END;

---------------------------------------------------------------------

Create or Replace procedure dailylog_track is

CURSOR CHK_JOB IS SELECT PERS_NO FROM ARAI.PERSON WHERE WORK_LEFT ='W' 
and SR_JR_OTHER <> 'O';

V_PERS_NO  number(8);
V_MAXDATE  date;
PDATE        date;       
PRIV_DATE2 date;

begin

OPEN CHK_JOB;

LOOP

FETCH CHK_JOB INTO V_PERS_NO;

SELECT MAX(JOB_DATE) INTO V_MAXDATE FROM PM.DAILY_TIMESHEET
WHERE PERS_NO = V_PERS_NO;

PREVIOUS_TWO_WORKING_DAY(v_pers_no,to_date(to_char(sysdate,'dd-mon-yyyy')),PRIV_DATE2);


if V_MAXDATE < PRIV_DATE2 then

INSERT INTO arai.dailylog_person VALUES (V_PERS_NO,V_MAXDATE,to_date(to_char(sysdate,'dd-mon-yyyy')));

end if;

exit when CHK_JOB%notfound;

end loop;

close CHK_JOB;

commit;

end;

---------------------- On Execution of procedure dailylog_track  following error appeares 

SQL>  exec dailylog_track;
BEGIN dailylog_track; END;

                 *
ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
ORA-06512: at "ARAI.CHECK_DAY", line 38
ORA-01403: no data found
ORA-06512: at "ARAI.PREVIOUS_TWO_WORKING_DAY", line 32
ORA-06512: at "ARAI.DAILYLOG_TRACK", line 22
ORA-06512: at line 1
Hi all
Can someone tell me why this is happening? I tried "sysdate" with "to_date (to_char(sysdate,'dd-mon-yyyy'))" but no luck...

I use:

BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.1.0 - Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production


Thanks in advance...

Regd
Percy

Published by: PERCY2 on October 11, 2012 03:53

PERCY2 wrote:
Hi all

Finallay afte number of iterations, I got what it was... Table RECORD. PRESENTI_MAST has a date column DATE_PRE who did not consider himself in where clause. I have DATE_PRE chnged to to_Date (to_char(DATE_PRE,'dd-mon-yyyy')) & error disappeared.

Please ensure that you read the previous posts while ensuring that insert the format of date strings. Your "fix" still has a problem with it if you do not include a string of formatting to the TO_DATE function.

Tags: Database

Similar Questions

  • ORA-06512 while executing procedure.

    CREATE or REPLACE procedure BAKIM.grant_ug as

    cursor uguser_cursor is

    Select ' GRANT SELECT, UPDATE, DELETE, INSERT ONE ' | OWNER: '. ' || OBJECT_NAME | "TO UG_USER; "TEXT of dba_objects

    where type_objet = 'TABLE '.

    AND

    owner = "FCY".

    ORDER BY 1;

    Start

    for l in uguser_cursor

    loop

    run immediately l.TEXT;

    end loop;

    end;

    /

    I'm new to the pl/sql actually it's my first try. I get this error in execute immediate line. procedures was compiled successfully. but it does not work. Any suggestion?

    Thank you

    The statement to execute should not have ";" at the end.

  • Dreamweaver CS5 error - while executing onLoad in Note_onOpen.htm, the following JavaScript e design

    I'm on a Mac and cannot solve this problem. I tried searching all the .dat files in en_US and configuration but do not see when I went through the Terminal I've read that one here that would cause

    While executing onLoad in Note_onOpen.htm design, the following JavaScript error occurred:

    In the file "Notes_onOpen Design": onOpen is undefinedScreen Shot 2013-02-27 at 2.35.33 PM.png

    It seems that your configuration settings are corrupted. Use the documents below to re-create your user preferences.

    http://helpx.Adobe.com/Dreamweaver/KB/restore-preferences-Dreamweaver-CS4-CS5.html

    http://forums.Adobe.com/thread/494811

  • Error while executing script root.sh on the nodes at the RAC 11 g installation

    Hello friends,

    Here, I face an error while I run the root.sh script. During the installation of grid RAC, he asked a few dependencies of prereq. There are several .rpm files that were the prerequisites for this installation. I ignore them and I continued the installation. Now, he finally threw an error when running root.sh script. I tried to install several .rpms acquisition of information from the internet, but always this script does not work here.

    Please, suggest what should I do at this point.

    stuck.png

    You guys could help me out here, how I need to go further.

    Simple google search will give you missing RPM. try to install and see if that solves the problem

    https://gruffdba.WordPress.com/2012/11/06/11gr2-grid-install-clscfg-bin-error-while-loading-shared-libraries-libcap-so-1-cannot-open-shared-object-file/

    Don't forget, you need up-to-date existing deconfig install and run root.sh as mentioned below article

    https://desaitaral.WordPress.com/2011/06/13/Oracle-Linux-6-1-and-libcap-so-1-cannot-open-shared-object/

    Another article with the same question - https://taliphakanozturken.wordpress.com/2013/03/02/clscfg-bin-error-while-loading-shared-libraries-libcap-so-1-cannot-open-shared-object-file/

  • Error while executing the code as user sys

    Hello
    The following code creates a procedure. Although the proc is created successfully, as he tried to run, I get the below error

    ORA-01031: insufficient privileges
    ORA-06512: at "SYS." DBMS_SESSION", line 101
    ORA-06512: at "SYS." MY_TEST_PROC', line 20
    ORA-06512: at line 1


    The proc is created by sys and executed by sys too

    create or replace procedure my_test_proc as
    TYPE CUR1 IS REF CURSOR;
    CURSOR c1 is
    Select ename from SCOTT.emp where rownum < 2;
    v_Name varchar2 (30);
    MY_CUR CUR1;
    STRQRY VARCHAR2 (2000);
    L_PARAM DBMS_SQL. VARCHAR2S;
    THE CNT NUMBER;
    SCOTT V_DATA. EMP % ROWTYPE;
    BEGIN
    STRQRY: = ' SELECT * FROM SCOTT. EMP WHERE 1 = 1 and ((1 = 1) ';)
    CNT: = 0;
    Open c1;
    loop
    Fetch c1 into v_name;
    When exit c1% notfound;
    CNT: = CNT + 1;

    DBMS_SESSION.set_Context ('MY_CTX', 'ENAME_' |) CNT V_NAME);
    STRQRY: STRQRY = | "OR (ENAME = SYS_CONTEXT ("MY_CTX","ENAME_1")';)"

    end loop;
    DBMS_OUTPUT. PUT_LINE(STRQRY ||) ')');

    CLOSE C1;
    END my_test_proc;

    ============================================================

    EXEC my_test_proc;

    Help, please.

    >
    STRQRY: = ' SELECT * FROM SCOTT. EMP WHERE 1 = 1 and ((1 = 1) ';)
    >
    The query above will not work because there is a syntax error.
    Count the number of left and right parentheses.

    Edit your post and use the code and tell us who is line #20.

    My guess is that it's this line

    dbms_session.set_context('MY_CTX','ENAME_' || CNT, V_NAME); 
    

    You don't show any CONTEXT procedure code. DBMS_SESSION. SET_CONTEXT in doc PL/SQL Packages and Types
    See http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sessio.htm#i1010942
    >
    SET_CONTEXT caller must be in the call stack of a procedure that has been associated with the context namespace via a statement of CONTEXT to CREATE. The call stack checking does not reach a limit of DBMS.

  • adpatch error: while executing patch 10218075

    According to metalink solution I apply this hotfix.

    source the environment file:

    options adpatch = /hotpatch

    Here is the error:

    AutoPatch error:
    Incorrect format of the file:

    /U01/Oracle/vis/apps/apps_st/appl/Admin/applprod.txt

    The file has the format ' % 12.0.A by applprod file format
    '
    and this version of AutoPatch requires the format ' % 12.0.A by applprod file format'

    You must check the file
    /U01/Oracle/vis/apps/apps_st/appl/Admin/vis/log/adpatch.log

    to find errors.



    Adpatch log file

    Start of session AutoPatch *.
    AutoPatch version: 12.0.0
    AutoPatch started at the: Monday, June 25, 2012 08:20:02

    APPL_TOP is defined on/u01/oracle/SCREWS/apps/apps_st/appl

    Options = "/hotpatch."

    The value of NLS_LANG environment is: American_America.AL32UTF8
    NLS_LANG value for utility AD run is: AMERICAN_AMERICA. AL32UTF8

    You can be notified by e-mail if an error occurs.
    You want to enable this feature [no]? NO.

    Please enter the batchsize [1000]: 1000


    Please enter the name of the Oracle Applications system what
    APPL_TOP belongs to.

    Application system name must be unique on all Oracle
    Applications of the systems at your site, must be between 1 and 30 characters
    for a long time, can only contain alphanumeric characters and underline characters.
    and must begin with a letter.

    Sample application system names: 'prod', 'test', 'demo' and
    "Development_2.

    Name of the system of applications [SCREW]: SCREW *.


    NOTE: If you do not currently have certain types of installed files
    in this APPL_TOP, you may not be able to perform certain tasks.

    Example 1: If you do not have the files used for installation or upgrade
    the database has been installed in this area, you can install or upgrade
    the database of this APPL_TOP.

    Example 2: If you do not have the form files installed in this area, you can't
    generate or run them from this APPL_TOP.

    Example 3: If you have not installed in this area, the simultaneous program files
    You cannot connect concurrent programs or generate reports of this APPL_TOP.


    You currently have files used for the installation or the upgrade of the database
    installed in this APPL_TOP [YES]? YES *.


    You currently have HTML and Java files to HTML-based features
    installed in this APPL_TOP [YES]? YES *.


    You currently have files installed Oracle Applications form
    in this APPL_TOP [YES]? YES *.


    You have now installed the simultaneous program files
    in this APPL_TOP [YES]? YES *.


    Please enter the name of Oracle Applications will use to identify this APPL_TOP.

    The name APPL_TOP you select must be unique within an Oracle Applications
    System, must be between 1 and 30 characters long, may contain only the
    alphanumeric and underscore characters and must start with a letter.

    APPL_TOP sample names: "prod_all", "demo3_forms2" and "forms1.

    APPL_TOP name [r12]: r12 *.



    You are about to apply a patch for the installation of the Oracle Applications
    in your database to ORACLE "SCREW".
    using ORACLE executable files in ' / u01/oracle/VIS/apps/tech_st/10.1.2'.

    This is the database correct [Yes]? Yes

    AutoPatch needs the password for your schema ORACLE 'SYSTEM '.
    to determine the configuration of your installation.

    Enter the password for your schema ORACLE 'SYSTEM ': *.


    Connecting to the SYSTEM... Successfully connected.

    The ORACLE username specified below for Application Object Library
    uniquely identifies your existing product group: APPLSYS

    Enter the password of ORACLE Application Object Library [APPS]: *.

    AutoPatch checks your name of user and password.
    Connecting to APPLSYS... Successfully connected.

    The status of the different features in this performance of the AutoPatch is:

    <-feature version in - >
    Function Active? Flags of APPLTOP data model
    ------------------------------ ------- -------- ----------- -----------
    CHECKFILE Yes 1 1 O N N O N O
    PREREQ Yes 6 6 O N N O N O
    CONCURRENT_SESSIONS NO. 2 2 Y O N Y O N
    PATCH_TIMING Yes 2 2 O N N O N O
    PATCH_HIST_IN_DB Yes 6 6 O N N O N O
    SCHEMA_SWAP Yes 1 1 O N N Y Y Y
    JAVA_WORKER Yes 1 1 O N N O N O
    CODELEVEL Yes 1 1 O N N O N O



    Connecting to the SYSTEM... Successfully connected.

    Connecting to APPLSYS... Successfully connected.

    The current session identifier is 542215

    Product file information...

    AutoPatch error:
    Incorrect format of the file:

    /U01/Oracle/vis/apps/apps_st/appl/Admin/applprod.txt

    The file has the format ' % 12.0.A by applprod file format
    '
    and this version of AutoPatch requires the format ' % 12.0.A by applprod file format'

    You must check the file
    /U01/Oracle/vis/apps/apps_st/appl/Admin/vis/log/adpatch.log

    to find errors.


    Start of session AutoPatch *.
    AutoPatch version: 12.0.0
    AutoPatch started at the: Monday, June 25, 2012 16:02:34

    APPL_TOP is defined on/u01/oracle/SCREWS/apps/apps_st/appl

    Options = "/hotpatch."

    The value of NLS_LANG environment is: American_America.AL32UTF8
    NLS_LANG value for utility AD run is: AMERICAN_AMERICA. AL32UTF8


    Backup restart files, as appropriate. Fact.


    Your previous session to autopatch did not stand up to the end.
    You want to continue your previous session to AutoPatch [Yes]? NO.

    You have chosen to ignore your previous session AutoPatch
    and restart the AutoPatch early.

    ------------------------------------------------------------------------
    If you partially applied a hotfix, you should continue with your
    AutoPatch previous session until it completes successfully.

    If you try to re - apply a patch you applied only partially,
    AutoPatch can apply the patch incorrectly.
    ------------------------------------------------------------------------

    Enter Yes to confirm that you want to replace your old
    AutoPatch session and start a new session of autopatch.

    Enter number to continue with your previous session AutoPatch. [No.]: Yes

    You can be notified by e-mail if an error occurs.
    You want to enable this feature [no]? NO.

    Please enter the batchsize [1000]: 1000


    Please enter the name of the Oracle Applications system what
    APPL_TOP belongs to.

    Application system name must be unique on all Oracle
    Applications of the systems at your site, must be between 1 and 30 characters
    for a long time, can only contain alphanumeric characters and underline characters.
    and must begin with a letter.

    Sample application system names: 'prod', 'test', 'demo' and
    "Development_2.

    Name of the system of applications [SCREW]: SCREW *.


    NOTE: If you do not currently have certain types of installed files
    in this APPL_TOP, you may not be able to perform certain tasks.

    Example 1: If you do not have the files used for installation or upgrade
    the database has been installed in this area, you can install or upgrade
    the database of this APPL_TOP.

    Example 2: If you do not have the form files installed in this area, you can't
    generate or run them from this APPL_TOP.

    Example 3: If you have not installed in this area, the simultaneous program files
    You cannot connect concurrent programs or generate reports of this APPL_TOP.


    You currently have files used for the installation or the upgrade of the database
    installed in this APPL_TOP [YES]? YES *.


    You currently have HTML and Java files to HTML-based features
    installed in this APPL_TOP [YES]? YES *.


    You currently have files installed Oracle Applications form
    in this APPL_TOP [YES]? YES *.


    You have now installed the simultaneous program files
    in this APPL_TOP [YES]? YES *.


    Please enter the name of Oracle Applications will use to identify this APPL_TOP.

    The name APPL_TOP you select must be unique within an Oracle Applications
    System, must be between 1 and 30 characters long, may contain only the
    alphanumeric and underscore characters and must start with a letter.

    APPL_TOP sample names: "prod_all", "demo3_forms2" and "forms1.

    APPL_TOP name [r12]: r12 *.



    You are about to apply a patch for the installation of the Oracle Applications
    in your database to ORACLE "SCREW".
    using ORACLE executable files in ' / u01/oracle/VIS/apps/tech_st/10.1.2'.

    This is the database correct [Yes]? Yes

    AutoPatch needs the password for your schema ORACLE 'SYSTEM '.
    to determine the configuration of your installation.

    Enter the password for your schema ORACLE 'SYSTEM ': *.


    Connecting to the SYSTEM... Successfully connected.

    The ORACLE username specified below for Application Object Library
    uniquely identifies your existing product group: APPLSYS

    Enter the password of ORACLE Application Object Library [APPS]: *.

    AutoPatch checks your name of user and password.
    Connecting to APPLSYS... Successfully connected.

    The status of the different features in this performance of the AutoPatch is:

    <-feature version in - >
    Function Active? Flags of APPLTOP data model
    ------------------------------ ------- -------- ----------- -----------
    CHECKFILE Yes 1 1 O N N O N O
    PREREQ Yes 6 6 O N N O N O
    CONCURRENT_SESSIONS NO. 2 2 Y O N Y O N
    PATCH_TIMING Yes 2 2 O N N O N O
    PATCH_HIST_IN_DB Yes 6 6 O N N O N O
    SCHEMA_SWAP Yes 1 1 O N N Y Y Y
    JAVA_WORKER Yes 1 1 O N N O N O
    CODELEVEL Yes 1 1 O N N O N O



    Connecting to the SYSTEM... Successfully connected.

    Connecting to APPLSYS... Successfully connected.

    The current session identifier is 542216

    Product file information...

    AutoPatch error:
    Incorrect format of the file:

    /U01/Oracle/vis/apps/apps_st/appl/Admin/applprod.txt

    The file has the format ' % 12.0.A by applprod file format
    '
    and this version of AutoPatch requires the format ' % 12.0.A by applprod file format'

    You must check the file
    /U01/Oracle/vis/apps/apps_st/appl/Admin/vis/log/adpatch.log

    to find errors.



    Thanks and greetings
    Surendra

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    898768 wrote:
    According to metalink solution I apply this hotfix.

    What is the doc of MOS?

    AutoPatch error:
    Incorrect format of the file:

    /U01/Oracle/vis/apps/apps_st/appl/Admin/applprod.txt

    The file has the format ' % 12.0.A by applprod file format
    '
    and this version of AutoPatch requires the format ' % 12.0.A by applprod file format'

    Have you downloaded the correct version that applies to your operating system and applications of output?

    Please also see the solution in (Incorrect File Format: Applcust.Txt - the file has the format ' % applcust queue format 11.5.A^M' [1300257.1 ID]).

    Thank you
    Hussein

  • Error while executing the FilterImplementor

    Hello

    I created a cutom component and try to substitute class FilterImplementor for the CheckIn event. During the Check-In of new content, I get the following error message

    Content Server request failed

    The content item was not successfully verified. Impossible to filter 'NBNCustomVersion.CheckinFilter' of type 'validateStandard '. Failed to instantiate class code java to 'NBNCustomVersion.CheckinFilter' instead of 'NBNCustomVersion.CheckinFilter '.

    Please let me know how I can fix the problem.

    Thank you
    Sarang

    Problem is probably caused by your java class custom not being is not in the path. Check the following points:

    Java component classes are located in the: CustomComponent\classess\NBNCustomVersion\CheckinFilter.class while your java package name is NBNCustomVersion and the class name is CheckinFilter

    File CustomComponent.hda contains the line: classpath = $COMPONENT_DIR/classes (for the 11.1.1.6 Server)

    or

    File CustomComponent.hda contains the line: classpath = $COMPONENT_DIR/classes/NBNCustomVersion (for 11.1.1.5 server and earlier versions)

    and that you have restarted Content Server after any change of component.

    It could be another problem, but it is the first to check.

    Kind regards
    Boris

  • Date format error when executing procedure

    Hello

    Oracle9i

    Table A TIME column with the data type date.

    In the table a TIME column has values in the format mm/dd/yyyy hh: mm:

    Trying to run the procedure (with the date of value as an input parameter) to retrieve the records from the table above A, but get the error below:

    get_product_details (17012, TO_DATE (24/10/2020,' dd/mm/yyyy hh), TO_DATE (26/10/2020,' dd/mm/yyyy hh: mm :), v_cur);)

    ORA-01810: put the code appears twice
    ORA-06512: at "SYS." STANDARD line", 231
    ORA-06512: at line 14

    Concerning

    "mm/dd/yyyy hh: mm:

    For month MM, for the minutes of use MI. And the literal must also be in quotes.

    (also, your format mask has the component "hour", but the literal is not...?)

  • Error while executing a script from the command prompt

    Hello, I edited the settings file and I am trying to execute an interface that links the two tables in the HR schema and load into a table in the different schema. I am able to run it in the designer, but I get an error message when I try to run through the command prompt.
    Here is the error message when I try to run it
    09/09/2009-11:58:42 AM (hand): session for scenario creation: DEMO_INTERFACE - 001

    09/09/2009-11:58:42 AM (hand): Session: 88010 is running
    com.sunopsis.core.SnpsInexistantObjectException: there is no link for this
    pair logical schema/context: HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContex
    t (SnpConnect.Java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect (SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst (SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst (SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand (DwgCommandScenar
    IO. Java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i (e.java)
    at com.sunopsis.dwg.cmd.e.y (e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd (DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main (DwgJv.java)
    at oracle.odi.Agent.main (Agent.java)
    09/09/2009-11:58:43 AM (hand): Session: 88010 completed with return code:-1
    com.sunopsis.core.SnpsInexistantObjectException: there is no link for this
    pair logical schema/context: HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContexur
    t (SnpConnect.Java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect (SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst (SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst (SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand (DwgCommandScenar
    IO. Java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i (e.java)
    at com.sunopsis.dwg.cmd.e.y (e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd (DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main (DwgJv.java)
    at oracle.odi.Agent.main (Agent.java)
    DwgJv.main: output. Return code:-1

    Thank you for your help.
    Murielle

    Are you sure about the configuration of odiparams.bat?

  • "WARNING: compiled, but with compilation errors" when executing procedure.

    Hi all, I am so new plsql. This code has been compiled, but there was a warning. I guess that I'm missing a small question as semicolon but since im new I couldn't see what is the problem.

    CREATE or REPLACE procedure BAKIM.grantt_uguser as

    cursor synn is

    Select 'CREATE a PUBLIC SYNONYM' | object_name |' for '. owner: '. ' || object_name dba_objects TXT

    where owner = 'DS' and object_type in ('INDEX', 'PROCEDURE', 'TABLE', 'FUNCTION', 'SEE', 'TRIGGER', 'SEQUENCE', 'PACKAGE')

    and

    object_name not in (select table_name from dba_synonyms where owner = "FCY");

    Start

    for li in synn

    loop

    immediately run li. TXT;

    end loop;

    end;

    /

    Right.  When you use SQL, you privileges through roles are available.  When PL/SQL is running, your own roles aren't usually in fact, if we were to be granted directly to the owner of the stored procedure privileges on objects (there are few exceptions to this, but do not worry for this discussion).

  • Error while executing command discoveryArrays: NetApp SnapMirror

    Hello

    When you set up the table managers in SRM I get the following message is displayed: "error during execution of the discoveryArrays command.   I checked that the NetApp SRA installed perl scripts in the directory (C:\Program VMware Site Recovery Manager\scripts\SAN\ONTAP).   At first, I thought it was a permissions problem, but I also checked that SRM admin account has local admin on the VC box as well as in VC & MRS.  I use a NetApp V6080 file server and also checked the credentials of file server that I use to add a table Manager.  Has anyone encountered this problem?  Thanks in advance.

    Environment: MRS. NetApp SRA 1.0.1 1.0.1

    You must change the settings 'trusted.hosts' on the NetApp Board to include the IP address of the server that is running the adapter (that would be the Server Protection SRM) SRM

    To do this, ssh or telnet on the NetApp array and run

    options trusted.hosts

    no doubt it is empty or does contain address of your SRM Server

    Add the address with the same commands, i.e. If the address is 10.1.2.3 then

    options trusted.hosts 10.1.2.3

    If there is already a configured address, adds 10.1.2.3 as input separated by commas.

    Rerun the discovery of the SRM and I hope that it will work.

  • Error starting &amp; quot; while executing onLoad in Design Notes_onOpen.htm...

    I use Dreamweaver CS3 on Vista.

    Yesterday I started getting the error "while executing onLoad in design Notes_onOpen.htm, a JavaScript error occurred."

    The error appears twice at the start and then it pops up twice, whenever I open a document and twice every time I close a document.

    I have not found much looking for an answer on that. I tried to search through these files and who don't will bring me no part either.

    Help, please. Thank you!

    Thank you! Deleting the .dat file did the trick

  • Error when performing procedure a TOAD that contains the parameter and dblink

    Hi all
    I get the error while executing the following code in the TOAD and APEX.

    It contains the parameter (start_date and end_date) and dblink (@TO_FUT).
    When I hardcode the values of the parameters, it works very well.
    When I give values hard-coded in the procedure, the error comes.
    When I commented that the lines as much as setting comes, the error always comes.

    I don't know if it's parameter problem or question dblink or some other problem

    Everyone is having no idea about this error?
    Your help is very appreciated.

    Code:
    CREATE OR REPLACE PROCEDURE PROC_ENR_ACC (START_DATE, END_DATE DATE DATE)
    AS
    BEGIN
    RUN IMMEDIATELY 'TRUNCATE TABLE OUTPUT_TABLE;
    INSERT INTO OUTPUT_TABLE
    (FIRST_NAME, LAST_NAME, HIDDEN, EFF_DT, CID, PLAN, FLAG)
    SELECT
    TEMP1. FIRST NAME,
    TEMP1. LAST_NAME,
    TEMP1. HIDDEN,
    TEMP1. EFF_DT,
    TEMP1. CID,
    TEMP1. PLAN,
    NVL ((SELECT ' Y'))
    OF FADMIN. MEMI_TABLE@TO_FUT MCQUEEN
    WHERE MCQUEEN. MEME_CK = TEMP1. MEME_CK
    AND MCQUEEN. TXN_EFF_DT = TEMP1. EFF_DT
    AND MCQUEEN. PBP = TEMP1. PLAN
    AND MCQUEEN. MEMI_TXN_CD IN ('AC', ARE ')
    AND MCQUEEN. MEMI_SEQ_NO = (SELECT MAX (MI. MEMI_SEQ_NO)
    OF FADMIN. MEMI_TABLE@TO_FUT MI
    WHERE MI. MEME_CK = MOUGEOT. MEME_CK
    AND MI. TXN_EFF_DT = MOUGEOT. TXN_EFF_DT
    AND MI. PBP = MOUGEOT. PBP
    AND MI. MEMI_TXN_CD IN ('AC', ARE ')
    AND MI. (MEMI_INTF_STS = 03)), 'N') AS FLAG
    Of
    (SELECT
    M1. FIRST NAME,
    M1. LAST_NAME,
    M1. HIDDEN,
    M1. EFF_DT,
    M1. CID,
    M1. PLAN,
    (SELECT THE SAME. MEME_CK
    OF FADMIN. EVEN MEME_TABLE@TO_FUT, FADMIN. GRGR_TABLE@TO_FUT CHRISTIAN
    WHERE EVEN. M_HIN = M1. HID
    AND EVEN. GRGR_CK = CHRISTIAN. GRGR_CK
    AND CHRISTIAN. GRGR_ID = M1. GRGR_ID
    ) AS MEME_CK
    OF FADMIN. METR_TABLE@TO_FUT M1,
    (SELECT M3. HIDDEN, M3. FADMIN EFF_DT. METR_TABLE@TO_FUT M3
    WHERE M3. TYPE IN ('60 ', ' 61')
    AND M3. RESPONSE TO ('117 ', ' 118')
    AND TRUNC (M3. METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
    AND M3. SYIN_INST = (SELECT MAX (M4. SYIN_INST)
    OF FADMIN. METR_TABLE@TO_FUT M4
    WHERE M4. HID = M3. HID
    AND M4. TYPE IN ('60 ', ' 61')
    AND M4. RESPONSE TO ('117 ', ' 118')
    AND TRUNC (M4. EFF_DT) = TRUNC (M3. EFF_DT))
    ) TEMP
    WHERE M1. TYPE IN ('60 ', ' 61')
    AND M1. RESPONSE = "011"
    AND TRUNC (M1. METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
    AND M1. SYIN_INST = (SELECT MAX (M2. SYIN_INST)
    OF FADMIN. METR_TABLE@TO_FUT M2
    WHERE M2. HID = M1. HID
    AND M2. TYPE IN ('60 ', ' 61')
    AND M2. RESPONSE = "011"
    AND TRUNC (M2. EFF_DT) = TRUNC (M1. EFF_DT))
    AND M1. HID = TEMP. HID (+)
    AND M1. EFF_DT = TEMP. EFF_DT (+)
    AND TEMP. HIDDEN IS NULL
    --------
    UNION
    --------
    SELECT
    M1. FIRST NAME,
    M1. LAST_NAME,
    M1. HIDDEN,
    M1. EFF_DT,
    M1. CID,
    M1. PLAN,
    (SELECT THE SAME. MEME_CK
    OF FADMIN. EVEN MEME_TABLE@TO_FUT, FADMIN. GRGR_TABLE@TO_FUT CHRISTIAN
    WHERE EVEN. M_HIN = M1. HID
    AND EVEN. GRGR_CK = CHRISTIAN. GRGR_CK
    AND CHRISTIAN. GRGR_ID = M1. GRGR_ID
    ) AS MEME_CK

    OF FADMIN. METR_TABLE@TO_FUT M1
    WHERE M1. TYPE IN ('60 ', ' 61')
    AND M1. RESPONSE TO ('016', '017', '022', ' 023')
    AND TRUNC (M1. METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
    AND M1. SYIN_INST = (SELECT MAX (M2. SYIN_INST)
    OF FADMIN. METR_TABLE@TO_FUT M2
    WHERE M2. HID = M1. HID
    AND M2. TYPE IN ('60 ', ' 61')
    AND M2. RESPONSE TO ('016', '017', '022', ' 023')
    AND TRUNC (M2. EFF_DT) = TRUNC (M1. EFF_DT))
    ) TEMP1;
    END;
    /

    The error:
    ORA-00918: column ambiguously defined
    ORA-02063: preceding the line of TO_FUT
    ORA-06512: at "PROC_ENR_ACC", line 5
    ORA-06512: at line 5

    Good,

    Please can just as a test you try this and see what happens

    WITH variables AS
    (SELECT /*+ MATERIALIZE */
            TO_DATE(:START_DATE) start_date,
            TO_DATE(:END_DATE) end_date
     FROM dual)
        SELECT   TEMP1.FIRST_NAME,
                TEMP1.LAST_NAME,
                TEMP1.HID,
                TEMP1.EFF_DT,
                TEMP1.CID,
                TEMP1.PLAN,
                NVL (
                     (SELECT   'Y'
                      FROM   MEMI_TABLE MEMI
                      WHERE       MEMI.MEME_CK = TEMP1.MEME_CK
                      AND MEMI.TXN_EFF_DT = TEMP1.EFF_DT
                      AND MEMI.PBP = TEMP1.PLAN
                      AND MEMI.MEMI_TXN_CD IN ('AC', 'RE')
                      AND MEMI.MEMI_SEQ_NO = (SELECT   MAX (MI.MEMI_SEQ_NO)
                                              FROM   MEMI_TABLE MI
                                              WHERE   MI.MEME_CK = MEMI.MEME_CK
                                              AND MI.TXN_EFF_DT = MEMI.TXN_EFF_DT
                                              AND MI.PBP = MEMI.PBP
                                              AND MI.MEMI_TXN_CD IN ('AC', 'RE')
                                              AND MI.MEMI_INTF_STS = 03)
                      ),'N') FLAG
       FROM (SELECT   M1.FIRST_NAME,
                      M1.LAST_NAME,
                      M1.HID,
                      M1.EFF_DT,
                      M1.CID,
                      M1.PLAN,
                      (SELECT   MEME.MEME_CK
                       FROM   MEME_TABLE MEME, GRGR_TABLE GRGR
                       WHERE       MEME.M_HIN = M1.HID
                       AND MEME.GRGR_CK = GRGR.GRGR_CK
                       AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
             FROM   METR_TABLE M1,
                    (SELECT   M3.HID, M3.EFF_DT
                     FROM   METR_TABLE M3
                     WHERE   M3.TYPE IN ('60', '61')
                     AND M3.REPLY IN ('117', '118')
                     AND TRUNC (M3.METR_TRANS_DT) BETWEEN (SELECT start_date FROM variables) AND  (SELECT end_date FROM variables)
                     AND M3.SYIN_INST = (SELECT   MAX (M4.SYIN_INST)
                                         FROM   METR_TABLE M4
                                         WHERE   M4.HID = M3.HID
                                         AND M4.TYPE IN ('60', '61')
                                         AND M4.REPLY IN ('117', '118')
                                         AND TRUNC (M4.EFF_DT) = TRUNC (M3.EFF_DT))
                     ) TEMP
             WHERE   M1.TYPE IN ('60', '61') AND M1.REPLY = '011'
             AND TRUNC (M1.METR_TRANS_DT) BETWEEN (SELECT start_date FROM variables) AND  (SELECT end_date FROM variables)
             AND M1.SYIN_INST = (SELECT   MAX (M2.SYIN_INST)
                                 FROM   METR_TABLE M2
                                 WHERE       M2.HID = M1.HID
                                 AND M2.TYPE IN ('60', '61')
                                 AND M2.REPLY = '011'
                                 AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
            AND M1.HID = TEMP.HID(+)
            AND M1.EFF_DT = TEMP.EFF_DT(+)
            AND TEMP.HID IS NULL
            UNION
            SELECT   M1.FIRST_NAME,
                     M1.LAST_NAME,
                     M1.HID,
                     M1.EFF_DT,
                     M1.CID,
                     M1.PLAN,
                     (SELECT   MEME.MEME_CK
                      FROM   MEME_TABLE MEME, GRGR_TABLE GRGR
                      WHERE       MEME.M_HIN = M1.HID
                      AND MEME.GRGR_CK = GRGR.GRGR_CK
                      AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
            FROM   METR_TABLE M1
            WHERE   M1.TYPE IN ('60', '61')
            AND M1.REPLY IN ('016', '017', '022', '023')
            AND TRUNC (M1.METR_TRANS_DT) BETWEEN (SELECT start_date FROM variables) AND  (SELECT end_date FROM variables)
            AND M1.SYIN_INST = (SELECT   MAX (M2.SYIN_INST)
                                FROM   METR_TABLE M2
                                WHERE   M2.HID = M1.HID
                                AND M2.TYPE IN ('60', '61')
                                AND M2.REPLY IN ('016', '017', '022', '023')
                                AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
            ) TEMP1;
    END;
    

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • ORA-900 sql not valid reporting error while calling the optimize_index pl/sql procedure


    Hi Experts,

    I'm on Oracle 11.2.0.3 on Linux and I have installed in my database Oracle text. I want to configure annex dbms_job to optimize my oracle text index. So first, I created a pl/sql procedure to optimize indexes. It gives me error ORA-900, but the sql even if I run in sqlplus works very well! Can you please help me the question is to find:

    Here is the procedure:

    (Either incidentally CTXAPP role has been granted in the schema where these Oracle text indexes are created and where the below procedure to optimize the index is running.)

    CREATE OR REPLACE PROCEDURE optimize_ora_txt_indexes_debug
    IS
       CURSOR cur_context_indexes
       IS
            SELECT index_name
              FROM user_indexes
             WHERE index_type = 'DOMAIN'
        AND ROWNUM<2  
        ORDER BY INDEX_NAME;
       v_user         VARCHAR2 (30);
       v_pod          VARCHAR2 (30);
       v_start_time   TIMESTAMP;
       v_end_time     TIMESTAMP;
       v_elapsed      VARCHAR2 (40);
       v_msg   VARCHAR2 (1000);
       v_error_code      NUMBER;
       v_error_msg   VARCHAR2 (1000);
       v_sql VARCHAR2 (1000);
    BEGIN
    
       FOR c IN cur_context_indexes
       LOOP
          BEGIN
            v_sql:= 'ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||')';
            dbms_output.put_line(v_sql);
            execute immediate v_sql;
          EXCEPTION
             WHEN OTHERS
             THEN
                v_error_code := SQLCODE;
                v_error_msg := SQLERRM;
                v_msg :=
                      'Error while optimizing the index '
                   || c.index_name
                   || ' '
                   || TO_CHAR (v_error_code)
                   || ' '
                   || v_error_msg;
                DBMS_OUTPUT.put_line (v_msg);
    
          END;
       END LOOP;
    
    EXCEPTION
       WHEN OTHERS
       THEN
          v_error_code := SQLCODE;
          v_error_msg := SQLERRM;
          v_msg :=
                'Error while in the optimize index procedure'
             || ' '
             || TO_CHAR (v_error_code)
             || ' '
             || v_error_msg;
          DBMS_OUTPUT.put_line (v_msg);
    
    END optimize_ora_txt_indexes_debug;
    /
    
     --the procedure compiles successfully. 
     Now when I run it , I get the error:
    SQL>exec optimize_ora_txt_indexes_debug;
    ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL')
    Error while optimizing the index ACCESS_CLNT_IDX04 -900 ORA-00900: invalid SQL
    statement
    
    
     --When I run the same command from sqlplus as execute statement , it works fine:
    SQL>exec ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL');
    PL/SQL procedure successfully completed.
     
     
    
    
    

    If everything runs from sqlplus, but fails in plsql... I'll be very grateful for pointers solve the problem.

    Thanks,

    OrauserN

    Hello

    It is a problem of pl/sql syntax. A call with EXEC is the same using BEGIN... Code of... END of block;

    SO, you need to include a beginning and an end to your call:

     v_sql:= 'BEGIN ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||'); END;';
    

    That's all.

    Herald tiomela

    http://htendam.WordPress.com

  • Error, while the creation and execution of stored procedure

    Hello

    I'm creating a procedure stored and discovered during the compilation and execution of procedure.

    CREATE OR REPLACE PROCEDURE procTEST
    AS
    BEGIN
    WITH
    AS Report1
    (
    SELECT * FROM Employee
    )

    SELECT * FROM REPORT1

    END;
    /

    ERROR when compiling

    -------------------------------

    PROCTEST update procedure

    Errors: Newspaper the compiler check

    ERROR when executing

    ---------------------------------

    PROCTEST update procedure

    Errors: Newspaper the compiler check
    Error from line: 15 command.
    EXEC procTEST
    Error report-
    ORA-06550: line 1, column 7:
    PLS-00905: object SYSTEM. PROCTEST is not valid
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:

    Hello

    user13360241 wrote:

    I want to insert values into the table tmpemployees.

    Insert into tmpemployees

    Select * from Report1

    CREATE OR REPLACE PROCEDURE procTEST
    AS
    BEGIN
    WITH
    AS Report1
    (
    SELECT * FROM Employee
    )

    Insert into tmpemployees

    SELECT * FROM REPORT1

    END;
    /

    I see.  Then, there is no need to use the PL/SQL.  All you need is:

    INSERT INTO tempemployees

    SELECT *.

    OF REPORT1.

    (assuming that the columns match Report1 tempemployees... It is best to explicitly list the individual columns, like this:

    INSERT INTO tempemployees (employyee_id, first_name,...)

    SELECT (col_1, col_2,...)

    OF REPORT1.

    )

    If you need to use the PL/SQL for a reason, you could use the exact same INSERT statement in PL/SQL:

    CREATE OR REPLACE PROCEDURE proctest

    AS

    BEGIN

    INSERT INTO tempemployees (employyee_id, first_name,...)

    SELECT (col_1, col_2,...)

    OF REPORT1.

    END proctest;

    /

    DISPLAY ERRORS

Maybe you are looking for