Home » Other » General » Can valid object refer to invalid objects? (10g, 10.2.0.4, windows server 2008)
Can valid object refer to invalid objects? [message #586892] Tue, 11 June 2013 08:04 Go to next message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
Dear All,

This is silly question but need to know answer of it.

Can valid object refer to invalid objects? If it refer to invalid objects then what is it's current status - Invalid or valid?

Regards,
Ishika
Re: Can valid object refer to invalid objects? [message #586893 is a reply to message #586892] Tue, 11 June 2013 08:19 Go to previous messageGo to next message
cookiemonster
Messages: 13961
Registered: September 2008
Location: Rainy Manchester
Senior Member
No.
If any object becomes invalid then all referencing objects become invalid
Re: Can valid object refer to invalid objects? [message #586894 is a reply to message #586893] Tue, 11 June 2013 08:36 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Can valid object refer to invalid objects? If it refer to invalid objects then what is it's current status - Invalid or valid?

post SQL & results from your actual testing of this scenario.
Re: Can valid object refer to invalid objects? [message #586895 is a reply to message #586893] Tue, 11 June 2013 08:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
A simple test:
SQL> create table t (col int);

Table created.

SQL> create view v as select * from t;

View created.

SQL> create procedure p as n int; begin select count(*) into n from v; end;
  2  /

Procedure created.

SQL> col object_name format a15
SQL> select object_name, status from user_objects where object_name in ('T','V','P') order by 1;
OBJECT_NAME     STATUS
--------------- -------
P               VALID
T               VALID
V               VALID

3 rows selected.

SQL> drop table t;

Table dropped.

SQL> select object_name, status from user_objects where object_name in ('T','V','P') order by 1;
OBJECT_NAME     STATUS
--------------- -------
P               INVALID
V               INVALID

2 rows selected.

Regards
Michel
Re: Can valid object refer to invalid objects? [message #586957 is a reply to message #586895] Tue, 11 June 2013 23:55 Go to previous message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
Dear Michel / BlackSwan,

Thank you very much...

I have check it before posting it here.
But i was not sure that if invalid object (procedure) is dropped then whether its impact valid package/procedure or not?

Now, i got the point, if invalid procedure is refereed to some other package/procedure then that object would also be Invalid one. So dropping Invalid objects will not hamper any of the valid objects.

Thanks once again. Next time, i will post with my examples.

Regards,
Ishika
Previous Topic: Structural differences between two different databases
Next Topic: log miner
Goto Forum:
  


Current Time: Fri Dec 27 05:00:53 CST 2024