Sets a database device's status to indicate whether the device can be used for database storage when the user does not specify a database device or specifies DEFAULT with the CREATE DATABASE or ALTER DATABASE statements.
sp_diskdefault database_device, {defaulton | defaultoff}
where
You can have multiple default devices. They are used in alphabetic order, the order in which they appear in the sysdevices table.
When SQL Server is initially installed, the MASTER database device is the only default database device.
To find out which database devices are default database devices, execute the sp_helpdevice system stored procedure.
In this example, the MASTER database device will no longer be used by the CREATE DATABASE or ALTER DATABASE statements for the default storage of a database.
sp_diskdefault master, defaultoff
Only the system administrator can use this procedure.
master.dbo.sysdevices
ALTER DATABASE | DISK INIT |
CREATE DATABASE | sp_helpdevice |