cancel
Showing results for 
Search instead for 
Did you mean: 

server Error: 644, Severity: 21, State: 5 SYBASE DB

Former Member
0 Kudos

Hi,

We are getting the following error while bringing up our database on sybase. We did not change anything before restarting the server so really dont know what corrupted the index.

server  Error: 644, Severity: 21, State: 5

server  Index row entry for data row id (1953, 0) is missing from index page 8196 of index id 2 of table 'DBH_STG_THREADS' in

database 'saptools'. Xactid is (137127,40). Drop and re-create the index.

We did the following so far:

1) We found the table to be for database 'saptools'.

2) We found the index name to be DBH_STG_THREADS~0 for table 'DBH_STG_THREADS'

3) We tried to drop and recreate this index as nonclustered as suggested by note # 1964255

4) The drop command "

     drop index DBH_STG_THREADS.DBH_STG_THREADS~0

     2> go

    Msg 102, Level 15, State 181:

    Server 'XYZ', Line 1:

    Incorrect syntax near '~'.

is not able to recognize the character ~.


We understand that ~ means NEAR as mentioned in some documents, but this is not really helping.


We are unable to proceed with bringing up the server. 


Thanks in advance.


Ashish

Former Member
0 Kudos

Hi Mark,

We forgot to mention that we did try these tips earlier, before starting this thread. These options did not work. We tried both single as well as double quotes in the below mentioned way.

1> use saptools

2> go

1> drop index "DBH_STG_THREADS.DBH_STG_THREADS~0"

2> go

Msg 102, Level 15, State 181:

Server 'XYZ', Line 1:

Incorrect syntax near 'index'.

1> drop index DBH_STG_THREADS."DBH_STG_THREADS~0"

2> go

Msg 102, Level 15, State 181:

Server 'XYZ', Line 1:

Incorrect syntax near '.'.


Please advise.

Thanks

Ashish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Thank you all guys for the support forwarded to us for our issue.

The issue got resolved today by running the reorg command on the table. Once that was done we restarted the database which came up gracefully and brought up the job scheduler as well. This in turn ran the statistics on the table and corrected another error seen in disp_w(N) for USR41 table. After about half hour the server was back to normal, mean after completion of the statistics job.

Our environment is linux with sybase.

I hope this experience of ours helps others.

Thanks once again to all for contributing towards helping us.

Regards

Ashish

Answers (2)

Answers (2)

simon_ogden
Participant
0 Kudos

Hi,

Use square brackets, only certain commands work with 'set quoted_identifier on'.

drop index table.[index] or drop index [table].[index]

Cheers,

Simon

former_member182259
Contributor
0 Kudos

Actually, Deepak's should work...the problem was that the user originally had not turned quoted identifier on at all....so their attempts at drop index using double quotes caused syntax errors on the double quotes.  In addition, some commands do need to be run as tableowner vs. specifying the owner in the object spec - so as Deepak points out, 'set user <username>' bypasses the problem.   Deepak only forgot the final 'set user' to clear masquerading as that user.

You are correct, though that [ and ] work as well as double quotes - and more importantly, work in planclauses and reorgs where "" often don't......but.....

simon_ogden
Participant
0 Kudos


create\drop index doesn't get on with quoted_identifier, it will not work, hence my suggestion to use brackets (better anyway).

former_member188883
Active Contributor
0 Kudos

Hi Ashish,

Can you try using procedure sp_fixindex.against the affected table.

Hope this helps

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak,

With sp_fixindex sytax sp_fixindex database_name, Table_Name, Index_ID we tried the following

1> sp_fixindex saptools, DBH_STG_THREADS, 2

2> go

Msg 18055, Level 16, State 1:

Server 'XYZ', Procedure 'sp_fixindex', Line 272:

Procedure should be used on system tables only.

(return status = 1)

Would appreciate if we can get more tips.

Thanks

Ashish

former_member188883
Active Contributor
0 Kudos

Hi Ashish,

The probability here is your are not logged in as table owner. You may need to work it our in a different method.

Find the owner using

select user_name(uid), name from sysobjects where name = "TABLE_NAME"

set quoted_identifier on

set user <tableowner>

drop index TABLE_NAME."INDEX_NAME"

Hope this helps.

Regards,

Deepak Kori