Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2010
    Posts
    3

    Unanswered: Problem on database

    Hi

    I am a complete novice here.

    I have a database with a corrupt table on it. It came up with a ASSERTION ERROR 200601.

    I unloaded the table as suggested on the SYBASE site and after running for some time it comes up and identifies the table as SentRecipients.

    I have tried to follow the procedure from there, but it falls over on outputting the data until the server asserts. Nothing seems to get copied.

    Can I just rename the SentRecipients table to SentRecipients old in Interactive SQL and lose the data in the corrupt table. I assume that it will create a new empty SentRecipients table.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Nothing automatic will create a new table for you. You should be able to rename the old table to anything at all, or drop it. You may be able to create an empty new table by issuing "select * into newtable from old table where 1 = 0", but this will leave behind any identity columns, indexes, and primary and foreign key constraints. Alternatively, you could try to restore the database from a known good copy, and try to recover the data from that. You will likely want to run the restore to a new database, or you will lose any data from the time of the backup to the time of the restore.

  3. #3
    Join Date
    Mar 2010
    Posts
    3
    Hi

    Have gone into Interactive SQL, connected to the database and typed

    RENAME TABLE SentRecipients TO SentRecipientsOld and I get a ASA Error -131 Syntax Error near 'RENAME' on line 1.

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Look up the system stored procedure sp_rename. Not sure what system has a rename command.

  5. #5
    Join Date
    Mar 2010
    Posts
    1
    You can find the alter table rename command in the ASA 11 manual.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •