Enable online status for all Oracle database datafiles

I have executed a database migration by transitioning from a physical active data guard to a primary database. Subsequent to the migration, I observed that several data files were offline, as evidenced below: Modifying the status of each individual data file would require a substantial amount of time. To provide an illustrative example: In order to streamline the operation, I devised a PL/SQL procedure that effectively places all data files offline across all tablespaces within the database, subsequently modifying their statuses to online, as illustrated below: I hope this post…