Package procedure in invalid state

Hi all,
We are having an application in C# and backend oracle 10g placed in Location1.
There is modification in Packaged procedure. So we remotely (from Location2) connected to Location1 and that Packaged procedure is created.
This Packaged procedure has been created (in Location1 ) without any errors. But this procedure is in INVALID state. We tried to compile it remotely by using following statements, but still this is in invalid state .
ALTER PACKAGE my_package COMPILE;
ALTER PACKAGE my_package COMPILE BODY;
If we run this package and package body manually, without any modifications after creating it remotly, it is becoming VALID state.
I am not getting any idea, why it is creating in INVALID state. Any help is appreciated.
Thanks in advance,
Pal

Ok, here's a previous response that I gave re. packages and their "states". Should give you a good idea what a state is...
Packages tend to fail because of their "package state". A package has a "state" when it contains package level variables/constants etc. and the package is called. Upon first calling the package, the "state" is created in memory to hold the values of those variables etc. If an object that the package depends upon e.g. a table is altered in some way e.g. dropped and recreated, then because of the database dependencies, the package takes on an INVALID status. When you next make a call to the package, Oracle looks at the status and sees that it is invalid, then determines that the package has a "state". Because something has altered that the package depended upon, the state is taken as being out of date and is discarded, thus causing the "Package state has been discarded" error message.
If a package does not have package level variables etc. i.e. the "state" then, taking the same example above, the package takes on an INVALID status, but when you next make a call to the package, Oracle sees it as Invalid, but knows that there is no "state" attached to it, and so is able to recompile the package automatically and then carry on execution without causing any error messages. The only exception here is if the thing that the package was dependant on has changes in such a way that the package cannot compile, in which case you'll get an Invalid package type of error.
And if you want to know how to prevent discarded package states....
Move all constants and variables into a stand-alone package spec and reference those from your initial package. Thus when the status of your original package is invlidated for whatever reason, it has no package state and can be recompiled automatically, however the package containing the vars/const will not become invalidated as it has no dependencies, so the state that is in memory for that package will remain and can continue to be used.
As for having package level cursors, you'll need to make these local to the procedures/functions using them as you won't be able to reference cursors across packages like that (not sure about using REF CURSORS though.... there's one for me to investigate!)
This first example shows the package state being invalided by the addition of a new column on the table, and causing it to give a "Package state discarded" error...
SQL> set serveroutput on
SQL>
SQL> create table dependonme (x number)
  2  /
Table created.
SQL>
SQL> insert into dependonme values (5)
  2  /
1 row created.
SQL>
SQL> create or replace package mypkg is
  2    procedure myproc;
  3  end mypkg;
  4  /
Package created.
SQL>
SQL> create or replace package body mypkg is
  2    v_statevar number := 5; -- this means my package has a state
  3
  4    procedure myproc is
  5      myval number;
  6    begin
  7      select x
  8      into myval
  9      from dependonme;
10
11      myval := myval * v_statevar;
12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
13    end;
14  end mypkg;
15  /
Package body created.
SQL>
SQL> exec mypkg.myproc
My Result is: 25
PL/SQL procedure successfully completed.
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        VALID
SQL>
SQL>
SQL> alter table dependonme add (y number)
  2  /
Table altered.
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        INVALID
SQL>
SQL> exec mypkg.myproc
BEGIN mypkg.myproc; END;
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "CRISP_INTELL.MYPKG" has been invalidated
ORA-06508: PL/SQL: could not find program unit being called: "CRISP_INTELL.MYPKG"
ORA-06512: at line 1
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        INVALID
SQL>
SQL> exec mypkg.myproc
PL/SQL procedure successfully completed.
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        VALIDAnd this next example shows how having the package variables in their own package spec, allows the package to automatically recompile when it is called even though it became invalidated by the action of adding a column to the table.
SQL> drop table dependonme
  2  /
Table dropped.
SQL>
SQL> drop package mypkg
  2  /
Package dropped.
SQL>
SQL> set serveroutput on
SQL>
SQL> create table dependonme (x number)
  2  /
Table created.
SQL>
SQL> insert into dependonme values (5)
  2  /
1 row created.
SQL>
SQL> create or replace package mypkg is
  2    procedure myproc;
  3  end mypkg;
  4  /
Package created.
SQL>
SQL> create or replace package mypkg_state is
  2    v_statevar number := 5; -- package state in seperate package spec
  3  end mypkg_state;
  4  /
Package created.
SQL>
SQL> create or replace package body mypkg is
  2    -- this package has no state area
  3
  4    procedure myproc is
  5      myval number;
  6    begin
  7      select x
  8      into myval
  9      from dependonme;
10
11      myval := myval * mypkg_state.v_statevar;  -- note: references the mypkg_state package
12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
13    end;
14  end mypkg;
15  /
Package body created.
SQL>
SQL> exec mypkg.myproc
My Result is: 25
PL/SQL procedure successfully completed.
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        VALID
SQL>
SQL> alter table dependonme add (y number)
  2  /
Table altered.
SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  /
OBJECT_NAME
OBJECT_TYPE         STATUS
MYPKG
PACKAGE             VALID
MYPKG
PACKAGE BODY        INVALID
SQL>
SQL> exec mypkg.myproc
My Result is: 25
PL/SQL procedure successfully completed.

Similar Messages

  • Package is invalid state when called in Trigger

    Hi All,
    We have a trigger in which we are calling procedure(which is created in some package). Every time the trigger is called it returned an error
    'Package is in INVALID State".We tried to clean the app pool and that error went away but now it started coming again.
    Please help as we have been struggling hard for this .
    Database is ORA 10g.
    Please let me know if there are any other questions.
    Thanks in Advance !!!
    Regards

    My question is
    Why do you post 'My car doesn't work, please help me' instead of specifying exactly (with source code) what went wrong?
    Now you are asking people to rub up their broken crystal ball!
    Sybrand Bakker
    Senior Oracle DBA

  • Why Package Specification only in INVALID State

    Hi All,
    Why Package spec is going to invalid state when I change a Procedure which is called in Package body
    and why package body is still in VALID state. Can some one please clarify my doubt.

    May be only specification got errors and not the package.
    May be the constants / variables declared in package specification has wrong reference
    like var1 tab1.col1%type which column doesnexists....
    OR
    V number(1) :=10;
    or
    improper closing / ending of a procedure..

  • Procedure or function in Invalid state

    I got the following error
    Oracle/PLSQL: ORA-06575 Error : function CURRENCYBASE is in an invalid state
    i have recompile the function again
    SQL> ALTER FUNCTION CURRENCYBASE COMPILE;
    Warning: Function altered with compilation errors.
    Errors for FUNCTION CURRENCYBASE:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    5/2 PLS-00311: the declaration of
    "org.compiere.sqlj.Currency.base(java.math.BigDecimal,int,java.sq
    l.Timestamp,int,int) return java.math.BigDecimal" is incomplete
    or malformed
    How can i rectify this?
    Harinder Kaur

    Hi1
    I have got the same error
    1 CREATE OR REPLACE FUNCTION currencyRound (Amt NUMBER, C_CurrencyTo_ID NUMBE
    R, IsCosting VARCHAR2)
    2 RETURN NUMBER
    3 AS LANGUAGE JAVA
    4* NAME 'org.compiere.sqlj.Currency.round(java.math.BigDecimal,int,java.lan
    g.String) return java.math.BigDecimal';
    SQL> /
    Warning: Function created with compilation errors.
    SQL> show error
    Errors for FUNCTION CURRENCYROUND:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    4/2 PLS-00311: the declaration of
    "org.compiere.sqlj.Currency.round(java.math.BigDecimal,int,java.l
    ang.String) return java.math.BigDecimal" is incomplete or
    malformed

  • SQL Plus session - "schema.package" has been invalidated on making any chng

    Hi
    I am in the process of testing a stored procedure. Whenever I make changes to the procedure I am executing it from the SQL Plus session. But whenever I make a change to the procedure - i have to close that particular SQL Plus session and open another one. I get the message:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-04061: existing state of has been invalidated
    ORA-04061: existing state of package body
    "schema.package" has been invalidated
    ORA-04065: not executed, altered or dropped package body
    Is there a way that I do not have to open a new SQL Plus session everytime I make change to the package?

    It does not help :(. I get this problem in a SQL+ session only when I make a change in a JDev session. I have to log off the SQL+ session and log back in and it is OK again without re-compling anything. I don't have a problem with two SQL+ session. Isn't that strange?
    ben

  • Reg: DBMS_JAVA is in invalid state

    All,
    1) While exporting the data(logical backup) for specific user, im prompted with
    Export: Release 9.2.0.1.0 - Production on Wed Jul 15 21:21:23 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    Export done in WE8MSWIN1252 character set and UTF8 NCHAR character set
    server uses UTF8 character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user SYS
    . exporting PUBLIC type synonyms
    EXP-00008: ORACLE error 6575 encountered
    ORA-06575: Package or function DBMS_JAVA is in an invalid state
    EXP-00000: Export terminated unsuccessfully
    2) It is also observed that on querying
    select * from dba_registry
    XDB     Oracle XML Database     9.2.0.4.0     INVALID     12-MAR-2007 19:20:03     SYS     XDB     DBMS_REGXDB.VALIDATEXDB     (null)     (null)
    the Oracle XML database is in INVALID state and some of the packages "XMLATTRCOVER","XMLDOCUMENTCOVER","XMLTEXTCOVER" ETC are in invalid state.
    Please any ideas would be great in resolving the issue.
    Regards,
    ORA

    While logged in as SYSDBA run the script
    SQL>$ORACLE_HOME/rdbms/admin/utlrp.sql
    If it still stays INVALID after that, follow Metalink Note 243554.1 to Deinstall and Reinstall XML Database

  • Invalid state in SQL query for a function that was created with no errors.

    SQL> CREATE OR REPLACE FUNCTION overlap(in_start1 IN TIMESTAMP, in_end1 IN TIMESTAMP, in_start2 IN TIMESTAMP, in_end2 IN TIMESTAMP) RETURN NUMBER
    2 IS
    3
    4 BEGIN
    5 IF (in_start1 BETWEEN in_start2 AND in_end2 OR in_end1 BETWEEN in_start2 AND in_end2 OR in_start2 BETWEEN in_start1 AND in_end1) THEN
    6 RETURN 0;
    7 ELSE
    8 RETURN 1;
    9 END IF;
    10 END;
    11 /
    Function created.
    SQL> show errors;
    No errors.
    SQL>
    SQL> SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0;
    SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0
    ERROR at line 1:
    ORA-06575: Package or function OVERLAPS is in an invalid state
    I do not understand why overlaps is returned as in invalid state in the query, when it was created with no errors earlier. Could anyone help me?

    Marius
    Looking at the logic you are trying to create it looks like you are looking for overlapping time periods.
    Consider two date/time ranges:
    Range 1 : T1 - T2
    Range 2 : T3 - T4
    Do they overlap?
    1) No: T1 < T4 (TRUE)  T2 > T3 (FALSE)
    T1 --- T2
               T3 --- T4
    2) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
    T1 ---------- T2
               T3 --- T4
    3) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
    T1 -------------------- T2
               T3 --- T4
    4) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
                   T1 ----- T2
               T3 --- T4
    5) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
               T1 --- T2
           T3 ------------ T4
    5) No: T1 < T4 (FALSE) T2 > T3 (TRUE)
                    T1 --- T2
           T3 --- T4Answer: Yes they overlap if:
    T1 < T4 AND T2 > T3
    So you can code the logic in your SQL as simply:
    SELECT *
    FROM tbl
    WHERE range1_start < range2_end
    AND    range_1_end > range2_startIf you go around implementing PL/SQL functions for simple logic that can be achieved in SQL alone then you cause context switching between the SQL and PL/SQL engines which degrades performance. Wherever possible stick to just SQL and only use PL/SQL if absolutely necessary.

  • How to know (package , procedures or functions) name for current sessions

    Hi all
    I'm DBA and i want to find way to get object name whatever (package , procedures or functions) for current running statement in active session.
    To clarify when i open session browser from toad i can see active sessions and see current statement for every session but without the name of the object.
    Is there any way to know this point.
    thanks in advance

    select *
      from dba_objects
    where object_id in (select nvl(t.PLSQL_ENTRY_OBJECT_ID,-1)
                           from v$session t
                          where sid = 452)
    Ramin Hashimzade

  • Calling a package.procedure that accepts a type table.

    I'm getting the error "Error(45,20): PLS-00330: invalid use of type name or subtype name" when I run the procedure SP when it calls the d.is_date procedure that accepts a table as the second parameter.
    below is the Abbreviated code for the package.procedures that contain the "is_date".
    I've tried several things and can't seem to get SP to compile.
    thanks.
    create or replace
    PROCEDURE SP AS
    valid_out boolean;
    date_out date;
    date_fmt_out varchar2(30);
    type Mask_Tabtype is
    table of varchar2( 30 )
    index by binary_integer;
    Fmts Mask_Tabtype;
    BEGIN
    Fmts( 1 ) := 'fxDD-MON-RR';
    Fmts( 2 ) := 'fxDD-MON-YYYY';
    Fmts( 3 ) := 'fxDD-MON';
    Fmts( 4 ) := 'fxMM/DD';
    Fmts( 5 ) := 'fxMM/RRRR';
    d.Is_Date( 'test', Mask_Tabtype, Valid_out, Date_out, Date_Fmt_out);
    END SP;
    create or replace package d as
    type Mask_Tabtype is
    table of varchar2( 30 )
    index by binary_integer;
    Fmts Mask_Tabtype;
    Procedure Is_Date( Value_in in varchar2,
    Tab in Mask_Tabtype,
    Valid_out out boolean,
    Date_out out date,
    Date_Fmt_out out varchar2);
    end d;
    create or replace package body d as
    Fmt_Count integer;
    Date_Val date := null;
    Date_Fmt varchar2( 30 ) := 'fxMM/DD/YYYY';
    Procedure Is_Date(value_in in varchar2, Tab In Mask_Tabtype,
    Valid_out out boolean, Date_out out date, Date_Fmt_Out out varchar2)
    is
    begin
    /* Logic here removed to make post smaller
    End Is_date;
    End d;

    Here...
    d.Is_Date( 'test', Mask_Tabtype, Valid_out, Date_out, Date_Fmt_out);you are passing in Mast_Tabtype, which is a type declaration, rather than a variable of that type.
    Try...
    d.Is_Date( 'test', Fmts, Valid_out, Date_out, Date_Fmt_out);

  • Unable to fetch columns; Invalid state/No Suitable Driver

    Hi!
    I'm trying to populate a combo box with data from a MySQL database (or any other database for that matter), I create a JDBC connection source, and set the following:
    URL = jdbc:mysql://localhost:3306/test
    Driver = org.mysql.jdbc.Driver (i have also tried org.gjt.mm.mysql.Driver)
    Username = anonymous
    Password = <blank>
    Next I create a NBJdbcRowSet and set:
    Command = SELECT * FROM foo
    Connection Provider = connectionSource1 (the above connection source)
    Now if I click the elipses next to Default Column Values, I get the message 'Unable to fetch columns; Invalid State'
    If I replace the NBJDBCRowSet with a NBCachedRowSet, the error becomes 'Unable to fetch columns; No Suitable Driver'.
    The database is browseable in the runtime tab, and the table exists (I can run SQL queries and get the expected results). The anonymous account exists and has access to the tables in question (the same setup is used in a few different applications, all of which work fine). Using the root account gives the same results. Using the PointBase example database gives the same results:
    Driver: com.pointbase.jdbc.jdbcUniversalDriver
    URL: jdbc:pointbase:server://localhost:9092/sample
    Details of setup:
    OS: Windows XP Pro SP2
    IDE: Sun Java Studio Enterprise 7 2004Q4
    Java version in use: 1.4.2_05 (as packaged with the studio)
    MySQL: v5.0.7-beta-nt
    Connector: MySQL Connector/J 3.0.17-ga
    PointBase: As came with Studio Enterprise
    I should mention that I can get DB connectivity in my app, I can create a comboBox and set the model to 'nBCachedRowSet1: name' and the contents of that field appears in my comboBox, however I need to create about a dozen tables and I don't relish the thought of manually creating models for each one ;)
    Any suggestions are appreciated!
    Cheers!
    Darren

    Hi Thanks for your reply.
    I've retried with PointBase and the Sample DB:
    * New project. New JFrame.
    * Create ConnectionSource, NBJdbcRowSet, ComboBox
    * Config ConnectionSource:
    - Driver: com.pointbase.jdbc.jdbcUniversalDriver
    - URL: jdbc:pointbase:server://localhost:9092/sample
    - Username/pass: as per PointBase setup
    * Config NBJdbcRowSet
    - ConnectionProvider: connectionSource1
    - Command: SELECT * FROM CUSTOMERINFO
    - Default Column Values: <open GUI>, <Fetch Columns>, "Unable to fetch columns; Invalid State"
    So this is where I get the problem, I'm not sure if i've buggered it up though, so I continue to see if I can get data:
    - Add Column: NAME
    - OK, Close
    * Config ComboBox
    - Open Model dialog
    - Select Mode: ComboBoxEditor
    - RowSet: nBJdbcRowSet1 (this throws the error again)
    - Column: NAME (entered manually, dropdown is empty)
    - OK, Close
    * Run app
    Errors!
    Seems like the GUI builder did something wrong - it generated a bunch of functions for each thing i added, like this:
    public void setJComboBox1(JComboBox val) {
    this.jComboBox1 = val;
    and the project won't compile. I figure out it should be like this:
    public void setJComboBox1(javax.swing.JComboBox val) {
    this.jComboBox1 = val;
    but the functions aren't doing anything anyway, so I delete them all. I'm starting to think my installation is borked.
    Project now compiles and runs, but there's no data, and I get:
    ClassNotFoundException: com.pointbase.jdbc.jdbcUniversalDriver
    At this point i should probably find the jar with that driver in it and mount this/add it to the classpath, but the boss has decided we'll use Borland Delphi 2005 .NET anyways, so I won't take this any further...
    Thanks for your help guys!
    Darren

  • Getting error calling a package/procedure from DB

    I'm on 11.1.1.6 and I'm trying to execute a procedure in a package in the DB my ADF application is connected to.  I get the following error  "Could not find saved view state for token".  If I comment out the execution of the method that is calling the procedure the error goes away.  The error shows up under the log for the application on the EM console.  The procedure does not get executed.  Can anyone tell me what it could be?  I am using the tool Oracle provided to gain access to the EBS database without using the apps password.  I wonder if that may be causing the issue?  Can it be related to a security or grant issue of some kind?  The package procedure is under the apps schema.

    Hi,
    I don't think that on this forum we know enough about EBS to be helpful with security privileges. But if you read this here ADF &amp;amp; Weblogic How To: TROUBLESHOOTING: Could not find saved view state for token ...
    then it seems that there are some sort of access problem
    Frank

  • Package/procedure name

    Hi,
    what is the package/procedure name that helps to run sql statement.
    I hope DBMS_SQL is the package that helps to run sql statemanet in oracle.
    Please correct me if i am wrong....
    Thanks

    Murali wrote:
    Hi,
    I just want to know which package helps to run sql statement in oracle.
    Thanks.There is no package that runs all SQL in Oracle. SQL is executed through the basic Oracle software. DBMS_SQL will run dynamic SQL but dynamic SQL is seldom needed and when it is needed there are usually easier ways to do it - usually reference cursors or EXECUTE IMMEDIATE. For selects DBMS_SQL requires a LOT more work than the other two methods: you have to define the select fields, define the query (the other methods require this step), create variables to hold the results, parse the sql, and execute the SQL.
    Reasons to use DBMS_SQL are when the other methods of dynamic SQL won't work
    * result set from query is unknown at run time (which may be a design problem)
    * generated SQL statements is > 32K, longer than PL/SQL supports for a text value (again, design needs to be considered)

  • Invalid state when running first time after compile

    Often I will compile a package body without errors.
    The first time I run it, I will get the package is in an invalid state. The second time I run the package it will run fine.
    What is going on?
    Thanks,
    goo

    Hi,
    Dose it happen always ? Check if any object is getting changed. Is your package doing any thing which might be altering any objects being used by the package.
    thanks

  • 942: error when trying to browse/refresh Packages, Procedures and Functions

    Hi,
    I'm using OSD 1.1 against 10g.
    I can create and compile functions in a certain schema but when I try to browse the Functions node I get "ORA-00942: table or view does not exist." and the node does not expand.
    The same thing happens with the Packages and Procedures nodes.
    Does anyone have any ideas?
    Thanks in advance
    Mike

    I've got the same problem with SQL Developer 1.1.0.23.64 against 9.2.0.4.0 and 10.1.0.4.0. This error occured only for a few package/procedure/function owners. I've found that these owners have SELECT ANY TABLE system privilege. In such case SQL Developer generates following SELECT:
    SELECT OBJECT_NAME, OBJECT_ID, DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID, 'TRUE' runnable, NVL( b.HAS_BODY, 'FALSE') HAS_BODY
    FROM SYS.DBA_OBJECTS a,
    (SELECT 'TRUE' HAS_BODY, object_name tmp_name FROM SYS.DBA_OBJECTS WHERE OWNER = :SCHEMA AND OBJECT_TYPE = 'PACKAGE BODY') b
    WHERE OWNER = :SCHEMA
    AND OBJECT_TYPE = 'PACKAGE'
    AND object_name = tmp_name (+)
    AND SUBOBJECT_NAME IS NULL
    AND OBJECT_ID NOT IN ( SELECT PURGE_OBJECT FROM RECYCLEBIN )
    Otherwise it generates
    SELECT OBJECT_NAME, OBJECT_ID, DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID, 'TRUE' runnable, NVL( b.HAS_BODY, 'FALSE') HAS_BODY
    FROM SYS.ALL_OBJECTS a,
    (SELECT 'TRUE' HAS_BODY, object_name tmp_name FROM SYS.ALL_OBJECTS WHERE OWNER = :SCHEMA AND OBJECT_TYPE = 'PACKAGE BODY') b
    WHERE OWNER = :SCHEMA
    AND OBJECT_TYPE = 'PACKAGE'
    AND object_name = tmp_name (+)
    AND SUBOBJECT_NAME IS NULL
    AND OBJECT_ID NOT IN ( SELECT PURGE_OBJECT FROM RECYCLEBIN )
    Both for 10g.
    So you could try to grant SELECT on DBA_OBJECTS to owner of your functions.
    I don't know why SQL Developer doesn't SELECT from ALL_OBJECTS in all cases.
    Jiri
    Message was edited by:
    Jiri Suchy
    You will need grant SELECT on DBA_SOURCE, too.

  • Package status shown invalid

    Hi,
    I am facing the below error,
    ORA-04061: existing state of package body "TBM.PAYBACK" has been invalidated
    ORA-06508: PL/SQL could not find program unit being called "TBM.PAYBACK"
    Status of the package,
    select status,object_name, owner from dba_objects where object_name='PAYBACK' and owner = 'TBM';
    status object_name owner
    invalid PAYBACK public
    valid PAYBACK tbm
    valid PAYBACK tbm
    For TBM user it shows status "valid" and PUBLIC user "invalid"
    So is the package valid or invalid.
    Connecting as sys tried to compile the package and the package body.. it gets compiled successfully.
    But the above sql query still show the same output.
    Please guide.

    You're welcome,
    Since you got an answer and was satisfied with that, you really should close the thread.
    Doing that would even improve your somewhat poor statistics
    Handle:      A-K
    Status Level:      Newbie
    Registered:      Aug 5, 2007
    Total Posts:      212
    Total Questions:      104 *(97 unresolved)*

Maybe you are looking for

  • Adapter - Iphone to HDMI

    I am looking for an accessory that has the Ipod port on one end and an HDMI port on the other end, so I can watch the HD videos I record on the 4S directly on my HD TV.

  • There is no access to the photos to iCloud account...

    Hi After the last OSX update i get this messege constandly. - There is no access to the photos to iCloud account "My@Email". Review your account information in System Preferences. But I havn't got a clue whats wrong. I have checked that I use the cor

  • Help please with pictures!

    I have an existing Nokia phone and have copied my pictures on to the memory card. When I put my SIM into my Blackberry and got to pictures there aren't any. How do I download my pictures so I can see them!! Would appreciate any help as don't want to

  • How do you sort in numbers

    Can anyone tell me how to sort colums or rows in Numbers?  It appears to me Apple has made a Spreadsheet that can not sort columns and rolls.  If it is possible I apoligize to Apple, but so far I have not found any way.  Thanks for any help.

  • "An ipod has been detected, but it could not be identified properly. Please disconnect an reconnect the iPod, then try again. An unknown error occured (2005)."

    "An ipod has been detected, but it could not be identified properly. Please disconnect an reconnect the iPod, then try again. An unknown error occured (2005)." What does this mean? I have an iPod shuffle 4th gen but its not detected in itunes... it c