If you don’t use the database parameter optimizer_secure_view_merging, the rest of this post won’t be relevant to you and you are good-to-go.
For those that remain, optimizer_secure_view_merging has been deprecated in Oracle Database 23ai. If you use this parameter in a pfile/spfile, you will get the following error message when the database starts:
ORA-32006: OPTIMIZER_SECURE_VIEW_MERGING initialization parameter has been deprecated
The error is a warning and will not prevent the database from opening. Nevertheless, the parameter setting is a no-op.
If you set the parameter in a database session, no error message is displayed, but the action is a no-op.
If you use optimizer_secure_view_merging = FALSE in a pre-23ai release, you may experience some plan changes when upgrading to Oracle Database 23ai. If it is a setting you need, Oracle strongly recommends you use the following solution instead:
grant merge any view to <user-name>;
Grant this privilege to any user that needs to use secure view merging.
The great advantage of a privilege over a database parameter is that you can use it on a view-by-view basis:
grant merge view on <view-name> to <user-name>;
You can find a fully-worked example on GitHub.
If this solution is not acceptable, please contact Oracle Support via an SR.
