Provides access to pages previously marked suspect by recovery.
sp_forceonline_page dbname, pgid, {"sa_on" | "sa_off" | "all_users"}
is the name of the database containing the pages to be brought online.
is the page identifier of the page being brought online.
allows only users with the sa_role access to the specified page.
revokes access privileges created by a previous invocation of sp_forceonline_page with sa_on.
allows all users access to the specified page.
Allows a system administrator access to page 312 in the pubs2 database:
sp_forceonline_page pubs2, 312, "sa_on"
Revokes access to page 312 in the pubs2 database from the system administrator. Now, no one has access to this page:
sp_forceonline_page pubs2, 312, "sa_off"
Allows all users access to page 312 in the pubs2 database:
sp_forceonline_page pubs2, 312, "all_users"
sp_forceonline_page with all_users cannot be reversed. When pages have been brought online for all users, you cannot take them offline again.
A page that is forced online is not necessarily repaired. Corrupt pages can also be forced online. Adaptive Server does not perform any consistency checks on pages that are forced online.
sp_forceonline_page cannot be used in a transaction.
sp_forceonline_page works only for databases in which the recovery fault isolation mode is "page." Use sp_setsuspect_granularity to display the recovery fault isolation mode for a database.
To bring all of a database’s offline pages online in a single command, use sp_forceonline_db.
The permission checks for sp_forceonline_page differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be the database owner or a user with own database privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
38 |
exec_procedure |
Execution of a procedure |
|
System procedures sp_forceonline_db, sp_listsuspect_db, sp_listsuspect_page, sp_setsuspect_granularity, sp_setsuspect_threshold