I've just (re)installed Oracle 8.1.6 EE for NT. In the newly created database I have a number of packages (3) and Package body (45) that are INVALID. I've tried to recompile these using DBA Studio and the 'alter package <packagename> compile ....' statement. but they are still INVALID. Does anybody know of a solution to this problem.
When you compile a package specification, it invalidates other packages that rely on it. Try compiling all the specifications. When you have all the package specs valid, you can then compile all the bodies...
alter package xyz compile specification;
alter package xyz compile body;
Alternatively, you can use the dbms_utility.compile_schema() package, but it has been known to have bugs in 8.1.x versions.
Alternatively to the alternative, you can use ?/rdbms/admin/utlrp.sql to recompile ALL your packages, but if other people are on the database it encounters DDL locks frequently.