sp_diskdefault

Description

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.

Syntax

sp_diskdefault logicalname, {defaulton | defaultoff}

Parameters

logicalname

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).

Examples

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

Usage

Permissions

Only a System Administrator can execute sp_diskdefault.

See also

Commands alter database, create database, disk init

System proceduressp_helpdevice