找回密码
 注册
查看: 4419|回复: 1

The listener supports no services解决

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-10-13 13:26:58 | 显示全部楼层 |阅读模式
[oracle@adrep ~]$ lsnrctl start8 T1 e" I5 o! t
* b$ U  z" Y! G

  |1 O) l% D" Z, F. e3 g" c& h$ CLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:11:38
, v# O9 R: O" ~9 y; ^0 E1 I4 Q+ I
6 I" q5 |3 ?3 j* i; h% w
3 @$ o' j" f. d; h7 f( ~1 pCopyright (c) 1991, 2011, Oracle.  All rights reserved.$ ]. U5 q% x( o

# E! a' m0 H  u: p. u
( l, k$ \+ d, a$ Z$ i: tStarting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
5 [+ Z+ X* ~" F! b) I
3 b5 G% M/ P7 O( R4 x9 D3 E( M$ M$ e! h5 X/ j. {' d" p2 ~
TNSLSNR for Linux: Version 11.2.0.3.0 - Production! j& a/ F1 \; C! C
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
5 S. F, O/ ?  c& P2 k1 \( Y; OLog messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
+ j" c; k+ }  Q3 |  t; F; q6 `Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))' F( H. |# K7 I$ G7 S1 X
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))/ _0 x. U8 m" Q. [6 w# T& ~% b: W
# B: C) A9 P/ ]7 }1 f

  \5 U+ g& @/ B. X( \Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521))): c5 E" U6 {) l& l% V* V. K$ s% Y! Q
STATUS of the LISTENER; q* m! P9 l1 f! D
------------------------' w1 p! d3 e8 Q) k  D
Alias                     LISTENER
1 X* l0 |, ]' _  G4 Q& q4 \1 }2 {+ VVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production# @0 r& J! _4 Z' y' E0 G; T
Start Date                14-SEP-2013 10:11:38; V9 D8 C6 V- |: B5 i7 z
Uptime                    0 days 0 hr. 0 min. 0 sec3 n+ K2 G' B4 ]# Q+ z0 ^6 P8 q
Trace Level               off! \8 V) s: |: `8 m5 N' @3 C
Security                  ON: Local OS Authentication* w; i/ E/ e# \; q- N
SNMP                      OFF( ^8 \  |; ]) }8 a3 F
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora; d. m9 O# B( k) R; s& c
Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
5 h# s# Z" L; c+ k# o( IListening Endpoints Summary...7 Q6 m) [5 g+ g" M/ U' ~
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))5 D3 \4 h3 H- T) \* R
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
3 r% U3 B" J1 d$ f6 `The listener supports no services0 X* r1 [' Z: O+ Y: j! _$ L" O
The command completed successfully
0 Q$ |: T7 P/ |, S% ?0 J, t由于这台主机之前做的是stream实验,修改了一下hostname,之前的监听和服务名也用netca重新配置过了,但是启动监听一致是这个状态,动态监听注册不上
2 H, c+ J8 o# l4 K% [# }
1 E/ W! a/ z" j# z# q' H5 D( M  ?本地登录到Oracle实例,手动注册实例也无果,问题依旧; S2 _- C4 W% w( J. _
% u  |6 q5 J  v: I( v
SQL> alter system register;
) z$ Z: z. b3 y: ~
1 R9 X7 n3 L& J3 S8 C7 v8 {: X9 q0 O2 d6 P6 z# D8 Q% g2 ^
System altered.. D5 }: c1 Y/ P8 E; d% x; i3 |) I
& k% D" f8 S9 r3 G

1 I; f+ s8 n& ~& u, G4 }% ySQL> !5 }2 E. u4 E. P, Y* [
[oracle@adrep ~]$ lsnrctl status! D2 P! o0 }& i$ \

0 B$ I, i' Q2 W4 x, C
  W2 Y  T; m) q- Y% OLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:03
3 |5 n6 T/ b, T+ D8 \9 T  k6 K9 t
8 l( w, k4 I( K7 N: A' R$ e
5 ^6 c! |3 ?' |' c1 gCopyright (c) 1991, 2011, Oracle.  All rights reserved.
/ T) Z. h! J$ o; ]! a; N3 M. x: f0 O% i8 A% F
. J6 l3 Z. J9 D
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
. Q7 B) c1 \4 ASTATUS of the LISTENER
3 _* {, o6 x/ E% U4 q( \* I------------------------+ o. R6 H+ K1 [" d; l9 h9 s
Alias                     LISTENER$ ]# y3 D, R& \: F6 q* y
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
& N1 p  G" M4 p# T5 b) h9 n! AStart Date                14-SEP-2013 10:11:38
. I8 O/ s- f; A5 ^- ]3 WUptime                    0 days 0 hr. 1 min. 25 sec
* C9 ^' ~: P% ^9 X5 u) cTrace Level               off
. I4 E% ~1 e5 k& i1 b+ U. ]! MSecurity                  ON: Local OS Authentication3 b, o$ t0 V- @# H$ _
SNMP                      OFF: r# ]  @; L* p2 r8 ?5 J  l
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora$ l# E% u+ m9 q* o( d- o9 o
Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
7 K5 D# E' T0 l9 ~. F2 tListening Endpoints Summary...
2 u* G% W0 D. ]3 q0 Z* S: c, z( D  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))9 X; ^. ]% L$ |5 Y$ k; R
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))8 F( [. ~; ~, {- U$ ]( r
The listener supports no services4 b! R; {8 S8 C+ L) ?
The command completed successfully
4 J0 S3 o+ o& a3 D& _) }/ L8 _. t: o- O6 Z
[oracle@adrep ~]$ lsnrctl reload
1 d. b0 y, E8 M5 d8 D Listener Log File         /u01/app/
. S( ]; R4 M+ a6 K- U
9 p% C2 H7 J7 G; S+ o' c- f! K! Y
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:16:134 C& d- ]! o  J. T4 f- J; {0 }

* I  l% v0 H% j( b
1 D& i: p/ e5 ]3 j9 e/ Y3 ?Copyright (c) 1991, 2011, Oracle.  All rights reserved.% P9 d/ S0 G  D. V% I

. N$ l8 l8 D5 d6 i' a5 B  J* a+ z. U" C
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
- T; T' H4 T2 I0 Q# hThe command completed successfully; W: a+ t/ ]9 W: J  b' Y
[oracle@adrep ~]$ lsnrctl status
7 Z8 j0 q: Y0 b$ h8 x* h3 q' \9 E6 y' {1 X9 {

4 y# Z( l: }% \# t( K' ELSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:18: l' p$ h" B$ s0 d# _
* h; \! ~: |$ X, N

3 w5 t% q; J& |% H0 r8 R# CCopyright (c) 1991, 2011, Oracle.  All rights reserved.
2 p2 a/ P, G3 X8 m4 y/ U; ^7 [4 {- M  q# K$ |

; ~: O4 ], D# }+ j2 X6 NConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))3 ^0 T! Q! V  w# w  @! X
STATUS of the LISTENER
$ T* y" h- ?% G------------------------
4 R; }7 t6 R2 b: QAlias                     LISTENER2 g5 e# z- i0 P
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production  L# y- U+ d1 |3 P1 ?7 |
Start Date                14-SEP-2013 10:11:384 I- L" u( }6 y$ Z' q" Q2 W
Uptime                    0 days 0 hr. 1 min. 40 sec2 o: u- j( f0 Q$ U3 b. C3 \
Trace Level               off
! i+ K9 g+ I) w8 Q6 R; G& MSecurity                  ON: Local OS Authentication& U2 l* X; v2 @4 e3 Z  S
SNMP                      OFF* w, B& [6 P6 n; Q, `
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora/ K1 Q+ ]9 y- N( y4 l  ^" l
Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
3 r( N$ \# [7 a/ J6 sListening Endpoints Summary...: k8 l/ N4 C0 e
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521))); u: \7 j! U6 v7 h2 ]0 k& U: b
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
! z! g0 U5 v9 F2 G3 S1 g, L2 EThe listener supports no services
' S/ f1 h# q9 ~6 i* VThe command completed successfully
7 c. F! O9 C# B, z6 U  c$ G[oracle@adrep ~]$ lsnrctl stop
6 ]% T: u2 I; P. t3 l+ i+ e  `6 f/ @6 u$ j# `: ~  q9 ~
" f) K% o0 x3 q. n% `( q5 M9 C

8 I  ^7 E& n5 N' P' _: zLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:17:033 E  U% L6 n5 X2 s& q7 n

' {+ c0 m$ P+ i4 u  ^: z- ?5 ]+ x$ F# L' }2 l* W
Copyright (c) 1991, 2011, Oracle.  All rights reserved.' g$ H! U$ N0 w( c! {" K
6 R2 D4 {# K: ?& m# g  [
+ I# t0 s! d( o5 ]: I4 D
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
4 V4 D9 [6 x1 b! ]The command completed successfully. q/ g% Y0 ~' _8 a4 s3 a
4 {9 ]) e1 W* a2 q* ~6 U1 W' E
[oracle@adrep ~]$ lsnrctl start
% s* C/ Q3 A! F
# ~4 z) X" r) u5 Y8 P& ~) y+ L+ ]  D1 G: r& C$ `1 ~
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:18:53
: b2 ~$ a7 D( c: T
: s" |( n8 b' U' c. U% B6 P5 c+ j! D. b1 V" U* x) A& b8 @
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
6 i; N+ D# e$ M, R% T: c
- U) t" A% N# F+ h3 g. F, ^) E1 u5 \: ^$ `; p
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...8 d' }, S3 U0 G9 E

/ Z! {* G6 n$ K
$ {  B& l6 }# R' @. g; gTNSLSNR for Linux: Version 11.2.0.3.0 - Production0 r5 c6 v% o6 F  c4 z( H
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
8 p- y- S" Q( \8 n2 _) y' iLog messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
$ k$ B' z) ~# y( q5 oListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))
* X) ?3 M6 o  xListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
5 F; J  X4 n/ f  f* U
6 T9 A) ?2 Y3 @+ ~; f% a" l  c1 v1 }2 ^! V+ K
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
8 j1 V" W+ @" o. H  FSTATUS of the LISTENER4 T' u! ]" A6 b+ \9 i
------------------------/ \3 I! P$ y8 A7 |
Alias                     LISTENER
& O2 h' v$ i/ v$ _$ N! GVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production7 C# X% C6 V9 q. [4 }! [# V9 ]7 V
Start Date                14-SEP-2013 10:18:53
) B; s. _( e) XUptime                    0 days 0 hr. 0 min. 0 sec
; M1 b9 N9 U  H2 nTrace Level               off" c2 d6 V2 Z* B) H( I
Security                  ON: Local OS Authentication
1 S5 y: K% D$ }" @SNMP                      OFF7 B, [8 C9 o/ |3 e
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora5 }- H- o8 V. e% m: K+ i
Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
0 {. Q! L: v/ d& ~Listening Endpoints Summary...
! J3 R( A1 E! u: `  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))) ~( h% f! f, P' ~* ]0 A' }
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
' |6 C* u1 n( x/ o; ^0 CThe listener supports no services7 I  Q; Q, M8 }
The command completed successfully) a, X' A6 w8 d
[oracle@adrep ~]$ 
- a3 c5 \( T/ P1 h3 J1 U. v& ^9 O7 Y0 E+ m/ Y
于是考虑通过mgr配置静态监听,但是让我郁闷的是,总是提示需要输入一个合法的SID
/ X, J# e" O# t. ~
5 s8 h2 G* |# ]
) a2 I1 J/ J5 b! z' R1 B- d7 n
) v/ B4 E% z  g$ w& w这个SID绝对是strmtarget没错的,global name即service name也确实是target,这个可以由以下参数获得佐证# `- W/ q6 `( y
8 _! v, J# _2 B' y  H* \, N+ v! p+ B% `# C
SQL> show parameter name
/ ?, y! w- e1 |9 G! |, z! z* {) L# X" N4 a5 u  t2 V4 b

) Q% y6 P" G/ j" W/ x; UNAME                                 TYPE        VALUE
: \& l- d4 l) s9 S5 W------------------------------------ ----------- ------------------------------6 W4 A* d3 l1 |$ v
db_file_name_convert                 string. y% ^9 r: ~( X0 |
db_name                              string      strmtarg, G5 R2 d9 g0 O* c" m
db_unique_name                         string      strmtarget* M5 f6 _: e4 b
global_names                               boolean     TRUE- X8 V; \: D% ^
instance_name                          string      strmtarget
, B9 B7 b3 u8 q# Q( _  Qlock_name_space                        string! R. y9 b8 w* {4 @; j
log_file_name_convert                string
* _6 C* o/ H4 O2 M5 bprocessor_group_name             string9 ?, e; o4 L/ |
service_names                      string      target
' h9 i0 B' G2 f" U+ W
+ `* X  J9 Z& d0 z' d' W, m. x也可以通过v$instance视图查到SID是正确的
6 D1 k1 T- C" `6 x/ M# Q8 i* i# Z" B6 \! T
SQL> select instance_name from v$instance;
8 ~' A' C8 G9 F3 v2 \7 g: `) u' v: d- \5 m% U; S5 {
INSTANCE_NAME
$ `7 |6 M; f! O$ Y9 n6 E----------------
6 k" m6 P. m  Nstrmtarget# a* N" [9 C0 B7 I. o4 R* K; Y

& F2 l, G/ ^( i4 x难道就没有办法设置静态监听了吗?NO,这里还有一种方法就是手动修改listener.ora文件,添加以下几行内容
! e0 G" a9 X8 @; l# ^2 m/ r! r+ A/ v# z9 m
SID_LIST_LISTENER =  % ~: u" ?( a& s
(SID_LIST =  
- \7 {9 I" j( B7 o! p  (SID_DESC =  # L8 l8 ?5 s% [( Z6 G( ?% n, K' w
  (GLOBAL_DBNAME = target)) h( i( ]7 u8 b- O9 x
  (SID_NAME = strmtarget)4 E) G& Q+ S( s# Z( A
  )
7 d3 U& ~1 g) g5 ?)
) Y, u9 R# g6 U: G, T( d
, Y1 W3 I+ M! U7 _. D& T# C其作用就是配置一个实例静态监听,只不过用这里跳过了图形化界面修改而已,如果是用netmgr成功修改了实例的静态监听,也是会生成以上几行代码的
" v! \8 S; A0 m7 q" y( m" z2 P+ @- y8 Q/ Q
这里可以先把listener.ora用xftp工具拷贝出来,修改完再拷贝回相同位置即可
# W& w$ n# U! L4 c1 z: d' X  ]7 C4 \' ]: c4 T9 M  Y
这里只需要重新加载一次监听就可以注册上实例了
* t$ G, w4 P5 b* L/ C
- B- A/ A, B7 _5 j% c% S[oracle@adrep ~]$ lsnrctl reload
* O6 c3 R8 @( n- s7 n) G: w1 A; U* n+ w& {
2 {8 w3 l' d, E5 D# e0 b7 |+ s, ^4 ^8 s. a
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:066 q) j  Y6 h3 G4 k; `

& K" X( g8 l6 D# k$ X) B9 y
% E, r: L; Y7 `0 lCopyright (c) 1991, 2011, Oracle.  All rights reserved.
' }8 t4 Y/ A! s+ R, I8 H# d/ `, x) K7 `3 n' ]. W' x: K
7 N  Q- g+ G$ S  S7 u0 x) V( R
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
% Z( I8 N# I* r+ m6 U9 }* @The command completed successfully
) A& y. w& h. \. E[oracle@adrep ~]$ lsnrctl status
' i, o( m2 Q5 P3 _+ G% k* t
. p; h! x1 m* n$ I; i
  w* Q" z& L0 T" m1 S5 P7 iLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:14& m, Y& h! W6 Q0 F. U

; T7 Y; p, B, I; r) E* M% K- I. R4 V0 y# {6 C
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
# ~# |$ r3 E7 G, t& L7 L
: Z% f6 L4 [, p9 [0 b
$ G- w" X" W2 A/ q6 TConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
7 d/ N) g* `  ^. m+ f6 o! p: H4 x! T' ^STATUS of the LISTENER
! m7 \4 C; q8 L; ]------------------------$ o9 J- l; _8 E
Alias                     LISTENER
7 y5 Z# C/ \5 Y" n4 TVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production( @# s4 H; \. A+ Q
Start Date                14-SEP-2013 10:18:53. a$ y* M7 i& l( C4 Y* u
Uptime                    0 days 0 hr. 13 min. 21 sec! k& C3 W: c8 q% h5 Q
Trace Level               off& j$ S1 i! n; Q6 z+ B
Security                  ON: Local OS Authentication
: d9 f8 m/ F0 g2 ]1 J7 k! J6 B& pSNMP                      OFF* R) Q! |( h" I& r+ y- S5 N
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
: k. S( t- N; @( u5 t' }! u6 |Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
8 S2 g; V8 ?% ]3 {5 U6 lListening Endpoints Summary.../ h8 k- ~) y& I2 Y! T# l
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))- Y4 m6 r$ `! Z
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
3 H5 W  I5 L( R3 U& z* q, p" c+ MServices Summary...- Y; t  H0 A1 `0 g7 C
Service "target" has 1 instance(s).. h3 n7 I. R% k, T6 G
  Instance "strmtarget", status UNKNOWN, has 1 handler(s) for this service...% t+ {  v, i8 [$ \
The command completed successfully! Z) k5 C- j4 ]: O+ c( ?
[oracle@adrep ~]$ 9 v9 ~& K7 l5 J/ k* d4 ?% F0 a' O- \

, [9 ^4 P" [$ F  w5 B- b' ?, Q! Z这里target实例通过以上方法,成功地把实例注册上了,注意"UNKNOWN"就表示是静态注册的,如果是"READY"则表示是动态注册的
; E4 ]* v* O, r9 T
9 ^1 [; y- Q0 e# P5 `7 i6 _注意:动态和静态监听可以共存,如:; T+ e- U5 l' z/ B3 c4 F+ M

) Y+ s: r% a3 i8 j4 z[oracle@zlm ~]$ lsnrctl status
/ \1 t5 g+ k8 h2 w3 Q- J- H  r/ l
1 J  x9 y( N. n1 s# r( m* L
& C" J8 p$ b) k6 B$ JLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 09:52:23( r& @: x3 \5 e# h7 T: D

$ Z) B! W* ]0 k+ P$ p
: E7 K/ _  h! v/ b5 \( d# s! H$ Q2 UCopyright (c) 1991, 2011, Oracle.  All rights reserved.% u, }! _$ d* d. w9 V; `' M

/ {7 K9 |. y1 Z, c* o9 n! ?8 r, z# H8 L" h/ A4 ^  u+ Z/ c
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zlm)(PORT=1521)))
: b* M! y- V# s# k# q( W2 u( jSTATUS of the LISTENER
' e: a8 O& f- ~2 X- V/ t( V------------------------
4 s& a1 w  X$ W6 ]Alias                     LISTENER
- e- h' A) z9 g' g, cVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production% u1 K0 J. g$ k# {4 h9 S# d: g5 c
Start Date                14-SEP-2013 09:15:04) C) K8 B) P  _% |& o9 r
Uptime                    0 days 0 hr. 37 min. 19 sec$ c1 S* Z$ p2 I) A
Trace Level               off( _1 l0 C% u4 c  p$ u0 z
Security                  ON: Local OS Authentication
( L/ z. I0 S1 O# vSNMP                      OFF$ Y- i, e& c% U) f1 ~
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
8 F+ c+ e. C1 P( E- AListener Log File         /u01/app/oracle/diag/tnslsnr/zlm/listener/alert/log.xml
2 [# |7 J3 m/ \; S" }. u( bListening Endpoints Summary...
' u  {0 g) E- v  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zlm)(PORT=1521)))  w# n( p% R  E. e
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))8 T/ `5 D% ]9 l7 O- p! t; U
Services Summary...3 ^+ O( D$ O, l$ P* ?1 j
Service "zlm11g" has 2 instance(s).
( V, J, r7 S; J6 d  r& G  Instance "zlm11g", status UNKNOWN, has 1 handler(s) for this service...
8 j' M; y0 b7 ?+ J/ k7 A% Z  F3 b  Instance "zlm11g", status READY, has 1 handler(s) for this service...
( Z3 ?) j/ O6 f# g% l4 U1 k0 XService "zlm11gXDB" has 1 instance(s).
% V8 g7 L% J+ }* o5 O  Instance "zlm11g", status READY, has 1 handler(s) for this service...# }* p2 }5 g( s2 s
The command completed successfully
/ s. B  b- J' S& r" D[oracle@zlm ~]$6 f1 q& q! V7 [# x' I6 }

+ T& @$ V+ c4 B0 y, r$ A以上是我在zlm主机上的监听状态,可以发现,同时配置了动态和静态的监听
2 t2 x2 Q6 S0 ]5 y& Q( H) P) ]% g
! _" {+ u8 k$ t总结:以上利用了手动修改配置静态监听的方法成功注册了Oracle实例,动态监听往往需要等实例启动后,过一段时间才会注册上,而静态监听则可以马上注册。而且一旦实例重启会造成动态监听暂时无效,有些版本的bug甚至会导致动态监听的注册就再也起不来了。所以我对于监听的观点是,尽量配置静态监听,这样就可以避免很多由监听带来的问题,诸如我们经常会碰到的几个ora error:ora-12541、ora-12514、ora-12154等,尤其是在RAC和DG中,一个监听的问题,往往会带来很大的麻烦,尤其需要引起大家的注意。, r* ~, O! C8 T

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2018-10-13 13:29:17 | 显示全部楼层
SQL> alter system register;+ W/ O, T: l+ j1 N# n) W) K

3 p* C- I5 m& F7 y: B2 ?; F' ESystem altered.  t6 Z: G/ x, c7 @5 r3 p( R7 r
SQL> !- g8 Q3 s/ T3 V2 c: F
[oracle@oracle ~]$ lsnrctl status
( {3 W, H! m# [
3 k* r4 a" N- \5 e8 W3 \LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 13-OCT-2018 13:28:27- S; |9 B% G  Q

3 t* T, z* V0 v1 y" v! p, `Copyright (c) 1991, 2009, Oracle.  All rights reserved.& N  A3 n) [  G. ~  ^8 F
$ D9 W4 C! D8 b) T$ _/ x: e6 C% ?
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.12)(PORT=1521)))
6 B8 R" c* t, f% V% Q3 kSTATUS of the LISTENER
4 S1 P2 C, X9 U4 o) w------------------------  H- x1 Y9 H, S, |
Alias                     LISTENER
8 S" R4 [1 t& F" [Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production3 p" F- R* k0 x- ]( }8 n5 [
Start Date                13-OCT-2018 13:25:15
' e7 T( ?. f8 _- X* [0 S  }Uptime                    0 days 0 hr. 3 min. 12 sec7 M5 @5 a4 `% E) X4 X
Trace Level               off
; ~2 f: }# S8 v4 N; PSecurity                  ON: Local OS Authentication3 z; c0 W' o/ u+ A
SNMP                      OFF
4 e3 D1 w- S: T) m9 R" Z1 p2 hListener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
6 `5 m5 f- W  Z  R, g; d9 nListener Log File         /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml: W2 B2 b) q6 T& j# p
Listening Endpoints Summary...
  ]% E5 p( U1 A  D5 s$ T, B5 J  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.12)(PORT=1521)))! I6 R& B- Q7 S, k
The listener supports no services
8 c& }  u1 w5 s' L. I- x; ]The command completed successfully- B* U3 R5 |) ?3 G& Q0 f- v! s* n

) r) E$ i0 c7 t$ lsnrctl reload7 ]- `) }7 W! Q

* x" V4 t3 k2 u5 kLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 13-OCT-2018 13:28:55
7 E; ^2 D: u- v/ o0 V' g. x6 P
0 X, b! R* W: q, l4 d: N$ XCopyright (c) 1991, 2009, Oracle.  All rights reserved.
: J1 w' T, L+ [
! Z5 U8 O  O' v* U, \7 w3 tConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.12)(PORT=1521)))" M& P9 f9 i3 W$ y$ W
The command completed successfully
+ b! M& \' ^2 A4 f! Q. p4 k
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:05 , Processed in 0.018132 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表