Specifies whether or not a database device can be used for database storage if the user does not specify a database device or specifies default with the create database or alter database commands.


sp_diskdefault logicalname, {defaulton | defaultoff}



is the logical name of the device as given in master.dbo.sysdevices.name. The device must be a database device rather than a dump device.

defaulton | defaultoff

defaulton designates the database device as a default database device; defaultoff designates that the specified database device is not a default database device.

Use defaulton after adding a database device to the system with disk init. Use defaultoff to change the default status of the master device (which is designated as a default device when Adaptive Server is first installed).


Example 1

The master device is no longer used by create database or alter database for default storage of a database:

sp_diskdefault master, defaultoff



Only a System Administrator can execute sp_diskdefault.

See also

Commands alter database, create database, disk init

System proceduressp_helpdevice