Two Databases - same name: Can do?

  • I have to do some work with archived data which requires me to restore the data to the same server our current data is on. That means that I will have two databases with the same name. Here is what I plan on doing:

    1. create a new instance (\\servername\Archive)

    2. create a new folder on the SAN (Archive files)

    3. move the archive database files (master, model, msdb, userdbs) to this folder.

    4. attach the files to the new instance.

    This will give me two instances (Default and \\servername\Archive) each with a database having the same name, but different file locations.

    Does anyone see any problems with doing it this way?

    -SQLBill

  • SQL Server Terminology has different meanings for Servers, Named Instances and Databases. You cannot have 2 databases or two named instances with same name.

  • System databases cannot be detached and attached.

    When you setup the second instance, the system databases are all created by the setup. You can just attached Your database if you donot need to move jobs, dts packages etc to the archive database.

     

     

     

  • you could have two databases with the same names if they were in separate named instances.


    Cheers,

    david russell

  • SQLBill, why don't you just restore the database to another name in the same instance as the existing production database ? It seems to be a lot less of a headache to get to that point (and for cleanup later).

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Due to applications being used, I need the database name to remain the same. This way the only thing that needs to be changed is an ODBC connection to the 'archive' instance.

    BTW-we finished the move (including the system databases) and everything is working fine. At least as far as SQL Server is concerned.

    -SQLBill

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

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