views:

101

answers:

2

Having located some code that needs to be removed from a database that relates to a specific module. Is it safe to remove it from dba_source directly? i.e.

delete from dba_source where name = 'MODULE_NAME';

Or do I have to grab all the procedure and package names and drop those specifically?

A: 

It looks like you can't do this at all. At least, when I tried it I had insufficient privileges so oracle seems to prevents you from doing this full stop

It seems unsafe in that you could delete individual lines and potentially corrupt the code. Although the compiled code would be ok until recompiled. I guess and as pointed out by ammoQ you wouldn't remove the compiled versions.

Best to do a drop package/procedure ...

Matt H
+5  A: 

No. Its not safe.

All the [dba|user|all]_xxx are views and you don't know the underlying structure. Some times Oracle internal tables are not normalized and the results of modifying them is unexpected.

FerranB