views:

33

answers:

3

Sometimes when I browse views or packages in Oracle SQL Developer they have a red icon next to them, indicating that there was a compile error. This seems to randomly happen to objects that compile without any errors or warnings.

They continue to work even with the red icon, but it's confusing and makes me wonder if I'm missing something. What can I do to find out why these objects are being marked as having problems?

+3  A: 

I have seen the same; most of the time when a sub procedure was modified and required compilation.

ring bearer
I agree. I think it might be because it became invalid when its underlying objects were modified, and it now requires recompilation. Thus the flag.
MJB
This makes sense... and perhaps that is the case. This happens to some of my packages that are 100% self contained (no dependencies on external procedures/functions/packages), but I'm wondering now if modifications to a table used in the package could cause this as well. I use %type and %rowtype variable types and if the referenced table changed perhaps this is a warning that it could have broken some code. Maybe the views do the same thing if the DDL for any tables is altered.
RenderIn
That's right, the red icon does not mean error - just that it is invalid
hamishmcn
+1  A: 

Oracle SQL Developer is not the finest bit of SW engineering. In general i think oracle should just do what they can do good, that is databases ;) Only saying this to indicate that i would not worry to much about such glitches.

I have not seen that problem myself, but i could imagine that this happens when a database object (e.q a table) this package is using has been altered. Even through the package still compiles, oracle somehow marks them. In jdbc, you would get an 'existing state of package has been discarded' message on the first call to the package. Just a guess, it might just be an error, i would not wonder to much, looking at the quality of their java products in general ;)

bert
Getting the error via JDBC means the issue does ***not*** like with SQL Developer ;)
OMG Ponies
Not sure i understand you here. SQL Developer IS using JDBC. Apart, you get such an error also using a oracle net connection.
bert
+1  A: