Pendengar pangkalan data Oracle ialah program yang bertanggungjawab untuk memantau perkhidmatan pangkalan data Fungsi utamanya adalah untuk menyediakan port dan sambungan untuk operasi pelanggan dan mengekalkan komunikasi antara pangkalan data dan pelanggan. Apabila pengubahsuaian kepada pendengar diperlukan, terdapat beberapa faktor dan langkah yang perlu diambil kira.
Faktor yang mencetuskan pengubahsuaian pendengar biasanya termasuk: perubahan topologi rangkaian, pengubahsuaian parameter contoh pangkalan data dan perubahan konfigurasi keselamatan. Agar konfigurasi baharu berkuat kuasa dan memenuhi permintaan pelanggan, konfigurasi pendengar perlu diubah suai dengan sewajarnya. Langkah-langkah khusus adalah seperti berikut:
Langkah 1: Semak status semua pendengar
Sebelum mengubah suai pendengar, Mula-mula semak status semua pendengar Gunakan perintah lsnrctl status untuk melihat status semasa pendengar, seperti:LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yourhost)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 26-MAY-2019 09:21:48 Uptime 0 days 0 hr. 8 min. 29 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/yourhost/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yourhost)(PORT=1521))) Services Summary... Service "orcl" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully
# 添加一个新的服务监听 SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (SID_NAME=test) (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1) (PROGRAM=oracle) ) ) # 添加监听的IP地址和端口 LISTENER= (DESCRIPTION_LIST= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.1.10) (PORT=1521) ) ) ) # 添加新服务的信息 SID_DESC_LISTENER (SID_DESC = (GLOBAL_DBNAME=test) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = test) )
LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yourhost)(PORT=1521))) The command completed successfully LSNRCTL> start Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/yourhost/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yourhost)(PORT=1521))) Services summary... Service "orcl" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully
tnsping test
Atas ialah kandungan terperinci Bagaimana untuk mengubah suai pemantauan dalam oracle. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!