Restoring a database without a ldf file

  • Hi,

    I'm trying to restore an old database that's missing the ldf file.

    Is this possible?

    It's recovery model is SIMPLE.

    I figure the answer is no but it would be a nice surpise if I can.

    Any help welcome.

    Eamon:)

  • Are you restoring from a SQL Server backup or just an mdf file that is on tape?

    David

    @SQLTentmaker

    β€œHe is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Hi,

    It's just a single .mdf file, no bakup.

    Thanks,

    Eamon

  • What do you have in first place, a backup file (.bak) or a .mdf file? In either cases, you can setup the database. Use BACKUP DATABASE if you have a backup file, Or ATTACH DATABASE in case you have a .mdf file.

    --Ramesh


  • Put the MDF in the SQL Server data folder and go to management studio and use the attach wizard it will tell you LDF not found in the message section. Right click and remove that message and then attach it SQL Server will attach it for you. This is assuming it is just a development database. Post again if you still need help.

    Kind regards,
    Gift Peddie

  • Giff,

    that's worked.

    I did get an error message with regarding a connection to the server and decided to reboot the server which did the trick πŸ™‚

    Thanks alot to you and all πŸ˜€

    Eamon

Viewing 6 posts - 1 through 5 (of 5 total)

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