|
|
[oracle@adrep ~]$ lsnrctl start
. P1 J6 P. i- E7 l ]1 m# e: W* ^! x; {( @% F- |$ d' T1 z5 d
( C4 W8 h: v2 J# W/ q) h
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:11:38* D" h& [4 d a; F0 g
- M! w) v" K: K) J& d. m
, r; M8 L) v8 K4 j: m
Copyright (c) 1991, 2011, Oracle. All rights reserved.7 T5 T- a3 A R; ^5 F
, h6 L; l, \# T, m1 t ~7 z4 E2 Z8 X
+ E4 n$ H. v! G# d0 E
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...0 D# [9 M) u7 J0 u9 l
& b$ s+ S3 O- u! W$ \- z; b9 W
$ _( ?0 X% G$ q9 M: e3 Z+ Q3 _
TNSLSNR for Linux: Version 11.2.0.3.0 - Production* q' {8 Q4 s& g# ~$ p+ n
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora; L6 [; ]5 u2 z" Z
Log messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml& m; P* d1 z* @
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))
, k3 L& r6 `/ G9 Z( x7 YListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))$ p, k& X3 ^8 R! d
) c! `" P0 J2 ~: U _
3 x6 m8 k3 c$ H" jConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))1 C; s5 m/ o( @$ [% p1 L- y
STATUS of the LISTENER
2 R0 x* k& h0 n' ]; o2 a6 E" |------------------------
3 }% g/ \$ u* m# V* c. Q/ a: f& gAlias LISTENER t5 I0 h( }$ {3 [
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
# E% V1 x; e* O- n+ L& }Start Date 14-SEP-2013 10:11:38+ a$ g. Z$ G; R' ~- D; e0 }1 [
Uptime 0 days 0 hr. 0 min. 0 sec6 J4 p# B7 `+ K
Trace Level off
( }" J" U8 C; b Z: K ^Security ON: Local OS Authentication% e4 H, R. {* N1 b/ l! q' o& S
SNMP OFF
4 ~9 K/ W R6 WListener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora1 `; m, h4 x# n8 Z
Listener Log File /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
2 t8 y2 M' {; d1 D+ K( V! ]Listening Endpoints Summary...' F8 J7 X' z# ~, e# t/ G
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))
. x' ^5 \ U7 v P/ z) i. B* ` (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
3 K% D7 m+ ]. fThe listener supports no services1 F7 e+ B5 b+ j$ z1 z7 e5 I* U( Y
The command completed successfully# d% D" C6 L4 u. M% \+ O9 [/ z
由于这台主机之前做的是stream实验,修改了一下hostname,之前的监听和服务名也用netca重新配置过了,但是启动监听一致是这个状态,动态监听注册不上
1 B0 ~ ^ E ^3 m' o/ r0 c- }0 T, I; p& k$ U" |
本地登录到Oracle实例,手动注册实例也无果,问题依旧/ O" N! Q7 E l/ m
1 y; `4 l. S7 \# w. H, j# s+ O% r2 b
SQL> alter system register;& W( O5 P! R- o
+ w! V" V; b/ B% Q5 |8 G& Z
. y4 |, a: E* N7 d' YSystem altered.4 B/ ?# ?5 I2 W+ T! M
" b1 {# @% i/ E' d6 o1 Z) {
+ H- _ r) A) c1 S2 MSQL> !
; {( b0 H( ?7 v[oracle@adrep ~]$ lsnrctl status) x0 ~" a3 P& D& ]- S
7 A Q! i# C+ u5 A* Q, M$ ~% c0 E _+ w! B; E5 E R0 q# K
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:037 k( S" M' v9 F6 b
% m" |: q& d; G" @$ \: R2 ^5 }" E
% X7 K p& D7 Y, o! P( MCopyright (c) 1991, 2011, Oracle. All rights reserved.
* ]0 t |2 J! C% M& j3 ?& j' g( a, W8 u2 D/ l% E
# D: N) f) @# \$ U1 B6 z& aConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
( g7 T2 Q/ M8 Y# P5 ^/ vSTATUS of the LISTENER
t# v$ ~" y8 Y4 _ D6 ^2 ^6 E8 H------------------------
) y2 C1 }* L3 t- |, PAlias LISTENER
1 Z% }+ ^1 J+ j: E; s% q# fVersion TNSLSNR for Linux: Version 11.2.0.3.0 - Production" j! L+ G/ e% E- V
Start Date 14-SEP-2013 10:11:38
- E& x! M( }7 C: F- m9 pUptime 0 days 0 hr. 1 min. 25 sec
4 D4 L8 ^; }' }: rTrace Level off8 _% m# R, {1 ?
Security ON: Local OS Authentication: M' v5 S& t( S+ k W. s
SNMP OFF: t$ u7 X0 E* p3 A5 ~1 L
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora1 l. b# c h( z& k* O9 d
Listener Log File /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml8 A! q" {+ n9 D! l6 R# i1 K% @1 f
Listening Endpoints Summary...8 u0 e0 [! h. d
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))
) _1 S' m( F: E2 t0 a (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))) W! ?$ c- Q' \+ F! c9 E$ f6 O+ J
The listener supports no services
6 Y- n7 ?6 _! o# T$ eThe command completed successfully" b8 K4 y& P( X2 Q; K$ \
8 U) P; I, _' z[oracle@adrep ~]$ lsnrctl reload
5 b7 J. [& s2 N& B! l' E Listener Log File /u01/app/5 D9 l: j8 C$ W; ]
# f; V" I N7 ] d! r) x3 Y4 K9 L% }
7 C' r$ k" m; m, l) q
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:16:13
9 S2 J$ p& Z6 y. }% k1 i, x2 w" H1 n+ Z( L2 _
$ s0 ]0 |/ m3 n" R0 X/ N
Copyright (c) 1991, 2011, Oracle. All rights reserved.
3 }) u: ~+ }+ o) i- d$ c+ a4 ^, H! r J2 L- G2 W, k1 B
$ `7 M5 F1 D; b2 t! w8 K vConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))' L" Q7 U8 G7 x- x! n' `6 c
The command completed successfully4 C' n# A" V) R" j C8 u1 d! N" v
[oracle@adrep ~]$ lsnrctl status/ \; E8 O1 a C' h% g
9 l( C9 i1 c6 {! L* h
% t Y$ I+ x' ?1 ] @+ PLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:18
) z& n" _' q) m) E
2 D: y. p: `9 {! M# ~* ^2 m2 C
( k" s# y* D3 \2 ]8 M1 b5 Q. `; zCopyright (c) 1991, 2011, Oracle. All rights reserved.8 l3 q5 r3 i1 i: T
" n6 Q. |3 ?; S8 |
$ n% a" n4 F' v0 fConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
0 e# D( ]! d; l) j `STATUS of the LISTENER U' e2 B1 W3 I/ H# {; o
------------------------
$ a/ M$ k3 p) o: B- UAlias LISTENER# U( o' |6 A9 F+ A: B9 j( ?
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production8 ?- o5 y* \/ _) T
Start Date 14-SEP-2013 10:11:38
3 [& g6 E4 }: c( w9 ?% I# tUptime 0 days 0 hr. 1 min. 40 sec
2 g8 z( i4 v/ eTrace Level off
% C/ h. s. e' M; ?! p0 FSecurity ON: Local OS Authentication
1 w' {; M) o6 {. FSNMP OFF
; P' b2 L6 A0 u% C+ r7 oListener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora8 x3 b6 d ]: T0 c; V8 [; t& R
Listener Log File /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
# C$ B; { ? Z6 p/ D9 v( M9 m7 kListening Endpoints Summary...$ j+ e: p2 \2 C. D! w- d
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))" R3 M3 ^1 @6 a& G
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))# Z- @6 H7 w( U# V: h- Q7 u
The listener supports no services
/ \0 E5 }+ x& C7 n, T3 Z4 VThe command completed successfully* M5 n$ I% w( J6 ^ j
[oracle@adrep ~]$ lsnrctl stop
& Y# X+ H5 [& }( x9 c' G
4 l- `! Y6 J( @: C" i( j' [
B) n) ?9 W1 s' L' @
6 t& g. ?# Z( O- `. `LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:17:03
1 R! \- z7 z9 t- G1 H H; T; Y4 R& A, T6 s9 j7 s
! Z* }* N; u" P, jCopyright (c) 1991, 2011, Oracle. All rights reserved.3 a0 r$ s; |! K
* C: o' h% |$ c5 k/ P% \( o
$ y8 X" {$ \0 w8 Q
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
4 d! C2 l2 c: I! E( UThe command completed successfully% N) }! X A) _7 b) J3 a7 g
7 J+ z' Y, R& K% H# r2 p
[oracle@adrep ~]$ lsnrctl start3 J2 k& k. ]: X' ]' s
6 m L/ _9 m+ C# N; ^9 G& C
& b7 x. X& _( X5 @; K
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:18:53
" K' F ?) \6 E9 f7 s9 U3 B+ Y, k1 j0 A! z# T; ]7 X; l/ u& X
8 s b6 R& ]; Z, ~- R& J
Copyright (c) 1991, 2011, Oracle. All rights reserved.
4 L9 o& u+ G+ H" U7 @/ \2 s0 [
# j [/ |9 @1 t9 K: B2 _
% I: F6 }7 X& G4 D, m+ e0 n" cStarting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
+ X) \0 s3 u7 z% J% s
, i# b0 |+ z/ ^! ]& ~0 P
# p( n/ I' I8 z0 f/ K6 \6 \+ ^' vTNSLSNR for Linux: Version 11.2.0.3.0 - Production% w$ W3 U( N2 L* g- X
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
/ V$ ?5 \' N( z7 WLog messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
7 R6 q* Q1 \# D$ i6 P0 `Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))
" e4 Z" T( q: |6 {! W tListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
) Y% S- b- z; A! [9 X# H0 K# }9 m4 ]" `" D; R' j2 [ M0 T7 X8 I
* y! o5 q& O, D: V
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
" a" u9 ]) Q0 x- H1 mSTATUS of the LISTENER$ F3 }: E/ x4 h1 N1 g
------------------------5 E$ ?# L9 {! ]) e5 O
Alias LISTENER
7 v8 e+ X S' k. e6 p% ^& WVersion TNSLSNR for Linux: Version 11.2.0.3.0 - Production
+ O- q2 @* c* k2 i( ]9 JStart Date 14-SEP-2013 10:18:53/ Z0 C8 g; Q7 B4 m# g N/ I
Uptime 0 days 0 hr. 0 min. 0 sec
0 [! U2 r" k* O9 h2 o1 F% }Trace Level off7 B/ F7 H" w2 X
Security ON: Local OS Authentication2 G8 \( y' S" q( r; H1 T
SNMP OFF
9 Q6 {( v2 a& x$ y' aListener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
8 i! U5 m) Y( |" D$ e; ?Listener Log File /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml" B0 p4 A0 X. ~' ?" s
Listening Endpoints Summary..., u' o0 F/ _/ f+ l. s
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))+ F2 N. b) [6 ]$ [! W) V \+ l/ k# t0 B* {
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
$ j7 E9 z9 O1 K5 AThe listener supports no services- X/ N4 m3 Y) W# B! F' y9 t
The command completed successfully
' h2 Y! Y! {! y( e. m0 V[oracle@adrep ~]$
$ S& g6 q2 b! t( D
: ^. S, t, L& S( Z- Q- z) J. ?于是考虑通过mgr配置静态监听,但是让我郁闷的是,总是提示需要输入一个合法的SID- z) }6 h4 Z0 j5 k( F- E
' |; o- ^4 U* p0 _2 C7 I5 f0 j' F/ \9 ]0 u
9 q; j: P; a& l; s( ?
这个SID绝对是strmtarget没错的,global name即service name也确实是target,这个可以由以下参数获得佐证
+ j7 _* ?: v/ i. x
! f# n* c, _3 \6 A$ tSQL> show parameter name
' T- o i4 ]+ {4 r8 D5 s ~
; ~/ K, V5 F/ s( n8 { J6 c
7 H& j' B; @& d/ ~9 n/ gNAME TYPE VALUE
+ Q" `& K" F% @ `1 u: f I------------------------------------ ----------- ------------------------------
, a4 e4 o9 [3 ^9 ydb_file_name_convert string
! Y- W) v+ ]+ g4 `) h, |db_name string strmtarg
/ M) A" E6 f" x; S$ i. Wdb_unique_name string strmtarget
$ H1 \! Z8 d* I8 ?# Vglobal_names boolean TRUE! r1 \3 n3 C) _+ B" U7 o
instance_name string strmtarget
' T( K6 Q4 U1 G+ X. }3 Mlock_name_space string
4 }0 J1 ]8 X9 {: T0 p1 U! \log_file_name_convert string5 G' D9 e! v/ e) o, n7 T; W+ r
processor_group_name string# P0 C4 f6 s- n4 _: i% X
service_names string target; U/ ~) M0 b% ~
% T$ v6 R) J F& }
也可以通过v$instance视图查到SID是正确的
3 ^* g+ _' H) K/ U e" X( h' L& x; q. c9 n( O0 o
SQL> select instance_name from v$instance;
4 z% ~3 b+ T- |7 a# c
# C) F: W$ g( M- q. H7 b6 zINSTANCE_NAME
* C3 `" N3 n$ }- w+ Q----------------
/ ]. c& |! v& `0 D+ v5 P4 Jstrmtarget/ P3 M5 z& j0 X4 n
3 }" |/ y6 _ e0 h* n0 b, `8 l" v0 q, K
难道就没有办法设置静态监听了吗?NO,这里还有一种方法就是手动修改listener.ora文件,添加以下几行内容
0 Y% I' }" I- r! W1 K4 P/ X* B; ]5 Q8 p% t N _
SID_LIST_LISTENER = n' n7 j% e1 F" `5 ?% e+ V
(SID_LIST = 6 w, E3 W( N3 S$ q, R0 f+ ?) A
(SID_DESC = 8 }, c* [5 I- M+ ]5 I
(GLOBAL_DBNAME = target)/ p1 K! L9 N8 Y. i7 i
(SID_NAME = strmtarget)
, r( l6 I; N! h )& L4 }. x. z6 F( ?( u+ [1 C X8 S9 d
) M a6 p# H( Z3 y p) A5 f
7 j; k5 v8 l$ \5 n _- K( M
其作用就是配置一个实例静态监听,只不过用这里跳过了图形化界面修改而已,如果是用netmgr成功修改了实例的静态监听,也是会生成以上几行代码的
7 N- M8 h U! g7 l( Y E7 G: {9 J! `
这里可以先把listener.ora用xftp工具拷贝出来,修改完再拷贝回相同位置即可7 [. {% e$ }. ^ {7 V& P) ?
* @- X6 k4 {- ^这里只需要重新加载一次监听就可以注册上实例了9 e6 C9 j2 a- D4 o0 S1 E
" u j4 C/ q( W# w5 I7 z[oracle@adrep ~]$ lsnrctl reload
7 i6 F2 r: c" p3 l5 m- X6 }$ v
/ ]- A- r4 Y3 l8 y" P
% ]. S5 Z( B$ oLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:06
, `& j5 \% a# h, P% |+ A1 i2 G* k2 h9 N: k4 n
3 W6 H+ H1 D: V9 g1 a3 ICopyright (c) 1991, 2011, Oracle. All rights reserved.- r' a+ j7 w. P/ P) ?, s" @
0 S3 x+ X" V6 b
4 `7 h! m, A3 s# F
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))8 c, q& B; h( r- i2 d+ |
The command completed successfully
2 P+ d8 F' ~6 z" z( R" M[oracle@adrep ~]$ lsnrctl status: L% b7 _2 ?/ X3 z1 o5 L- z
; U6 T; J$ w1 z4 ]8 }! a% R+ W; D# [$ J' `$ z
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:14
0 t! i( J7 ~* g: A( _$ j( k/ o2 P! k1 m; D# {5 Q& i. u
/ X. D& n2 d6 |5 F W
Copyright (c) 1991, 2011, Oracle. All rights reserved.
?# v0 S2 E; _. y1 c
/ {& q3 s& V& U* W- u
5 u2 I: v* F* d8 U$ ]Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))
; X; h* y5 y7 m& nSTATUS of the LISTENER" ~0 a, j$ @! [
------------------------9 T* {4 C9 z* @. b/ |
Alias LISTENER
( y+ p" g7 {$ o4 U2 ?Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production" ^1 N# B# j c
Start Date 14-SEP-2013 10:18:53
& C, D: ~% X/ \: d* tUptime 0 days 0 hr. 13 min. 21 sec; t& i( F- f! B3 J" w; r% f4 O
Trace Level off# m+ L6 F H8 {) M" U! l& i6 h, F1 ^
Security ON: Local OS Authentication. M; p& n) g3 l' p6 U. k
SNMP OFF
5 b& a- H$ ~% J s( a/ E" U9 XListener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
, l4 K/ I6 p% t9 ?1 SListener Log File /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml
, n$ W1 u7 A- X: \: SListening Endpoints Summary...: a" \- \2 Z! Y2 @1 C& [
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))3 P) w6 Z8 G$ Z+ F/ \5 k* g2 ]
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
5 ~' |& ^* n# z* |8 k+ aServices Summary...) W a. |) `' |+ Q, P1 A
Service "target" has 1 instance(s). k$ a, K2 h. _% b3 q- p O
Instance "strmtarget", status UNKNOWN, has 1 handler(s) for this service... H( f! Z& Q/ K' ^+ j9 K
The command completed successfully. k5 ]. p% Y3 {9 z
[oracle@adrep ~]$
* T: ~) H4 `, V3 f! h+ k! n
# Q' W. {8 V1 l; m# W+ b这里target实例通过以上方法,成功地把实例注册上了,注意"UNKNOWN"就表示是静态注册的,如果是"READY"则表示是动态注册的
/ S. `6 ?' J& V- ]/ p1 L. Q
4 Y6 L f" s% p注意:动态和静态监听可以共存,如:( c9 S7 _$ J% q. _, \: i" e
( R6 {& B. U6 x9 S! v/ ^* c! p* n: T1 C[oracle@zlm ~]$ lsnrctl status
6 K- T w8 Y5 ~% V* Y7 L# b p( Z* q' \2 n1 s% }. S9 w
. C9 L- _1 a* U) ^5 P9 v/ P
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 09:52:230 a; m: R3 _( }* [; ^
- y' w$ V# g/ t$ ]; q
; E" o; F# i8 o* l P. }2 @. z/ {Copyright (c) 1991, 2011, Oracle. All rights reserved.3 a4 l& ^6 @. `4 S/ H9 D
5 U' v, ~, J5 _( G6 E6 ?# s H, X- w6 B: l9 }2 \0 x2 Z
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zlm)(PORT=1521)))' y6 N) f! x/ L. B' l
STATUS of the LISTENER& k' P: K6 ?; \/ @
------------------------8 _. c+ E3 s1 o' z4 M; H% P
Alias LISTENER
8 Z) |: w4 V) m" }0 j7 D+ lVersion TNSLSNR for Linux: Version 11.2.0.3.0 - Production, t& f" x8 ?7 b1 Z
Start Date 14-SEP-2013 09:15:04
# C3 i6 `2 y2 h' DUptime 0 days 0 hr. 37 min. 19 sec
9 m( Z5 ~- N2 e4 z- ^# ^Trace Level off
) k0 h1 _2 Q U7 n }8 I8 lSecurity ON: Local OS Authentication, a' J. W! q7 \
SNMP OFF
/ f- ^! x& V, h- Z w# t8 B" q( k* RListener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
7 n" Y5 }; ?& W* j- r. oListener Log File /u01/app/oracle/diag/tnslsnr/zlm/listener/alert/log.xml
& i% N, b- B% z: VListening Endpoints Summary...) ]% @0 \8 V. Y: X1 q3 |
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zlm)(PORT=1521)))2 |7 X: E0 C4 S4 D5 @/ ]. x% R
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
0 i( A% L! o e1 s3 O0 t8 B1 `0 L2 qServices Summary...0 N7 S7 ^( R: o$ d
Service "zlm11g" has 2 instance(s).
8 r. C7 h9 s. e7 } Instance "zlm11g", status UNKNOWN, has 1 handler(s) for this service...
& U x# z" L' [) X2 @4 z* K Instance "zlm11g", status READY, has 1 handler(s) for this service...
& A' p3 t9 l6 U* o8 EService "zlm11gXDB" has 1 instance(s).
+ _& q) I% Z' @: i- @$ `+ j! b Instance "zlm11g", status READY, has 1 handler(s) for this service...
8 p5 l$ `8 V+ V6 U: h4 I7 R. s- m; ^" rThe command completed successfully
$ Z! R0 ~; Q ~4 `[oracle@zlm ~]$
0 a* q3 z) V( l& b
! N4 B# H0 g- L2 n$ H0 {以上是我在zlm主机上的监听状态,可以发现,同时配置了动态和静态的监听
/ h5 O/ Q( z" y# J$ n( X6 t1 ~4 G G' t: d
总结:以上利用了手动修改配置静态监听的方法成功注册了Oracle实例,动态监听往往需要等实例启动后,过一段时间才会注册上,而静态监听则可以马上注册。而且一旦实例重启会造成动态监听暂时无效,有些版本的bug甚至会导致动态监听的注册就再也起不来了。所以我对于监听的观点是,尽量配置静态监听,这样就可以避免很多由监听带来的问题,诸如我们经常会碰到的几个ora error:ora-12541、ora-12514、ora-12154等,尤其是在RAC和DG中,一个监听的问题,往往会带来很大的麻烦,尤其需要引起大家的注意。
* z- q1 S3 Z W8 f1 T |
|