ORA-12170:TNS:连接超时解决一例
前几天在机房连接数据库服务器时,报了rdquo;ORA-12170:TNS:连接超时rdquo;。这个错误费了我两天的时间才把问题解决掉,现在总
前几天在机房连接数据库服务器时,报了”ORA-12170:TNS:连接超时”。这个错误费了我两天的时间才把问题解决掉,现在总结下,希望大家少走些弯路
从错误的信息上看,是肯定是本地的客户端和服务器没有连接好,两个机器的Oracle直接不能通信。这个问题就多了,现总结一下:
一tns的配置文件不对
这个问题是最基本的,这是连接的基础。这个我建议直接从服务器上拷贝,就不会出错了。我见过的就是因为服务器名后有空格,导致了服务器无法解析。
二服务器的防火墙开了
防火墙会组织tns直接的连接,验证可以把服务器的防火墙关了试试看。
三路由的配置问题
这是我今天想说的,也是花了我两天的时间弄明白的地方。对于那些既要用外网上网收发邮件,又要用内网连接服务器的用户,这点尤其重要。
我在机房时,用无线连接外网做上网用,用有线连接内网做连接数据库用。正常情况下,是不能同时实现外网和内网的同时访问的,必须先把路由表的信息设置下,使外网和内网的网关不在同一个子网掩码上。可以在控制台下用 route print 查看本地的路由信息。
大家可能没有看没明白,我举例说明。下面这张图是我连不上服务器时的路由信息,重点是前面的两行,可以明显的看到我的外网的网关(192.168.1.1)和内网的网关(132.77.124.129)在同一网络掩码(0.0.0.0)内,这样路由就无法解析了。
这时可以把外网的无线网络断掉,这样内网就可以连接上了。我正是看到了这点,才明白是网络的原因,不是tns的原因。接下来,,我就该看怎样实现内网和外网的同时访问了。
我用了以下的命令:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.1.1
route add 132.77.0.0 mask 255.255.0.0 132.77.124.129
route add 132.78.0.0 mask 255.255.0.0 132.77.124.129
route add 10.193.0.0 mask 255.255.0.0 132.77.124.129
可以逐条的在控制台下输入,也可以做成bat文件的形式直接的手工执行。运行完后,我的路由信息如下图所示
同样可以明显的看到我的外网的网关(192.168.1.1)和内网的网关(132.77.124.129)不在同一个网络掩码内了,这样路由就可以解析了。
总结一下,出现这个问题不要慌,要一步步的去找问题的原因。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

This article will provide a detailed introduction to how to install and register a Bitcoin trading application. The Bitcoin trading app allows users to manage and trade cryptocurrencies such as Bitcoin. The article guides users through the installation and registration process step by step, including downloading applications, creating accounts, performing identity verification, and first deposit. The goal of the article is to provide beginners with clear and easy-to-understand guidelines to help them easily enter the world of Bitcoin trading.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

This article recommends the top ten digital currency trading apps in the world, including Binance, OKX, Huobi Global, Coinbase, Kraken, Gate.io, KuCoin, Bitfinex, Gemini and Bitstamp. These platforms have their own characteristics in terms of transaction pair quantity, transaction speed, security, compliance, user experience, etc. For example, Binance is known for its high transaction speed and extensive services, while Coinbase is more suitable for novices. Choosing a platform that suits you requires comprehensive consideration of your own needs and risk tolerance. Learn about the world's mainstream digital currency trading platforms to help you conduct digital asset trading safely and efficiently.

The virtual currency market is booming, and many trading platforms are born. This article will introduce the three leading applications in the virtual currency field, known for their excellent user experience, powerful security and rich features. These applications include Binance, gate.io and Ouyi, which provide investors with convenient and secure ways to buy, sell, trade and track virtual currencies.

There is no single "best" digital currency trading app, and the choice depends on personal needs. 1. OKX has powerful functions and rich currency types; 2. Binance has high liquidity and diverse transaction types; 3. Gate.io provides unique functions such as staking mining; 4. Huobi Global has a friendly interface and multi-language support; 5. Kraken focuses on security; 6. Coinbase is suitable for beginners and focuses on user education. When choosing, you need to consider security, liquidity, handling fees, functions, user experience and other factors.

This article introduces 10 mainstream cryptocurrency exchanges, covering basic information such as their establishment time, service scope, security, liquidity, transaction fees, etc. These exchanges include: OKX, Binance, Gate.io, Bitget, Coinbase, Huobi, KuCoin, Crypto.com, Gemini and Kraken.

Based on global information, this article compiles the rankings of the world's leading virtual digital currency trading platforms, including Binance, OKX, Gate.io, Huobi, Coinbase, Kraken, Crypto.com, bitget, KuCoin and Bitstamp. These platforms have their own characteristics in terms of user count, transaction volume, transaction types, security, compliance, etc. For example, Binance is known for its large user base and extensive trading options, while Coinbase is known for its leadership and ease of use in the US market. Choosing a suitable trading platform requires weighing factors such as security, fees, and trading products based on your own needs.
