(Cluster environments only) Provides an interface to perform various disk refit-related actions, such as showing the current status of the disk refit process, resetting the state of the disk refit process, skipping the disk refit process for an instance, and so on.
sp_refit_admin [‘help’] | 'status' | ['reset’ | 'skiperfit' [, instance_name]] |[ 'removedevice’, device_name]
If instance_name is not supplied, this parameter resets the disk refit process back to the beginning of Phase One, so that subsequent disk refit command starts the disk refit process from Phase One and refits all the regular shareable devices, as well as private devices of the instance.
If instance_name is supplied, this parameter resets the disk refit process back to the beginning of Phase Two for that instance, so that a subsequent disk refit command on that instance starts the disk refit process from Phase Two for that instance, and refits only the private devices of that instance.
sp_refit_admit 'reset'
After executing reset, the user must run Phase One and Phase Two of the disk refit process.
sp_refit_admin 'reset', 'cluster1_instance1'
This interface removes sysdatabases entry for all the databases created on the private devices owned by 'cluster1_instance1', and the sysusages entries corresponding to the private devices owned by 'cluster1_instance1'. After executing, you must run Phase Two of disk refit on 'cluster1_instance1'.
sp_refit_admin 'skiprefit', 'cluster1_instance1'
This example removes the sysdatabases entry for all the databases that use any of the refit-pending private devices owned by 'cluster1_instance1', and removes all the entries in sysusages for all the deleted databases.
To skip the disk refit process on all the refit-pending private devices of all the instances in the cluster, enter:
sp_refit_admin 'skiprefit'
sp_refit_admin 'removedevice', 'device1'
This action removes the sysdatabases entry for all databases created on 'device1', and all the sysusages entries corresponding to 'device1'. It also removes 'device1' from sysdevices.
You must follow the instructions in Troubleshooting in the Clusters Users Guide after executing skiprefit, to ensure the consistency of the system tables before resuming normal operation.
Use removedevice only during the disk refit process, to remove the device from the refit process. Do not use it in place of sp_dropdevice
You can use sp_refit_admin even when the instance is started with the -m option and trace flag 3608 ON.
For information on problems encountered with disk refit, see the Troubleshooting and Error Guide
The permission checks for sp_refit_admin differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage disk privilege. |
Disabled | With granular permissions disabled, you must be a user with sa_role. |