Attachment Databse

  • how to attach databse file in sql server 2000.

    I have try code like this.....................

    execute sp_attach_db @dbname='MyInsurance',

    @filename1='G:\Insurance\App_Data\Database.mdf',

    @filename2='G:\Insurance\App_Data\Database_log.ldf'

    then error occurs like this.........................

    Server: Msg 602, Level 21, State 50, Line 1

    Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

    Connection Broken

    ---------------------------------------------

    plz help me, for successful attachment database....waiting

    Thanks:

  • Your code lis fine, but it seems like you mdf file is corrupted.

    Do you have any backup of the database? If yes try to restore it and run DBCC CHECKDB or DBCC CHECKTABLE (sysobjects) with ALL_ERRORMSGS

    Markus

    [font="Verdana"]Markus Bohse[/font]

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

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