[20190306]Disabled EZCONNECT.txt
[20190306]Disabled EZCONNECT.txt
--//連結裡面提到:
NAMES.DIRECTORY_PATH= (TNSNAMES)
In such a scenario, you need to explicitly allow for EZCONNECT method to allow the connection to work.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
--//在以上的情況下,必須顯示的加入EZCONNECT.但是
If you have never touched your sqlnet.ora, it probably looks like this:
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
but there is no need to panic. Those default values allow EZCONNECT as well.
--//測試看看:
1.環境:
SCOTT@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
2.測試:
--//我客戶端機器安裝有12cR2(windows 64bit).
--//修改sqlnet.ora如下:
NAMES.DIRECTORY_PATH= (TNSNAMES)
--//測試EZCONNECT:
R:\>sqlplus -l scott/book@192.168.100.78:1521/book
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 8 09:03:06 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
--//如果修改sqlnet.ora如下:
NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT)
R:\>sqlplus -l scott/book@192.168.100.78:1521/book
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 8 09:03:46 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
SCOTT@192.168.100.78:1521/book>
--//成功連上!!
3.如果修改如下:
--//修改sqlnet.ora如下:
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
R:\>sqlplus -l scott/book@192.168.100.78:1521/book
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 8 09:05:59 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
4.我測試各種情況:
NAMES.DIRECTORY_PATH= (TNSNAMES) =>失敗
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES) =>失敗
NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME) =>成功
NAMES.DIRECTORY_PATH= (HOSTNAME) =>成功
--//視乎只要存在HOSTNAME,EZCONNECT就可以透過.有時候想想oracle設計太奇怪了.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2637861/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- jQuery設定disabled屬性與移除disabled屬性jQuery
- [20190306]11g health monitor.txt
- [20190306]奇怪的查詢結果.txt
- [20190306]共享服務模式與SDU.txt模式
- CSSStyleSheet.disabled 屬性CSS
- jquery-disabled和readonlyjQuery
- Error: php@8.0 has been disabled because it is a versioned formula! It was disabled on 2023-11-29.ErrorPHPORM
- Nessus提示API Disabled錯誤API
- disabled和readonly屬性區別
- [20190306]靜態監聽配置sid大小寫問題.txt
- DedeCMS Error: Tag disabled: "php" 解決方法ErrorPHP
- QSocketNotifier: Socket notifiers cannot be enabled or disabled from another
- form序列化提交readonly和disabledORM
- CSS E:disabled 偽類選擇器CSS
- CSS E:disabled偽類選擇器CSS
- jQuery中判斷input的disabled屬性jQuery
- 微信小程式改變 button disabled 樣式微信小程式
- input屬性disabled和readonly的區別(轉)
- 微信提現報錯:protocol is disabled or cipher suites are inapproprProtocolUIAPP
- Junit5系列-Junit5中@Disabled禁止執行
- Loaded plugins: product-id, search-disabled-repos, security, subscription-managePlugin
- ERROR3948: Loading local data is disabled - this must be enabled on both the client and server sidesErrorclientServerIDE
- 修改sys密碼報錯:ORA-01994: Password file missing or disabled密碼
- PHP Warning: exec() has been disabled for security 問題解決辦法PHP
- Vue 框架 使用 `:disabled` 屬性修改了原響應引數Vue框架
- html表單控制元件禁用屬性readonly VS disabled介紹HTML控制元件
- 火狐瀏覽器input設定disabled屬性之後事件不生效瀏覽器事件
- 【Modelsim常見問題】# ** Error (suppressible): (vsim-12110) All optimizations are disabled because the -novopt option is in effect.Error
- 資料庫建立元件時報錯ORA-30554: XDB.XDB$ACL_XIDX is disabled資料庫元件
- 【Android】報錯 Please ensure Hyper-V is disabled in Windows Features, or refer to the Intel HAXM 的解決方案AndroidWindowsIntel