Use sp_forceonline_db to make all the offline pages in a database accessible, and use sp_forceonline_page to make an individual offline page accessible.
“sa_on” makes the suspect page or database accessible only to users with the sa_role. This is useful for repairing the suspect pages and testing the repairs while the database is up and running, without allowing normal users access to the suspect pages. You can also use it to perform a dump database or a dump transaction with no_log on a database with suspect pages, which would be prohibited if the pages were offline.
“sa_off” blocks access to all users, including system administrators. This reverses a previous sp_forceonline_db or sp_forceonline_page with “sa_on.”
“all_users” brings offline pages online for all users after the pages have been repaired.
Unlike bringing suspect pages online with “sa_on” and then making them offline again with “sa_off,” when you use sp_forceonline_page or sp_forceonline_db to bring pages online for “all users,” this action cannot be reversed. There is no way to make the online pages offline again.
You cannot execute sp_forceonline_db or sp_forceonline_page inside a transaction.
You must have the sa_role and be in the master database to execute sp_forceonline_db and sp_forceonline_page.
See the Reference Manual: Procedures.