To make all the offline pages in a database accessible, use sp_forceonline_db:
sp_forceonline_db dbname, {"sa_on" | "sa_off" | "all_users"}
To make an individual offline page accessible, use sp_forceonline_page:
sp_forceonline_page dbname, pgid {"sa_on" | "sa_off" | "all_users"}
With both of these procedures, you specify the type of access.
“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.
WARNING! Adaptive Server does not perform any checks on pages being brought online. It is your responsibility to ensure that pages being brought online have been repaired.
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.