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_spaceused
  ______________________________________________________________________

  NAME:  sp_spaceused

  FUNCTION:
       Displays the number of rows, the number of data  pages,  and  the
       space used by one object or by all objects in a database.

  SYNTAX:
       sp_spaceused [objname]

  EXAMPLES:
       1)  sp_spaceused titles








  sp_spaceused            Version 4.0 -- 1/15/89                       2
  ______________________________________________________________________
           Reports on the amount of space allocated (reserved)  for  the
           titles  table,  the amount used for data, the amount used for
           index(es), and the available (unused) space:

           name    rows  reserved  data  index_size  unused
           ------  ----  --------  ----  ----------  -------
           titles    18  48 KB     6 KB  4 KB        38 KB

       2)  sp_spaceused

           Prints a summary of space used in the database:

            database_name                   database_size
            ------------------------------  --------------------
            master                          5 MB

            reserved         data             index_size       unused



  3                       Version 4.0 -- 1/15/89            sp_spaceused
  ______________________________________________________________________
            ---------------  ---------------  ---------------  ---------------
            2176 KB          1374 KB          72 KB            730 KB


  PARAMETERS:
       objname -  is the name of the table or index under scrutiny.   If
           omitted,   a  summary  of  space  used  in  the  database  is
           displayed.

  COMMENTS:

       o Executing sp_spaceused computes the number of rows, the  number
         of  data  pages,  and  the  space used by the object or by each
         object in the database.
       o The procedure looks for an object in the current database.

       o After you drop an index, sp_spaceused does not report  accurate
         information. This is a known problem.


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

  MESSAGES:

  PERMISSIONS:
       Execute permission to public.

  TABLES USED:
       sysindexes, master..sysusages

  SEE ALSO:
       sp_help, CREATE INDEX, CREATE TABLE, DROP INDEX, DROP TABLE








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