Results 1 to 6 of 6

Thread: Same database name on different servers

  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Question Same database name on different servers

    Hi,
    I need to set up a test database on a separate test server for the production database. Could I use the same database name and global database name for the test database? Will this cause any naming conflict or problem for the production database?

    Celia

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You should be fine. Unless you are using Name server to connect to a database.

  3. #3
    Join Date
    Feb 2004
    Posts
    1

    Exclamation

    I would not recommend maintaining 2 instances of the same name even on different servers. Oracle will run fine but you introduce 2 compliations to your environment:
    1) Users (and yes even you, the DBA) may be confused sometimes about which instance is being referenced.
    2) You lose easy portability. If ever you need to move both instances onto one server (believe me, it happens) you will need to massage them

    In summary, I say
    A) Keep instance names unique accross your environment.
    B) Use the OFA standard to keep filesystem names unique for each instance accross all your servers.

  4. #4
    Join Date
    May 2003
    Location
    Near Harrisburg, PA
    Posts
    6
    There are two ways to handle this. You can easily change the name of your new instance using the Oracle command line utility called NID. It is described in the utilities manual for 9i. I'm not sure if it's part of 8 or lower.

    The second way, which I use, is to change the global_name of your new database using:

    ALTER DATABASE RENAME GLOBAL_NAME TO NEDSSARP.test;

    You can't use this to change it back if you thought you would move a copy off, modify it then put it back. All you can do is change the value to the right of the dot. You can put more than one domain value there like oracle.west.com etc.

    What you are doing is appending the part to the right of the dot. When you connect execute this query:
    select * from global_name;

    to make sure you are connected to the right instance.
    I use a login script to capture this into my sql prompt so I always know what database I am connected to.

    If you use a tnsnames file create an alias for this database. It has the same SID as your prod database and it wouldn't do to mix them up. This is the entry for my clone database.

    PRODCLONE = --Instead of NEDSSARP
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 164.156.96.228)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = NEDSSARP)
    (SERVER = DEDICATED)
    )
    )

  5. #5
    Join Date
    Feb 2004
    Location
    North Carolina
    Posts
    3
    I would avoid using the same two global names even across multiple servers as this might cause confusion in the tnsnames files. It would be more effective to clone the production database (via O/S file copy) and bring the clone up using an alternate controlfile (made and edited via "alter database backup control file to trace"). You then can register both the production and the test clone simultaneously.

  6. #6
    Join Date
    May 2003
    Location
    Near Harrisburg, PA
    Posts
    6
    I actually found something even easier than that. It's surprising that more people don't use it.

    For 9iR2 Doc 224266.1 How to Change the DBID and the DBNAME by using NID on MetaLink.

    If you don't have access to metalink then check the documentation on OTN. You'll find a reference to the NID utility in the utility manual. It allows you to change the name and the dbid using a command line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •