Regarding sp_spaceused sp

Regarding sp_spaceused sp

Post by SXRlc » Wed, 20 Dec 2006 09:49:01


Hi Guys,
I have some questions regarding sp_spaceused sp. I run this sp in my
database that I just restore from customer db in order for performance
tuning. I got this result like:
Database_name database_size unallocated_space
sales 7874.81 MB -6276.75 MB

Reserved data index_size unused
14080832 KB 6095728 KB 6183560 KB 1801544 KB

Q1: why unallocated_space is minus data?
2: why Reserved is double than database_size, is it re- assigned space?
I check the database space has been run out.
3. Since database space has been run out, do I need to assgn space to
database manully?
4. Since this databace is going to do the performance test by developer, Do
I need to do the db reindex or check db some stuff?
Thanks in advance.
 
 
 

Regarding sp_spaceused sp

Post by Roy Harve » Wed, 20 Dec 2006 11:10:05

Run sp_spaceused with the [@updateusage = 'updateusage' option.

The numbers reported by sp_spaceused are based on statistics that are
not always up to date. Using that option, or running DBCC
UPDATEUSAGE, fixes them.

Roy Harvey
Beacon Falls, CT

On Mon, 18 Dec 2006 16:49:01 -0800, Iter

 
 
 

Regarding sp_spaceused sp

Post by SXRlc » Wed, 20 Dec 2006 11:11:01

Hi Guys,
I have some questions regarding sp_spaceused sp. I run this sp in my
database that I just restore from customer db in order for performance
tuning. I got this result like:
Database_name database_size unallocated_space
sales 7874.81 MB -6276.75 MB

Reserved data index_size unused
14080832 KB 6095728 KB 6183560 KB 1801544 KB

Q1: why unallocated_space is negtive?
2: why Reserved is double than database_size, is it re- assigned space?
I check the database space has been run out.
3. Since database space has been run out, do I need to assgn space to
database manully?
4. Since this databace is going to do the performance test by developer, Do
I need to do the db reindex or check db some stuff?
Thanks in advance.
 
 
 

Regarding sp_spaceused sp

Post by Arnie Rowl » Wed, 20 Dec 2006 11:31:13

So, did you try Roy's suggestion of executing DBCC UPDATEUSAGE?

If so, did change anything?

(I'm asking because you seem to have posted the exact question again.)

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf