Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The output between sp_helpdb and sp_spaceused looks different after truncate tables.

369 views
Skip to first unread message

ミケフォ

unread,
Oct 3, 2011, 8:57:32 AM10/3/11
to takeshi...@jig-saw.com, tatsuya....@jig-saw.com
----
Products:
ASE for Linux sybase-ase-11.0.3.3
+ sybase-ase-11.0.3.3-6
+ sybase-ocsd-10.0.4-6
+ sybase-doc-11.0.3.3-6
OS:
Fedora Core release
Linux kernel 2.6.12-1.1380_FC3smp
Memory:
2048MB
----

I got different results both 'sp_helpdb' and 'sp_spaceused' on isql
from sybase server at some point when I truncated some tables for the
6 data devicefiles.
It looks like no consumptions were in output of 'sp_helpdb' while
'sp_spaceused' reported the correct consumption status.
I have the 6 data devicefiles by altering the new device fils to
database like:

-------------------------------------------------8<-----------------------------------------------
1> sp_helpdb EXAMPLE
2> go
device_fragments size usage free
kbytes
------------------------------ ------------- --------------------
-----------
example_dat01 2047.5 MB data
only 0
example_dat02 2047.5 MB data only
2096528
example_dat03 2047.5 MB data only
2096496
example_dat04 2047.5 MB data only
2096480
example_dat05 2047.5 MB data only
2096416
example_idx01 1023.5 MB data only
137536
example_log01 1023.5 MB log only
1048048

..snip..

(return status = 0)
-------------------------------------------------8<-----------------------------------------------

The above output cames from after the database is truncated by
'truncate table A_TABLE_IN_EXAMPLE'.
This outputs returned by isql are not changed everytime. It looks
stop the db server but it's running correctly.

While the outputs of 'sp_spaceused' say correct status like, they are
changed everytime.
-------------------------------------------------8<-----------------------------------------------
2011/10/03 08:00:02

database_name database_size
------------------------------ -------------
EXAMPLE 14332.0 MB

reserved data index_size unused
--------------- --------------- --------------- ---------------
2995052 KB 2054504 KB 939194 KB 1354 KB

(return status = 0)
-------------------------------------------------8<-----------------------------------------------

And I have noticed the return from DB server to emit 'update' query is
pretty late.

Could you please advice me what was going on my EXAMPLE database? or
let me know if you have same sistuation.
I can more details if any.

Thanks in advance.
0 new messages