sp_forceonline_page

Provides access to pages previously marked suspect by recovery.

Syntax

sp_forceonline_page dbname, pgid, 
	{"sa_on" | "sa_off" | "all_users"}

Parameters

Examples

Usage

There are additional considerations when using sp_forceonline_page:
  • 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. The SAP ASE server does not perform any consistency checks on pages that are forced online.

  • You cannot use sp_forceonline_page 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.

Permissions

The permission checks for sp_forceonline_page differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be the database owner or a user with own database privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_forceonline_db
sp_listsuspect_db
sp_listsuspect_page
sp_setsuspect_granularity
sp_setsuspect_threshold