Oracle Server - Enterprise Edition - Version: 11.2.0.0 and later [Release: 11.2 and later ]
Oracle ASM Configuration Assistant (ASMCA) can be used in silent command-line mode.
ASMCA supports only alias-based (net service name based) configuration for local_listener parameter.
This article demonstrates to configure local_listener parameter with ASMCA in silent mode.
步骤如下:
ASMCA supports only alias-based (net service name based) configuration for local_listener parameter.
If you configure local_listener parameter with the network address, ASMCA fails as follows.
$ asmca -silent -configureParameter -param LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=port number))'
Invalid value passed for -param option: Expected format
<paramname>=<paramvalue>
1. open tnsnames.ora with text editor, and prepare net service names to be used for local_listener parameter.
net_service_name = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = port number))
2. run ASMCA as follows
$ asmca -silent -configureParameter -param LOCAL_LISTENER=net_service_name
Parameter LOCAL_LISTENER configured successfully.
参考:
BUG:9714623 - ASMCA DOES NOT UNDERSTAND THE VALUE '(ADDRESS=(PROTOCOL...)' FOR LOCAL_LISTENER