Error can not attach a database with the same name?
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?
Re: Error can not attach a database with the same name?
because the name of the data base is part of the meta data INSIDE the files.... the names of the files has no bearing on the name of the database. The best way to make a copy of a database, is to make a back up.... create a new database, then restore from the back up, using the MOVE command to move the backup bits to the mdf and ldf of the new database.... Clear as mud I bet.