星期一, 3月 05, 2012

開啟Oracle 9i Client sqlnet trace@Windows

最近發現資料庫連接到另一台有問題,但又馬上好了...下次如果再發生 可以開啟sqlnet trace...

Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xx.xx.xx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxx)(CID=(PROGRAM=oracle)(HOST=db_name)(USER=username1))))

  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
  Time: 03-MAR-2012 15:47:46
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12541

TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511

TNS-00511: No listener
    nt secondary err code: 111
    nt OS err code: 0
-----------------------------------------------------------------------------------------------------------------

進到C:\oracle\ora92\network\ADMIN\下,

建立一個sqlnet.ora 檔案
                空白資料夾trace

sqlnet.ora內容如下
DIAG_ADR_ENABLED = OFF
TRACE_LEVEL_CLIENT = SUPPORT
TRACE_DIRECTORY_CLIENT = C:\oracle\ora92\network\ADMIN\trace


確認設定完畢後 使用sqlplus 連接

就會發現client 連接的trace log已經被產生


沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...