Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    5

    Unanswered: Database in "suspect" mode (SQL Server Management Studio 2005)

    This morning, I made a backup copy of the SQL Server database. Because the log file has grown too big (over 15GB), I first shrank it to 1mb. After copying it, I opened SQL Server Management Studio 2005, tried to attach the backup database to it, but the operation failed. My guess is because the original database, which has the same name, has been previously attached to the SQL Server Management Studio. By trying to attach another db with the same name, I created a conflict and the operation failed. But what troubles me now is that the original database is labeled as "suspect" in SQL Server Management Studio. It looks like the original db has been corrupted.

    I ran the following sql command:
    DBCC CHECKDB ('DatabaseName’) WITH NO_INFOMSGS, ALL_ERRORMSGS
    and the following message appeared:

    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near '‘'.
    Msg 319, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
    I used the copied database to overwrite the original one but it did not help. The problem exists, it looks like now the copied db is also corrupted. Too bad now I cannot even use the log file to restore the database because I have shrunk it to almost nothing.

    Can any offer a solution? This is urgent because I used this database to run my own business at home. Thanks.

  2. #2
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    My eyes are not as good as they used to be, but it sure looks to me like the single quote you have used after the DatabaseName is not the same kind of single quote as the one you used before the DatabaseName.

    It looks like that second single quote is some accent character, or possibly some higher-order character.

    I may be seeing things, but you may want to check that out.

    Ken
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    How did you shrink the log file? What command/tool was used?

  4. #4
    Join Date
    Mar 2011
    Posts
    5
    I got my answer from another post. But thanks anyway. Just in case someone runs into the same problem, here's my other post:

    Database in "suspect" mode (SQL Server Management Studio 2005)

Posting Permissions

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