Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Error executing Stored Procedure

Author  Topic 

satishbeh
Starting Member

3 Posts

Posted - 2005-09-04 : 13:53:27
I am executing a Stored Procedure which has start date and end date as parameter every month. For example I give start date to be the first day of the month and the end date to be the last day of the month.
Now when I execute the stored procedure I get the following error message:
"EXTENT CHAIN FOR OBJECT 1026870775 IS NOT CORRECTLY LINKED. SQL SERVER IS TERMINATING THE PROCESS"

The Stored procedure works when I execute for each day separately
ie '01/08/2005','01/08/2005'
'02/08/2005','02/08/2005'
'03/08/2005','03/08/2005'

When I execute the same for the following date:
'01/08/2005','03/08/2005'
I get the same error.

Can any one help me how I can overcome the above error message

I am using SQL Server 6.5 version

Satish


nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-04 : 15:36:30
Sounds like you have a corruption.
try dbcc checkdb (or chektable if it's available).

Try rebuilding the indexes - if that doesn't work then restore from backup.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-09-05 : 00:56:19
it'll probably help if you post the SP so we can see what's invoking the error

--------------------
keeping it simple...
Go to Top of Page

satishbeh
Starting Member

3 Posts

Posted - 2005-09-05 : 13:26:46
How can I trace the SP for error
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-05 : 14:58:20
It's robably nothing to do with the error.
have a look at sysobjects to see what 1026870775 is.

You are getting the error sometimes because the corruption is just in some of the data. If you access the table data via an index then you may not access the corrupted data and everything is ok.

Find out whether the corruption is data or an index - try select max(fld) from tbl where fld is anything that is not indexed. If that works then you are ok as the coruption is in an index. It probably won't though and you have lost some data.
You can get all the data execpt the corrupted pages by using the indexes. I usually bcp the data out to a file and back in again to another table.
You may be able to get back some of the data from the corrupted pages by just accessing the indexed fields.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -