Sharepoint database inconsistency??

  • Hi,

    We sharepoint databases on sql server 2005. In that databases one database 'SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435 ' Iam trying to bring offline it giving me the syntax error

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near '-'.

    But for the same database when I rightclick it and click take offline its working.....

    Then When Iam executing the below code,getting same error?

    ALTER DATABASE SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435

    MODIFY FILE ( NAME = SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log,

    FILENAME = 'E:\SQLLOGS\SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log.ldf');

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near '-'

    any body has a solution for this???plz

  • Have you tried this:

    ALTER DATABASE [SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435]

    MODIFY FILE ( NAME = SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log,

    FILENAME = 'E:\SQLLOGS\SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log.ldf');

    😎

  • Yeah Lynn,

    Thanks..Its worked. but small change..adding the square brackets to 2nd line, it worked..

    ALTER DATABASE [SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435]

    MODIFY FILE ( NAME = [ SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log],

    FILENAME = 'E:\SQLLOGS\SharePoint_AdminContent_1f7d4d63-662f-4180-a6b9-7d4b35b27435_Log.ldf');

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply