i want ot attch a >bak file with SQL 2008 i got error

  • dear all,

    when i attch a backup file with the (a.bak) i got error

    any body hel me,

    is not a primary database file .error 5171

    Vimal Kumar
    9999797952

  • Can you please post the statement that you are using? and the error...

    From what you have said, you cannot "attach" a backup, you need to restore it.

  • oke ,

    but i think ihave allready attch database from .bak file its works properly .

    now today i want to attch then i got error.

    can you please tell me how to check a .bak file it is correct or not.

    Vimal Kumar
    9999797952

  • You don't attach a backup file. You restore a backup file.

    RESTORE DATABASE <dbName> FROM DISK = <Backup file name>

    Exactly what are you trying to do? (step by step or exact command)

    What file is it (exactly) and where did it come from?

    What's the exact error message that you're getting?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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