1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Find object quetol.tol_lc_movimientos_pg.movimientos

Discussion in 'SQL PL/SQL' started by alexcol, Oct 16, 2017.

  1. alexcol

    alexcol Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Colombia
    Good Morning I need your help please

    I am new to Oracle, Im not a DBA and I ve tring to figure out this error in a log:

    ERROR in QUETOL.tol_lc_movimientos_pg.movimientos SQLCODE[=ORA-20109:
    ORA-20109: ORA-01422: exact fetch returns more than reques]


    The problem arises I dont even know exactly this error which object references to: ie package, procedure,table,etc

    QUETOL.tol_lc_movimientos_pg.movimientos

    I tried to find this object as a Package but i could not find it


    Code (SQL):
    SQL> SELECT object_name,OBJECT_TYPE,CREATED,STATUS,GENERATED FROM dba_objects
      2  WHERE object_name = 'QUETOL.tol_lc_movimientos_pg.movimientos'
      3  AND object_type = 'PACKAGE';
    no rows selected


    I tried to find as any other object but i didnt get anything

    Code (SQL):
    SQL> SELECT object_name,OBJECT_TYPE,CREATED,STATUS,GENERATED FROM dba_objects
      2  WHERE object_name LIKE '%tol_lc_movimientos_pg.movimi%'
      3  ;

    no rows selected

    I thouht it was a Package so i coul see its DML code.

    I appreciate your help in advanced to identify which Object this log error point to
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    735
    Likes Received:
    145
    Trophy Points:
    830
    Location:
    Russian Federation
    Hi.
    ORA-20109 this user error, not system error.

    ORA-01422 - this system error ,occurs when the condition from the table, retrieved some records and trying to save into a variable.

    getting object:
    Code (Text):

    SELECT * FROM dba_objects os
    WHERE os.OBJECT_TYPE in ( 'PACKAGE BODY','PACKAGE')
    AND os.owner = 'QUETOL';
     
    getting source code:

    Code (Text):

    --spec
    SELECT * FROM dba_source se
    WHERE se.TYPE = 'PACKAGE'
    AND se.owner = 'QUETOL';
    --body
    SELECT * FROM dba_source se
    WHERE se.TYPE = 'PACKAGE BODY'
    AND se.owner = 'QUETOL';

     
    Problem code form in package is " select ... into . ... .. where. .."

    If possible, provide here the package code and we will be able to help.
     
    Last edited: Oct 16, 2017
  3. alexcol

    alexcol Active Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Colombia
    Thank you very much your help. I will get the package code a i will let you know.

    One more question:
    QUETOL.tol_lc_movimientos_pg.movimientos

    To identify each component is:

    QUETOl is the owner right?
    tol_lc_movimientos_pg is the package right?
    movimientos references to a table or a procedure?

    Thanks again
     
  4. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    735
    Likes Received:
    145
    Trophy Points:
    830
    Location:
    Russian Federation
    QUETOL - this is SCHEMA and it is owner on objects

    tol_lc_movimientos_pg - this is package in SCHEMA "QUETOL"

    movimientos - thi is element(procedure/function) in package tol_lc_movimientos_pg