Provides access to all the pages in a database that were previously marked suspect by recovery.
sp_forceonline_db dbname, {"sa_on" | "sa_off" | "all_users"}
sp_forceonline_db pubs2, "sa_on"
sp_forceonline_db pubs2, "sa_off"
sp_forceonline_db pubs2, "all_users"
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.
sp_forceonline_page with all users cannot be reversed. When pages have been brought online for all users, you cannot take them offline again.
sp_forceonline_db cannot be used in a transaction.
To bring only specific offline pages online, use sp_forceonline_page.
The permission checks for sp_forceonline_db differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|