Re: How do you create 2 dbs on the same machine

From: Priyesh Amin <p-amin_at_nimr.mrc.ac.uk>
Date: 16 Feb 1995 16:28:30 GMT
Message-ID: <3hvufe$hb4_at_mercury.hgmp.mrc.ac.uk>


In article <199502151347.NAA00395_at_altair.scms.rgu.ac.uk>, cs5gr_at_scms.rgu.ac.UK says...
>
>
>In article <199502142131.VAA00770_at_dracon.scms.rgu.ac.uk> I wrote:
>>
>>For a project I am currently involved in I have to simulate
>>a distributed database system using ORACLE Version 7. I was going
>>to do this by just having calls to tables in different tablespaces.
>>
>>I would like to know if it is possible to create another separate
>>database with its own files on the same machine?
>>There is currently the "scms" database on the machine. Would there
>>be a problem with the ORACLE_SID with 2 dbs on the same machine?
>>
>>Has anyone already done this?
>>
>>Is it difficult to connect the 2 dbs?
>>
>>Please mail me if you can help.
>>Thanks in advance,
>> Graeme.
>>
>
>I forgot to mention that it's on a unix platform (if that makes any
>difference).
>
>Thanks,
> Graeme.

It is possible to have any number of databases running on the same machine. The limiting factor is the memory available on the machine you are running.

Lets assume that you only want 2 databases for the purpose of testing and lets also assume that you have enough memory.

When creating a seconnd 'instance' on a UNIX box, it is safer to create a database by script rather than through the standard installation scripts that come with Oracle. But first, a little preparation.

You will need to create an 'init<SID>.ora' parameter file in the $ORACLE_HOME/dbs directory. Take as your start point the init.ora parameter file for your existing database (incidently, <SID> represents the database instance you are about to create).

Next, edit a file in /etc called oratab (I think - cant check at the moment, not linked to a UNIX box). This will make the database available for networking purposes.

Then, in the $ORACLE_HOME/dbs direcotry, look for all files with your existing <SID> as part of the file name. One of them should contain a 'CREATE DATABASE' statement. Duplicate them replacing the existing <SID> name with your new <SID> name.

Finally, read very carefully the Oracle installation guide for your port specific implementation of Oracle - I may have forgotten something.

Once you have done that, you can run the scripts to create a new instance. It is worth considering the size your new database needs to be. If it is for testing only, you may want to reduce the size a little.  However, you will need to run a number of standard Oracle scripts to load the system and sys catalogs. These should be documented and are details should be in the installation guide. For exampe, in the $ORACLE_HOME/rdbms/admin directory, you will probably need to run catalog.sql and catproc.sql.

To answer the final point, you can connect from one database to another using the command 'create database link'. Its in the manual - good luck! Received on Thu Feb 16 1995 - 17:28:30 CET

Original text of this message