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}
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 SAP ASE is first installed).
sp_diskdefault master, defaultoff
A default database device is one that is used for database storage by create database or alter database if the user does not specify a database device name or specifies the keyword default.
You can have multiple default devices. They are used in the order they appear in the master.dbo.sysdevices table (that is, alphabetical order). When the first default device is filled, the second default device is used, and so on.
When you first install SAP ASE, the master device is the only default database device.
To find out which database devices are default database devices, execute sp_helpdevice.
See also alter database, create database, disk init in Reference Manual: Commands.
The permission checks for sp_diskdefault 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. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|