Update sysindexes table in Sybase 12.5.4
Posted by: Colin Smith
I am moving a Sybase instance from one host to another. I have done all the installation and patching and I have loaded all the databases with little to no issues. I ran into a big issue when attempting to change to indexes in sysservers to allow duplicate rows. I had to go and find out what the binary value for the setting that I wanted was and then find out what column held that value. I determined, from looking at my current instance, that I needed the Status colunm to be changed to 64. I then verified this by looking here at the definitions for the table.
http://infocenter.sybase.com/help/index….
I attempted droping the indexes so that I could just recreate them but you are not able to use Drop Index when working with system tables. That is when I decided to find the value and the column to update. So then I ran a query:
Select name, status from sysindexes
where name = ‘csysservers’
and status = 146
go
This returned on row for me and I thought now I can run the update
update sysindexes
set status = 40
where name = ‘csysservers’
and status = 146
go
Now I get the following error:
Cannot update more than 1 sysindexes row at a time.
Well this did not make sense at all. When I run the select I only get one row returned. But I took the advice of the error and modified my where clause to include more columns and then I was able to make the updates that I needed.


