[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Invalid objects

Posted on 2011-03-08
Medium Priority
Last Modified: 2012-06-27
How does truncating affect the compiling of invalid objects? If a truncate a table that has child tables will I be able to recompile invalid objects?
Question by:msimons4
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 74

Accepted Solution

sdstuber earned 1000 total points
ID: 35072957
if you have constraints from the children to the parent,  you can't truncate the parent.

if you don't then the truncate will work and shouldn't invalidate any dependent objects.

Author Comment

ID: 35073084
How about if I disable constraints, delete rows, then enable no vaildate? Will I be able to recompile invalid objects?
LVL 35

Assisted Solution

johnsone earned 500 total points
ID: 35073103
You should be able to recompile the invalid objects.  If records violate the constraints you enabled with no validate, then expect to get some errors later, but it should not prevent objects from being compiled.
LVL 74

Assisted Solution

sdstuber earned 1000 total points
ID: 35073327
truncate and delete will have no impact on the validity or invalidity of your objects
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 500 total points
ID: 35082215

cursors will be invalidated in shared pool but dependant objects will remain valid:
SQL> create table T as select * from dual;

Table created.

SQL> create view V as select * from t;

View created.

SQL> select object_name,status,data_object_id from user_objects where object_name in ('T','V');

---------- ------- --------------
T          VALID            77043
V          VALID

SQL> truncate table T;

Table truncated.

SQL> select object_name,status,data_object_id from user_objects where object_name in ('T','V');

---------- ------- --------------
T          VALID            77044
V          VALID

Open in new window


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question