• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

Cold backup restore to test system

Hi;
In production DB we take cold backups. I wanted to restore this cold backup to test machine which has 4 DB's already.

I managed to open database but i'm confused with listener. When i write "lsnrctl start LIVE" int gives error because it's looking for the LIVE machine's IP and port number. I tried to edit listener.ora file but i couldn't managed to open the listener. What should i do to open this listener?
Could you explain how should i work with multiple oracle homes, multiple oracle users on UNIX.

Thanks
Ozgur
0
oturan23
Asked:
oturan23
1 Solution
 
marperCommented:
Basically you do not need to startup multiple listeners. One listener is good
enough for multiple databases, even though they are of different Oracle
releases.
Make sure that you run the latest listener, in your case 8.1.6.

The following is an example of the listener.ora for handling multiple databases.
######################################################################
# LISTENER.ORA Configuration
File:/u06/app/oracle/product/816/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sydney)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = tst00.world)
(ORACLE_HOME = /u06/app/oracle/product/816)
(SID_NAME = tst00)
)
(SID_DESC =
(GLOBAL_DBNAME = tst1.world)
(ORACLE_HOME = /u06/app/oracle/product/734)
(SID_NAME = tst1)
)
)
)
##################################################################

As you can see that we have two databases (tst00 and tst1) each on a different
release of Oracle namely 816 and 734 respectively. The port which we are
using is 1521 (default). Just restart the "lsnrctl" and clients should be
able to connect to that Hostname, SID and Port using the tnsnames.ora file.

If you still want to startup two listeners, for load balancing or utilizing
two NIC cards. Then the following needs to be done. First shutdown the
listener and change the Listener.ora file to specify LISTENER1 (or any other
name), LISTENER2 etc with appropriate Port number like shown below. Then
specify SID and ORACLEHOME for each of the databases. Once you have
configured your listener.ora file, you would need to startup the listener.
First startup the first listener as lsnrctl start listener1 and the second
as lsnrctl start listener2. To stop or check status simply use those
listener names. These are the listener names as specified in your
listener.ora file.

Example of the listener.ora file
################################################################
# Installation Generated Net V2 Configuration
# Version Date: Sep-16-97
# Filename: Listener.ora
#
LISTENER1 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= ora-dev)(Port= 1521))
)
LISTENER2 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= ora-dev)(Port= 1525))
)
SID_LIST_LISTENER1=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= ora-dev.)
(ORACLE_HOME= /u01/734)
(SID_NAME = perf)
)
)
SID_LIST_LISTENER2=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= ora-dev.)
(ORACLE_HOME= /u01/816)
(SID_NAME = dev)
)
)
##################################################################

The following shows that two listeners are running:

ORACLE> ps -ef | grep lsn
oracle 6967 1 0 16:11:48 ? 0:00 /u01/734/bin/tnslsnr listener1
-inherit
oracle 6969 1 0 16:11:57 ? 0:00 /u01/734/bin/tnslsnr listener2
-inherit

To summarize, you can have one listener for one or multiple databases, or you
have
multiple listeners for one or multiple databases.

Hope that answers your question, if you need further assistance please do let
me know.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now