Link to home
Start Free TrialLog in
Avatar of TRACEYMARY
TRACEYMARY

asked on

sp_spaceused

I noticed our data size grew 3 gigs last night when i di
exec Sp_SpaceUsed
i noticed negative numbers so i did
dbcc updateusage ('testcp') WITH COUNT_ROWS
and it was ok....fixed the values.

So should i do a dts job each night to do this
exec sp_spaceused @updateusage = 'TRUE'
dbcc updateusage ('testcp') WITH COUNT_ROWS

for all my tables.....

does any one else run these overnight.
Cheers.
SOLUTION
Avatar of Chris Mangus
Chris Mangus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TRACEYMARY
TRACEYMARY

ASKER

where on 2000
TRACEYMARY

Check out the link below to understand autostats and how to determine which tables require updating.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;195565

Regards,
menter
Thats the thread i am following and thats why i did the profiler to see what is happening.
The questions is ....it is performing auto stats every so many seconds......
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i think i set up a new job and do
dbcc updateusage

that saves me doing
sp_spaceused @updateusage = 'TRUE'  

every night.

Is there a way to do it for all databases .....and output to a table the results?

Cheers
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cheers...i get that put on our servers to run every night.

Any problems with space issues or anything gained except updating system tables?
i.e can i report any ....thing to boss saying oh by running this ...i get the following:
You only should run this batch when you query after this batch the database/table/index sizes. Otherwise you better can not run this batch. This batch locks the resources it checks.
Best is to save the storage data to use it with statistics to predict the growth of the database or the objects witin it.
Ok thanks for the heads up.
If i see the table index sizes going negative for example then run this command.

Cheers