Reproduction and resolution of wrong ORA-12545/TNS-12545 when using data link

Source: Internet
Author: User
Reproduction and resolution of error ORA-12545TNS-12545 when using data link

Reproduction and resolution of wrong ORA-12545/TNS-12545 when using data link

1. View entries in tnsnames. ora:

Linux_dblk =

(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = linux.linuxidc.com) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = linux)
)
)
In/etc/hosts, .linuxidc.com does not correspond to the IP address, or the IP address of linux.linuxidc.com cannot be obtained through DNS.

2. Create and use a data link

Linuxidc @ linuxidcrac1> create database link linux_db connect to test9 identified by test9 using 'linux _ dblk ';
Database link created.

At this point DBLINK: executed for a long time, error: ORA-12545: Connect failed because target host or object does not exist
21:42:57 linuxidc @ linuxidcrac1> select * from test9 @ linux_DB;
Select * from test9 @ linux_DB
*
ERROR at line 1:
ORA-12545: Connect failed because target host or object does not exist
Elapsed: 00:02:40. 25
########## 3

3. view the error message in the log:

[Oracle @ linuxidcrac1 ~] $ Cat alert_linuxidcrac1.log
When you create and use a data link, an error log similar to the following is displayed: -- truncate part
Sat Dec 28 21:41:29 2013
**************************************** *******************************
Fatal NI connect error 12545, connecting:
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = racdg) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = racdg) (CID = (PROGRAM = oracle) (HOST = linuxidcrac1.linuxidc.com) (USER = oracle ))))

Version information:
TNS for Linux: Version 11.2.0.1.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
Time: 28-DEC-2013 21:41:29
Tracing not turned on.
Tns error struct:
Ns main err code: 12545

TNS-12545: Connect failed because target host or object does not exist
Ns secondary err code: 12560
Nt main err code: 515

TNS-00515: Connect failed because target host or object does not exist
Nt secondary err code: 110
Nt OS err code: 0
###########

4. solution:

Add corresponding entries in/etc/hosts:

192.168.1.211 linux.linuxidc.com linux
The ping linux.linuxidc.com test is normal.

Linuxidc @ linuxidcrac1> select * from test9 @ linux_db;
AA
----------
Dblink-OK --- log on to the database again and use the data link normally:

Related reading:

Oracle ORA-01555 snapshot old description

Troubleshooting for ORA-01078 and LRM-00109

ORA-01555 ultra-long Query Duration time

Notes on ORA-00471 Processing Methods

ORA-00314, redolog corruption, or missing Handling Methods

Solution to ORA-00257 archive logs being too large to store

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.