[20190306]靜態監聽配置sid大小寫問題.txt
[20190306]靜態監聽配置sid大小寫問題.txt
--//有網友按照連結http://blog.itpub.net/267265/viewspace-2558389/測試,透過配置靜態監聽,無法透過遠端啟動資料庫.
--//我看了配置,問題出在sid_name大小寫問題.透過例子說明:
1.環境:
SYS@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
2.監聽配置如下:
$ grep -v "#" listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU=32767)
(GLOBAL_DBNAME = booK)
~~~~~~~~~~~~=>這個不區分大小寫^_^.
(ARGV0=myapp0)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME=BOOK)
~~~~~~~~~~~~~~~~~~~~~~
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(ARGV0=LLLLLL)(HOST = 0.0.0.0)(PORT = 1521)(ARGV0=KKKKK))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SECURE_REGISTER_LISTENER = (TCP)
ADR_BASE_LISTENER = /u01/app/oracle
DIAG_ADR_ENABLED_LISTENER=OFF
USE_NS_PROBES_FOR_DCD=true
INBOUND_CONNECT_TIMEOUT_LISTENER=2
--//注意下劃線的配置.
$ lsnrctl stop;sleep 1;lsnrctl start
...
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-MAR-2019 15:08:09
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 06-MAR-2019 15:08:07
Uptime 0 days 0 hr. 0 min. 2 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 "booK" has 1 instance(s).
Instance "BOOK", status UNKNOWN, has 1 handler(s) for this service...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command completed successfully
--//注意看下劃線.
3.測試:
d:\tools> sqlplus -l sys/oracle@192.168.100.78:1521/book as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 6 15:12:43 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
d:\tools> sqlplus -l sys/oracle@192.168.100.78:1521/BOOK
SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 6 15:06:45 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
--//linux下sid_name嚴格區分大小寫.修改為監聽配置SID_NAME=book小寫後正常.
d:\tools> sqlplus -l sys/oracle@192.168.100.78:1521/book as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 6 15:14:10 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SYS@192.168.100.78:1521/book> startup
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.
Database opened.
--//啟動成功!!oracle啟動資料庫,共享記憶體段建立的控制程式碼由ORACLE_HOME_SID_NAME組成.對應linux,嚴格區分大小寫.
--//另外11.2.0.4環境變數ORACLE_HOME結尾是否有斜線不影響的handle組成,但是後面的部分還是SID_NAME.
--//不知道windows是否有問題,感覺經常使用windows的人喜歡大寫.
$ sysresv
IPC Resources for ORACLE_SID "book" :
Shared Memory:
ID KEY
343080971 0x00000000
343113740 0x00000000
343146509 0xe8a8ec10
Semaphores:
ID KEY
301662208 0x6aa88594
Oracle Instance alive for sid "book"
4.許多人經常混淆資料庫例項與資料庫等概念,引數裡面許多name,實際上我自己有時候也混淆.再做一個例子:
--//關閉資料庫重新測試.修改監聽配置裡面的靜態監聽配置SID_NAME=booK.
$ lsnrctl stop;sleep 1;lsnrctl start
...
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-MAR-2019 15:28:03
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 06-MAR-2019 15:27:38
Uptime 0 days 0 hr. 0 min. 25 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 "booK" has 1 instance(s).
Instance "booK", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
--//修改SID_NAME=booK.
$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
$ cp orapwbook orapwbooK
d:\tools> sqlplus -l sys/oracle@192.168.100.78:1521/book as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 6 15:29:32 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SYS@192.168.100.78:1521/book>
--//能訪問口令檔案,就可以到Connected to an idle instance.
SYS@192.168.100.78:1521/book> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initbooK.ora'
--//可以發現找不到引數檔案.
$ cp spfilebook.ora spfilebooK.ora
SYS@192.168.100.78:1521/book> startup
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.
Database opened.
--//現在一樣啟動資料庫.
$ sysresv
IPC Resources for ORACLE_SID "book" :
Shared Memory
ID KEY
No shared memory segments used
Semaphores:
ID KEY
No semaphore resources used
Oracle Instance not alive for sid "book"
--//ORACLE_SID=book,sysresv看不到共享記憶體段.
$ export ORACLE_SID=booK
$ sysresv
IPC Resources for ORACLE_SID "booK" :
Shared Memory:
ID KEY
343212043 0x00000000
343244812 0x00000000
343277581 0x280f14d4
Semaphores:
ID KEY
301826048 0x5aa88594
Oracle Instance alive for sid "booK"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--//注意下劃線的內容.
5.收尾:
SYS@192.168.100.78:1521/book> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
--//修改監聽引數配置,重啟監聽.略.
$ lsnrctl stop;sleep 1;lsnrctl start
$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
$ rm orapwbooK spfilebooK.ora
--//$ rm -rf /u01/app/oracle/diag/rdbms/book/booK
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2637706/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle靜態監聽中SID_NAME區分大小寫嗎?Oracle
- oracle靜態監聽Oracle
- [20180417]監聽與時區問題.txt
- [20180509]配置靜態監聽服務與ORA-12514
- vue 動態監聽視窗大小變化事件Vue事件
- 【效能監控】如何有效監測網頁靜態資源大小?網頁
- [20190306]Disabled EZCONNECT.txt
- Oracle dblink監聽問題Oracle
- linux配置靜態路由解決網路問題Linux路由
- Centos7 配置靜態ip及問題處理CentOS
- mysql大小寫問題解決MySql
- Mysql 表名大小寫問題MySql
- Linux配置靜態IP解決無法訪問網路問題Linux
- CentOS7 配置靜態IP 及網路問題排查CentOS
- [20190306]11g health monitor.txt
- [20190306]奇怪的查詢結果.txt
- 關於php生成靜態問題PHP
- Linux CentOS 配置靜態 ip 和 解決 配置後無法聯網的問題LinuxCentOS
- [20211012]測試遠端監聽.txt
- [20190306]共享服務模式與SDU.txt模式
- vue 元件(component)命名的小細節問題(大小寫問題)Vue元件
- [重慶思莊每日技術分享]-監聽的靜默配置安裝
- 【監聽配置】Oracle如何靜默執行NETCA,使用netca.rsp檔案Oracle
- 前端靜態頁面問題彙總前端
- CentOS配置靜態IPCentOS
- linux靜態ip 配置Linux
- 2.5.2. 監聽程式(listener)配置——2.5.2.3. 手工編輯監聽器配置檔案
- 網路配置2:靜態路由配置路由
- [20211013]測試遠端監聽補充.txt
- [20200115]監聽中沒有xdb服務.txt
- 上交所市場行情mktdt00.txt資料檔案監聽問題及解決方案
- 靜態路由規則配置路由
- 網站偽靜態配置網站
- Linux中配置靜態IPLinux
- 靜態路由原理與配置路由
- Apache靜態快取配置Apache快取
- Liunx配置靜態ip VMware
- Etcd叢集靜態配置