Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase SQL Server 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 1/15/89          sp_diskdefault
  ______________________________________________________________________

  NAME:  sp_diskdefault

  FUNCTION:
       Sets a database device's status to defaulton or defaultoff.  This
       indicates  whether or not a database device can be used for data-
       base storage when the user does not specify a database device, or
       specifies  DEFAULT,  with  CREATE DATABASE or ALTER DATABASE com-
       mands.

  SYNTAX:
       sp_diskdefault logicalname, {defaulton | defaultoff}








  sp_diskdefault          Version 4.0 -- 1/15/89                       2
  ______________________________________________________________________

  EXAMPLES:
       sp_diskdefault, master, defaultoff

       The Master Device will no longer be used by  CREATE  DATABASE  or
       ALTER DATABASE for default storage of a database.

  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 if the  specified  database
           device  is  to  be  designated  a  default  database  device;
           defaultoff if the specified database  device  is  not  to  be
           designated a default database device.

           The defaulton keyword will most frequently be  used  after  a



  3                       Version 4.0 -- 1/15/89          sp_diskdefault
  ______________________________________________________________________
           database device has been added to the system with DISK  INIT.
           The defaultoff keyword will most frequently be used to change
           the default status of the Master Device  (which  is  on  when
           SQL Server is first installed).

  COMMENTS:

       o 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 if  the  user  gives  the
         DEFAULT keyword.
       o When you first install SQL Server, the  Master  Device  is  the
         only default database device.

       o To find out which database devices are  default  database  dev-
         ices, execute the sp_helpdevice procedure.




  sp_diskdefault          Version 4.0 -- 1/15/89                       4
  ______________________________________________________________________

  MESSAGES:
       The device name supplied for the  logicalname  parameter  doesn't
           exist on SQL Server.  Run the sp_helpdevice procedure without
           a parameter to see a list of all devices.  To add a new data-
           base device to the system, use the DISK INIT command.
       The device name supplied for the logicalname parameter is in sys-
           devices,  but it is a dump device rather than a database dev-
           ice.  Run the sp_helpdevice procedure without a parameter  to
           see  a  list of all devices.  To add a new database device to
           the system, use the DISK INIT command.
       Only the System Administrator can change the  default  status  of
           database devices.
       The second parameter must be either defaulton or defaultoff.

  PERMISSIONS:
       Execute permission to System Administrator.



  5                       Version 4.0 -- 1/15/89          sp_diskdefault
  ______________________________________________________________________

  TABLES USED:
       master.dbo.sysdevices

  SEE ALSO:
       sp_helpdevice, ALTER DATABASE, CREATE DATABASE, DISK INIT













Typewritten Software • bear@typewritten.org • Edmonds, WA 98026