masaimara
asked on
Syntax to compile entire schema?
Hi,
Does anyone know how to compile entire schema?
Thanks,
masaimara
Does anyone know how to compile entire schema?
Thanks,
masaimara
Hi
If you have 8i you can run
@ORACLE_HOME/rdbms/admin/u tlrp.sql
This compiles all invalid objects in the database, and it is fast!
Regards
tudor1
If you have 8i you can run
@ORACLE_HOME/rdbms/admin/u
This compiles all invalid objects in the database, and it is fast!
Regards
tudor1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
tudor1,
Whom should you be logged on as to run utlrp.sql or what kind of roles should a user be assigned to run that sql?
masaimara
Whom should you be logged on as to run utlrp.sql or what kind of roles should a user be assigned to run that sql?
masaimara
ASKER
sagirk,
I ran the dbms package but it failed to compile a view which was invalid. Is there something else I should be doing?
masaimara
I ran the dbms package but it failed to compile a view which was invalid. Is there something else I should be doing?
masaimara
Hi masaimara
You can run the script as INTERNAL/SYSTEM or another dba.
And if a view won't compile:
Are all tables ok? Has there been a change?
If for example the view uses a table that doesn't exist anymore, it will not be compiled.
regards
tudor1
You can run the script as INTERNAL/SYSTEM or another dba.
And if a view won't compile:
Are all tables ok? Has there been a change?
If for example the view uses a table that doesn't exist anymore, it will not be compiled.
regards
tudor1
ASKER
tudor1,
I am the schema owner but I'm not a dba. Is there any other sql which can be run by a person who is not a dba?
masaimara
I am the schema owner but I'm not a dba. Is there any other sql which can be run by a person who is not a dba?
masaimara
select 'alter '||decode(OBJECT_TYPE,'PAC
||' COMPILE '|| DECODE(OBJECT_TYPE,'PACKAG
FROM USER_OBJECTS
WHERE STATUS <>'VALID';
USE THE ABOVE QUERY IT WILL GENERATE SCRIPT TO COMPILE ALL THE INVALID OBJECTS. RUN THE GENERATED SCRIPT.
Hope it helps you,
Regards,
Murali.