Results 1 to 5 of 5

Thread: sp_spaceused

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Unanswered: sp_spaceused

    In SQL Server 7/2K, if sp_spaceused is dropped and re-created, using it without any parameters in any database to obtain the size of the database, always reports the size of the master database.

    Any ideas ???

  2. #2
    Join Date
    Jul 2002
    Posts
    229
    And you're sure Master isn't your default database when running it?

  3. #3
    Join Date
    Nov 2002
    Posts
    2
    Originally posted by Coolberg
    And you're sure Master isn't your default database when running it?
    Do u mean to ask that is master the default db for the login that I'm using - sa i.e. .

    Then yes, master is the default db for 'sa login.

    If other than that kindly tell me.

    Thanks, Dhruv, India.

  4. #4
    Join Date
    Oct 2002
    Posts
    369

    Re: sp_spaceused


    In SQL Server 7/2K, if sp_spaceused is dropped and re-created, using it without any parameters in any database to obtain the size of the database, always reports the size of the master database.
    Q1 Any ideas ???
    A1 Yes, make certain you have a full correct script, your server is service packed, and that you have appropriatly changed the DB context. (The behavior could not be duplicated on an up to date instance using the procedure named sp_spaceusedTest, attached.) What are the results of the following:

    Use Pubs
    Go
    exec sp_Spaceused
    Attached Files Attached Files

  5. #5
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Or the easy way could be DBname..sp_spaceused.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •