sp_forceonline_page

Description

Provides access to pages previously marked suspect by recovery.

Syntax

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

Parameters

dbname

is the name of the database containing the pages to be brought online.

pgid

is the page identifier of the page being brought online.

sa_on

allows only users with the sa_role access to the specified page.

sa_off

revokes access privileges created by a previous invocation of sp_forceonline_page with sa_on.

all_users

allows all users access to the specified page.

Examples

Example 1

Allows a System Administrator access to page 312 in the pubs2 database:

sp_forceonline_page pubs2, 312, "sa_on"

Example 2

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"

Example 3

Allows all users access to page 312 in the pubs2 database:

sp_forceonline_page pubs2, 312, "all_users"

Usage

Permissions

Only a System Administrator can use sp_forceonline_page.

Auditing

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

  • 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

See also

System procedures sp_forceonline_db, sp_listsuspect_db, sp_listsuspect_page, sp_setsuspect_granularity, sp_setsuspect_threshold