• That's great, unless you want to recreate the log.

    CREATE DATABASE [name] ON (FILENAME = [path to mdf]) LOG ON (FILENAME = [path to ldf]) FOR ATTACH REBUILD LOG

    will give an error if the log file isn't in place. When you're dealing with limited bandwidth, and sever time constraints, leaving the log files behind if you get a clean detach can be the best choice.

    CREATE DATABASE [name] ON (FILENAME = [path to mdf]) FOR ATTACH_REBUILD_LOG

    should create the log file in the default log store for the server, but it's putting it where the database is.

    The last 4000 databases I moved this way put the logs in the right places.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]