Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Negative values in "sp_spaceused"

2 posts in General Discussion Last posting was on 2010-01-01 01:23:27.0Z
RGS Posted on 2009-12-31 23:17:39.0Z
Sender: 2c95.4b3d302e.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Negative values in "sp_spaceused"
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b3d3113.2ca9.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 31 Dec 2009 15:17:39 -0800
X-Trace: forums-1-dub 1262301459 10.22.241.41 (31 Dec 2009 15:17:39 -0800)
X-Original-Trace: 31 Dec 2009 15:17:39 -0800, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28814
Article PK: 78052

I was running a batch process, in this process, I have a
UPDATE sentence and ASE was freeze on this sentence

We reviewed the table with "sp_spaceused" and ASE shows
negative values:

name rowtotal reserved data index_size
unused
-------------- -------- ------------- -----------
------------- -------------
ca_transaccion 103234 -508787066 KB -2576356 KB -220096736
KB -286113974 KB

In aditional, the "rowtotal" is incorrect, this table is
very big

What happens? The table is damaged? What I have to do?

I am using ASE 15.0.3

Thanks!!


"Mark A. Parsons" <iron_horse Posted on 2010-01-01 01:23:27.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Negative values in "sp_spaceused"
References: <4b3d3113.2ca9.1681692777@sybase.com>
In-Reply-To: <4b3d3113.2ca9.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 091223-0, 12/23/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b3d4e8f$1@forums-1-dub>
Date: 31 Dec 2009 17:23:27 -0800
X-Trace: forums-1-dub 1262309007 10.22.241.152 (31 Dec 2009 17:23:27 -0800)
X-Original-Trace: 31 Dec 2009 17:23:27 -0800, vip152.sybase.com
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28815
Article PK: 78056

Was this database by any chance upgraded recently from ASE 12.x? If so, did the DBA run the installmaster script after
the upgrade? If not sure, run the following and post the results back here to the newsgroup:

exec sp_version

[ASE 12.x table space usage data was obtained via the sysindexes table; ASE 15.x no longer uses sysindexes to obtain
space usage data; so if the ASE 15.x dataserver is still running ASE 12.x stored procs it's possible to generate
incorrect results when running sp_spaceused.]

Did sp_spaceused ever display the correct results for this table while running ASE 15.0.3? If so, can you recall any
major changes (eg, EBF upgrades, recovery of the user or sybsystemprocs databases, etc) to the dataserver since the last
time sp_spaceused reported the correct results?

How many rows does the table actually have? [There were a handful of bugs with 12.x and early 15.x dataservers with
tables having more than 2 billion records - the bugs would lead to inaccurate results being generated by sp_spaceused;
wondering if you could be running into a similar problem.]

Does sp_spaceused report the correct results for other tables in the same database?

What application are you using to run sp_spaceused? Do you get the same incorrect results if you use the 'isql' command
line tool that comes with ASE 15.0.3? [Some older applications have problems with the newer/larger datatypes generated
by ASE 15.x dataservers; if the ASE 15.0.3 version of 'isql' returns the correct result then chances are your table is
fine and you just need to get your front-end application upgraded.]

Do you have any other dataservers that contain this same table? If so, are they reporting correct or incorrect
sp_spaceused results? Also, what are the version strings (select @@version) for each dataserver in question?

Have you run any dbcc's against the table and if so, did they report any issues?

RGS wrote:
> I was running a batch process, in this process, I have a
> UPDATE sentence and ASE was freeze on this sentence
>
> We reviewed the table with "sp_spaceused" and ASE shows
> negative values:
>
> name rowtotal reserved data index_size
> unused
> -------------- -------- ------------- -----------
> ------------- -------------
> ca_transaccion 103234 -508787066 KB -2576356 KB -220096736
> KB -286113974 KB
>
> In aditional, the "rowtotal" is incorrect, this table is
> very big
>
> What happens? The table is damaged? What I have to do?
>
> I am using ASE 15.0.3
>
> Thanks!!