AboutPeter Choi Expertise I am a senior Oracle DBA, PeopleSoft Administrator and Project Manager with
10 years experience. I have been working with PeopleSoft (HRMS 5, 7, 7.x and
8.9), Oracle RDBMS (7.3 - 10gR2) on various Unix and Windows platforms, and some Oracle Application Server (9i/10gR2). I also have experience with the configuration and administration of BEA`s Tuxedo and WebLogic for PeopleSoft 8.x.
Question I have a server running Oracle on Linux, and I need two data bases (one for testing, and one for production), how I can switch from one to another ?
Is necessary two listeners ?
Wich is the procedure to pass data between then
Answer Hi Gabriel,
You can have two database instances running on the same server. If they are the exact same Oracle version and patch level, you can have one database listener listening to both instances.
On Windows, Linux and Unix, there is an environment variable called ORACLE_SID. This should be set to the database that you wish to connect as. Thus if you set ORACLE_SID=DB_TEST (assuming that DB_TEST is your test instance) then you can issue SQL*PLUS that will connect against that database instance.
To change to your DB_PROD instance, set the environment variable to ORACLE_SID=DB_PROD.
While you don't always have to set these variables, it's safer especially when you have to log in to the database instance as SYS or SYSTEM to administer the database.
If you're only running as a simple Oracle DB user account (i.e. not as SYSTEM or SYS), say just using SQL*Plus, then you can specify the instance on your command line...