Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm configuring data guard. I want to register the local_listener parameter with two tnsnames: tnsname1 and tnsname2.

I use `ALTER SYSTEM SET LOCAL_LISTENER='tnsname1','tnsname2';

but it doesn't work. Can anyone help me?

Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Not sure I understand exactly what you're trying to do here. The LOCAL_LISTENER parameter defines an oracle listener or list of listeners, typically defined in your tnsnames.ora file, that your instance should register with. For example:

my_listeners=
    (DESCRIPTION =
      (ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))
      (ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1522))
    )

This means you have two listeners running on your local server, one at port 1521 and the other at 1522. Use:

ALTER SYSTEM SET LOCAL_LISTENER=my_listeners

to register your database with those two listeners. I don't think you can specify multiple tnsnames entries in the command.

share|improve this answer
add comment

ALTER SYSTEM SET LOCAL_LISTENER='tnsname1';

Then in the tnsnames.ora file configure two listeners for that name.

tnsname1 = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 6000)) )

If the listeners are not local use ALTER SYSTEM SET REMOTE_LISTENER='tnsname2';

tnsname2 = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host2)(PORT = 3000)) (ADDRESS = (PROTOCOL = TCP)(HOST = host3)(PORT = 4000)) )

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.