Home Forums SQL Server 2005 Data Corruption Database in "suspect" mode (SQL Server Management Studio 2005) RE: Database in "suspect" mode (SQL Server Management Studio 2005)

  • henryvuong1000 (3/19/2011)


    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.

    seems a bit scary what you did ....

    Your statement didn't work because you didn't use "regular" single quotes.

    That also happens when you copy quoted text from e.g. MSWord.

    Replace the quotes by editing in a tsql panel and replace with new quotes.

    Why didn't you create a regular tsql backup ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me