Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Error can not attach a database with the same name?

Error can not attach a database with the same name?

Scheduled Pinned Locked Moved Database
databasehelpquestion
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 2456424
    wrote on last edited by
    #1

    Suppose in my SQL2005 database accounting is used in LAN, their copy two files: data1.mdf and data1_log.LDF another folder and renamed data2_log.LDF data2.mdf and, then, di transfer these 2 files into the same directory that contains the original accounting database when attach data2.mdf file into SQL2005 error: Can not attach a database with the same name as an existing database there. While I have renamed then why not attach files? want to attach the data file do?

    M M 2 Replies Last reply
    0
    • U User 2456424

      Suppose in my SQL2005 database accounting is used in LAN, their copy two files: data1.mdf and data1_log.LDF another folder and renamed data2_log.LDF data2.mdf and, then, di transfer these 2 files into the same directory that contains the original accounting database when attach data2.mdf file into SQL2005 error: Can not attach a database with the same name as an existing database there. While I have renamed then why not attach files? want to attach the data file do?

      M Offline
      M Offline
      Midnight Ahri
      wrote on last edited by
      #2

      let me guess, you rename it from windows explorer, am i right? it's okay, before you're going to press ok (proceed attach), at top of the form, there's "Attach As" column, change your database name below, good luck! :laugh:

      U 1 Reply Last reply
      0
      • U User 2456424

        Suppose in my SQL2005 database accounting is used in LAN, their copy two files: data1.mdf and data1_log.LDF another folder and renamed data2_log.LDF data2.mdf and, then, di transfer these 2 files into the same directory that contains the original accounting database when attach data2.mdf file into SQL2005 error: Can not attach a database with the same name as an existing database there. While I have renamed then why not attach files? want to attach the data file do?

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Seriously you are going about this completely the wrong way, you are treating SQL Server like a single user database IT IS NOT. To transfer databases you need to use the database tools NOT the windows explorer copy/paste. Stop, close down all your DB stuff and do some learning about SQL Server first, not by trying to use what little you know but by getting a book and studying it or work through some examples, try SQLServerCentral.com they are specialists in this area.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • M Midnight Ahri

          let me guess, you rename it from windows explorer, am i right? it's okay, before you're going to press ok (proceed attach), at top of the form, there's "Attach As" column, change your database name below, good luck! :laugh:

          U Offline
          U Offline
          User 2456424
          wrote on last edited by
          #4

          I did it, thank you much

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups