oracle 提供了lsnrctl reload 命令,在下面两种情况
1. 修改listener.ora
2 .修改sqlnet.ora
之后又不想停止监听,可以考虑lsnrctl reload命令!
reload命令会重新读取listener.ora的内容,这个命令让用户不停止监听器的情况下,改变监听器的配置。
但是对于sqlnet.ora的修改考虑以下情况:
1. 如果之前sqlnet.ora没有被当前的监听器使用,这时必须关闭然后重启监听!
2. 如果之前正在使用sqlnet.ora,那么lsnrctl reload 是比较快的方式。当前已经建立的连接不会受到影响,动态监听服务完成的非常快,也几乎不受影响。
官方对于lsnrctl reload的解释:
In addition, the database services, instances, service handlers, and listening endpoints that were dynamically registered with the listener will be unregistered and
subsequently registered again.
意思和上面解释的差不多,在生产环境中对于sqlnet.ora文件的修改,保持必要的谨慎。
之前做实验进行lsnrctl reload 并未达到理想的效果。在生产库上执行的时候是选择了lsnrctl start/stop.
这两步操作的时间是很短的,3-4秒完成关闭和重启操作。