脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2014-02-12 16:36:29
环境:
OS:Red Hat Linux As5
DB:11.2.0.1
通常情况下我们创建好scan监听器后,默认的都是使用1521端口后,但是因某种原因需要修改端口号,可以采用如下步骤实施.
1.停掉scan
[root@node1 ~]$srvctl stop scan_listener
2.修改端口
[oracle@node1 ~]$ srvctl modify scan_listener -p 1530
Exception in thread "main" java.lang.NullPointerException
at oracle.cluster.impl.scan.ScanFactoryImpl.modifyScanListener(ScanFactoryImpl.java:937)
at oracle.cluster.scan.ScanFactory.modifyScanListener(ScanFactory.java:417)
at oracle.ops.opsctl.ModifyAction.executeSCANListener(ModifyAction.java:1349)
at oracle.ops.opsctl.Action.execute(Action.java:291)
at oracle.ops.opsctl.OPSCTLDriver.execute(OPSCTLDriver.java:280)
at oracle.ops.opsctl.OPSCTLDriver.main(OPSCTLDriver.java:136)
这里很奇怪在grid用户下执行报错误 ,切换到root用户下执行
[root@node1 ~]# /u01/app/grid/11.2.0/bin/srvctl modify scan_listener -p 1530
3.修改数据库参数remote_listener
SQL> show parameters remote_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string racscan:1521
SQL> alter system set remote_listener='racscan:1530' scope=both sid='*';
4.重新启动scan
[grid@node1 ~]$ srvctl start scan_listener
[grid@node1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node node1
[grid@node1 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1530
-- The End --