Recompile and rebuild SAP's object
we migrated from Oracle version 220.127.116.11 to 18.104.22.168.
We have some problems with performances. A trace's file report an error that ask for recompile the DB's objects like package, view, procedure, function and rebuild indexes.
It's possible to normally recompile the SAP's objects like indexes, procedures, etc. or there is a specific procedure to meet?
Lars Breddemann replied
usually a patchset installation won't make it necessary to manually recompile or rebuild any SAP object.
If you now see some views that are marked as INVALID - don't care about them. If these views are going to be used by SAP they are also defined in the ABAP dictionary and activated there (otherwise they wouldn't be used). So everything needed for this view is in the database and at the very first access to that view Oracle will automatically make the view valid again.
Indexes - well they simply DON'T get invalid by a patchset installation. If you've got indexes that are "UNUSEABLE" (INVALID is not an attribute to an Index) - simply rebuild it via ALTER INDEX ... REBUILD ONLINE. Don't forget to gather cbo statistics for the index afterwards.
Packages.... there are no packages in the SAP schema.
So that's about the objects in the SAP-Schema. In most cases that I've seen these ones were not an issue at all.
What has been an issue was: invalid objects in SYS and/or SYSTEM schema.
For these objects check note <a href="http://service.sap.com/sap/support/notes/648203">648203</a>.