sp_attach_db without log files

  • Hi,

    Put manual entries for MDF/NDF/ fies in sysaltfiles  table. Put new manual entry for new LDF file in sysaltfiles. for the database to be attached

    Put manual entry in sysdatabases table for the database to be attached with status column=32768

    Restart the server, it will show the DB in  emergency mod

    dbcc rebuild_log ('dbname','new ldf path')

    reset the status of db to normal status in sysdatabases table

     

     


    subban

  • sorry for the fase ref.

    try :

    ALTER DATABASE [Dorian Event Archiver] Set single_user WITH ROLLBACK IMMEDIATE

    go

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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