Attaching a database

  • Dear All,

    I have a problem of attaching a database, this is what happened: The transaction log was full so I couldn't perform any backups or do anything on the database. then I detached the database and deleted the log file, now when I try to attach the database it tells me that there is a device activation error, the path of the logfile may be inncorrect. Is there another way of getting the database online.

    I thank you in advance

     

  • From the sounds of it you need to script up the attach rather than using EM to do it, this will then recreate the missing log file (hopefully).

  • H,

    please have a look at

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=214717

    especially the posting of Martin Mojzisek...

    regards karl

    Best regards
    karl

  • I've had similair problems in the past and if I recall correctly used 'sp_attach_single_file_db' via OSQL.

     

    Regards,

    Steve.

  • All good posts for solutions ... but ... what caused them transaction log to fill in the first place ? I've never run into a situation where you could not backup a transaction log or truncate it based on your recovery mode (unless the database is corrupt).

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

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

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