下載安裝了navicat 9.0 Premium(進階英文版),串連mysql正常,看到他同時支援Oracle、sqlite和postgresql,也想來串連一下oracle,進行集中管理。
1、但是串連時候先是報出監聽錯誤、不能解析oracle SID標識符,我用sqlplus和plsql串連卻是正常的!!!這說明我的設定檔是沒有問題的。
2、重新將串連方式由TNS改為BASIC,然後依次填寫串連資訊,最後卻爆出了“ORA-12737: Instant Client Light: unsupported server character set CHS16GBK”的錯誤。
3、確定是字元集問題後,google上查到類似的解決方案:
ORA-12737: Instant Client Light: unsupported server character set CHS16GBK
Google,解釋如下:
ORA-12737:
Instant Client Light: unsupported server character set string
Cause: The character set specified is not allowed for this operation or is invalid. Instant Client Light has only minimal character sets.
Action: Do not use Instant Client Light for this character set
4、原因明確了之後,就要怎麼解決了。修改伺服器的字元集不太現實。後來研究了OCI,知道Instance Client 10是不支援除英文以外的編碼的(如果你下載的是中文版的navicat可能不會有這個問題)。
5、去oracle官網下載最新版的OCI:http://www.oracle.com/technetwork/topics/winsoft-085727.html
6、同時在Oracle官網上發現Instance Client 11要比10大很多,下載完成後將解壓出來的核心的oci11的3個檔案替換掉原先的oci10的3個檔案即可。(記得做個備份)
替換方法:在Navicat裡,工具->選項->Miscellaneous->OCI。為oci.dll重新指定位置,然後重啟navicat就OK了。
重啟Navicat最後證明Instance Client 11沒有字元集問題。
PS: 本機是xp SP3系統,Oracle是10.2,navicat 9.0 Premium English版本。