[20190115]共享服务模式与启动到mount状态.txt --//当数据库启动到mount状态时是看不到共享服务模式的.测试是否直接使用端口连接数据库. 1.环境: SYS@book> @ ver BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production SYS@book> startup mount ORACLE instance started. Total System Global Area 643084288 bytes Fixed Size 2255872 bytes Variable Size 205521920 bytes Database Buffers 427819008 bytes Redo Buffers 7487488 bytes Database mounted. SYS@book> show parameter dispatchers NAME TYPE VALUE ----------- ------ ------------------------------------- dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB) SYS@book> show parameter service_names NAME TYPE VALUE ------------- ------ --------------- service_names string BOOK, BOOKSHARE $ lsnrctl services LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 15-JAN-2019 16:21:20 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(ARGV0=LLLLLL)(HOST=0.0.0.0)(PORT=1521)(ARGV0=KKKKK))) Services Summary... Service "BOOKSHARE" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER Service "booK123" has 1 instance(s). Instance "book", status UNKNOWN, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER Service "book" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER The command completed successfully $ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 15-JAN-2019 16:21:30 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(ARGV0=LLLLLL)(HOST=0.0.0.0)(PORT=1521)(ARGV0=KKKKK))) STATUS of the LISTENER ------------------------ Alias listener Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 15-JAN-2019 16:10:13 Uptime 0 days 0 hr. 11 min. 17 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "BOOKSHARE" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... Service "booK123" has 1 instance(s). Instance "book", status UNKNOWN, has 1 handler(s) for this service... Service "book" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... The command completed successfully --//启动没有看到共享服务模式. 2.查询共享模式打开的监听端口,测试是否能连上数据库. $ ps -ef | egrep "d00[0]|s00[0]" oracle 51897 1 0 16:10 ? 00:00:00 ora_d000_book oracle 51899 1 0 16:10 ? 00:00:00 ora_s000_book --//而实际上在mount状态,s000,d000进程已经启动. # netstat -tunlp | egrep 'Active|Proto|tnslsnr|book' Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 51849/tnslsnr tcp 0 0 :::52642 :::* LISTEN 51897/ora_d000_book udp 0 0 ::1:14493 :::* 51861/ora_pmon_book udp 0 0 ::1:30118 :::* 51899/ora_s000_book udp 0 0 ::1:31628 :::* 51897/ora_d000_book --//进程ora_d000_book(51897),已经打开了52642端口,在监听状态. d:\>sqlplus sys/oracle@192.168.100.78:52642/book as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Jan 15 16:33:43 2019 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS@192.168.100.78:52642/book> select open_mode from v$database ; OPEN_MODE -------------------- MOUNTED --//可以连上数据库. d:\>sqlplus -s -l sys/oracle@192.168.100.78:52642/bookxdb as sysdba ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus d:\>sqlplus -s -l sys/oracle@192.168.100.78:52642/bookshare as sysdba ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus d:\>sqlplus -s -l sys/oracle@192.168.100.78:52642/book123 as sysdba ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus --//说明仅仅book服务名可以连上. 3.启动到open,继续观察测试: SYS@book> alter database open ; Database altered. $ lsnrctl services LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 15-JAN-2019 16:43:26 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(ARGV0=LLLLLL)(HOST=0.0.0.0)(PORT=1521)(ARGV0=KKKKK))) Services Summary... Service "BOOKSHARE" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER Service "booK123" has 1 instance(s). Instance "book", status UNKNOWN, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER Service "book" has 1 instance(s). Instance "book", status READY, has 2 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER "D000" established:0 refused:0 current:0 max:1022 state:ready DISPATCHER <machine: xxxxxyyy, pid: 51897> (ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxyyy.com)(PORT=52642)) Service "bookXDB" has 1 instance(s). Instance "book", status READY, has 1 handler(s) for this service... Handler(s): "D000" established:0 refused:0 current:0 max:1022 state:ready DISPATCHER <machine: xxxxxyyy, pid: 51897> (ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxyyy.com)(PORT=52642)) The command completed successfully d:\>sqlplus -l sys/oracle@192.168.100.78:52642/book as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Jan 15 16:44:44 2019 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options d:\tools\sqltemp>sqlplus -l sys/oracle@192.168.100.78:52642/bookxdb as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Jan 15 16:45:05 2019 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS@192.168.100.78:52642/bookxdb> select open_mode from v$database ; OPEN_MODE -------------------- READ WRITE --//这个时候使用book,bookxdb服务名都可以连上. --//从这里说明看出,从安全角度考虑,配置服务名也许最佳的方法就是不要每个服务名支持两种连接模式. --//静态注册使用服务名最好也与数据库动态的服务名不同.共享模式的服务名也最好分开配置.
[20190115]共享服务模式与启动到mount状态.txt
来源:这里教程网
时间:2026-03-03 12:51:55
作者:
编辑推荐:
- Word2007文档中打开剪切板、清空剪切板内容方法03-03
- 批处理高效办公 就要掌握Word通配符03-03
- [20190115]共享服务模式与启动到mount状态.txt03-03
- autotrace该怎么用?那些选项是啥意思?03-03
- Word删除空白页,最简单有效的【解决方法】03-03
- Docx文件怎么打开,如何打开Docx文件?03-03
- 重做日志管理03-03
- [20190116]诡异的问题2.txt03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 重做日志管理
重做日志管理
26-03-03 - null值在oracle和mysql中的差异
null值在oracle和mysql中的差异
26-03-03 - oracle RAC 11g for linux 7的那些坑
oracle RAC 11g for linux 7的那些坑
26-03-03 - ORACLE 数据库服务器业务高峰期高危动作之IOSCAN(HPUNIX)
- Reasons for incorrect gl balance
Reasons for incorrect gl balance
26-03-03 - Oracle 12.2 学习系列(一)CDB多租户容器数据库
Oracle 12.2 学习系列(一)CDB多租户容器数据库
26-03-03 - 判断standby日志是否同步primary
判断standby日志是否同步primary
26-03-03 - 问鼎大师我的OCM之路——程向智
问鼎大师我的OCM之路——程向智
26-03-03 - oracle、mysql数据库窗口下执行操作系统命令
oracle、mysql数据库窗口下执行操作系统命令
26-03-03 - 由db_domain引起的数据库连接异常
由db_domain引起的数据库连接异常
26-03-03
