Copy database & attaching database with mdf only

  • I have a sample database AdventureWorks2008R2 in my default instance. I want to copy the whole database to the same instance by using different name. I am using export option under the tasks. The package is showing success but I couldn't see any tables created just it creating the database name . Please let me know what is wrong. With the copy database it is working fine but with export if I select whole database it is not working. Is it only export for some number of tables selection only. I hope you understand my point.

    And also in 2012 copy database option is not working for me. I am unable to attach database with MDF file. Previous I am able to attach sample databases with single mdf file but now I am unable, it is asking ldf also.

  • Just do a backup and restore for simply copying a database.

    When you want to attach an MDF file without LDF, you need to remove the LDF file at the bottom of the dialog.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks.

    Yes I did in the same way, I removed the ldf file. It is working in 2008R2 but it is not working for me in 2012.

  • ramana3327 (1/13/2014)


    Thanks.

    Yes I did in the same way, I removed the ldf file. It is working in 2008R2 but it is not working for me in 2012.

    I'd be very much surprised. There should be no difference in attaching MDF files for both versions.

    Can you post a screenshot right before you hit OK? And the error message if you get one.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Sorry my fault. It is working

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

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