sp_deviceattr

Description

(UNIX platforms only) Changes the device parameter settings of an existing database device file.

Syntax

sp_deviceattr  logicalname, optname, optvalue

Parameters

logicalname

is the logical name of an existing database device. The device can be stored on either an operating system file or a raw partition, but the dsync setting is ignored for raw partitions.

optname

name of the attribute to change. Valid values are directio or dsync:

  • directio – enables Adaptive Server to write directly to disk, bypassing the operating system’s buffer system.

  • dsync – enables updates to the device take place directly on the storage media, or are buffered by the UNIX file system

    NoteThe directio and dsync options are mutually exclusive; you cannot specify “true” for both at the same time.

optvalue

can be either “true” or “false.”

Examples

Example 1

Sets dsync on for the device named “file_device1”:

sp_deviceattr file_device1, dsync, true

Usage

Permissions

The user executing sp_deviceattr must have permission to update the sysdevices table.

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

System procedures sp_helpdevice