設置監聽密碼



一、設置密碼

  1. 在監聽啓動狀態設置密碼
    1. [oracle@node1 admin]$ lsnrctl[oracle@node1 admin]$ lsnrctl
    2. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-NOV-2016 09:45:45
    3. Copyright (c) 1991, 2013, Oracle. All rights reserved.
    4. Welcome to LSNRCTL, type "help" for information.
    5. LSNRCTL> status
    6. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
    7. STATUS of the LISTENER
    8. ------------------------
    9. Alias LISTENER
    10. Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
    11. Start Date 25-NOV-2016 09:35:38
    12. Uptime 0 days 0 hr. 10 min. 10 sec
    13. Trace Level off
    14. Security ON: Local OS Authentication
    15. SNMP OFF
    16. Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    17. Listener Log File /u01/app/oracle/diag/tnslsnr/node1/listener/alert/log.xml
    18. Listening Endpoints Summary...
    19. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.66.101)(PORT=1521)))
    20. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    21. Services Summary...
    22. Service "orcl" has 1 instance(s).
    23. Instance "orcl", status READY, has 1 handler(s) for this service...
    24. Service "orclXDB" has 1 instance(s).
    25. Instance "orcl", status READY, has 1 handler(s) for this service...
    26. The command completed successfullyLSNRCTL> change_password
    27. Old password: 
    28. New password: 
    29. Reenter new password: 
    30. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
    31. Password changed for LISTENER
    32. The command completed successfully
    33. LSNRCTL> save_config
    34. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
    35. Saved LISTENER configuration parameters.
    36. Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    37. Old Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.bak
    38. The command completed successfully


  2. 9i 異常
    當執行save_config保存時會報異常
    TNS-01169: The listener has not recognized the password
    此時運行
    1. LSNRCTL> set password
    2. Password: 
    3. The command completed successfully
    4. LSNRCTL> save_config
    5. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.101)(PORT=1521)))
    6. Saved LISTENER configuration parameters.
    7. Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    8. Old Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.bak
    9. The command completed successfully
    10. LSNRCTL> exit
  3. 修改監聽文件
    # PASSWORDS_LISTENER下方添加
    LOCAL_OS_AUTHENTICATION_LISTENER = OFF
  4. 重啓監聽

二、測試

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章