---
title: "通过plsql（或TNSPING）连接oracle慢 "
author: "mofeichen"
date: "2015-03-26T15:38:56Z"
tags: []
categories: ["数据库"]
slug: "plsql-tnsping-oracle"
draft: false
lastmod: "2015-03-26T16:11:29Z"
id: 2195824
url: "https://mofeichen.iteye.com/blog/2195824"
---

conn / as sysdba 连接很快

conn test/test@orcl 非常慢，要3分钟

 

看来是因为Server 本身的DNS起作用了,DNS一起作用,hosts就有问题了

\- /etc/resolv.conf

;generated by /usr/sbin/oraclevm-template  
#search hostname

#options timeout:15  
#options timeout:15  
#nameserver 172.31.2.23

全去掉,或者干脆把resolv.conf move 掉

 

解决方法：

 

mv /etc/resolv.conf /etc/resolv.conf\_bak

 

重新通过plsql连接，问题解决

 

问题描述可参考：

http://www.itpub.net/thread-1515145-1-1.html