資料庫連線非常慢

聽海★藍心夢發表於2012-03-06
在客戶端連線伺服器的時候,點選“登入”,需要10秒多鍾才可以連線到資料庫,連線後操作一切正常。
在客戶端用tnsping伺服器,如下:
C:\Documents and Settings\Administrator>tnsping test_db_192.168.21.31 10
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-1月 -2011 23:32:21

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

已使用的引數檔案:
E:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


已使用 TNSNAMES 介面卡來解析別名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.21.31)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = test_db)))
OK (9730 毫秒)
OK (7700 毫秒)
OK (4770 毫秒)
OK (11110 毫秒)
OK (10810 毫秒)
OK (10770 毫秒)
OK (9500 毫秒)
OK (9370 毫秒)
OK (7820 毫秒)
OK (4450 毫秒)

C:\Documents and Settings\Administrator>

在伺服器本機上tnsping服務名,如下:
bash-3.00$ tnsping test_db 10
TNS Ping Utility for Solaris: Version 9.2.0.8.0 - Production on 12-1月 -2011 23:34:28

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.21.31)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = test_db)))
OK (35770 msec)
OK (10660 msec)
OK (10680 msec)
OK (10010 msec)
OK (10930 msec)
OK (10650 msec)
OK (9120 msec)
OK (10740 msec)
OK (11390 msec)
OK (11040 msec)
bash-3.00$

看了listener.log和sqlnet.log,沒有任何異常,請問這該從哪方面入手檢查呢?

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/751371/viewspace-717860/,如需轉載,請註明出處,否則將追究法律責任。

相關文章