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.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

Commands alter database, create database, disk init

System procedures sp_helpdevice