Oracle 11g TNS connection error ORA-12532 troubleshooting

Source: Internet
Author: User

Oracle 11g TNS connection error ORA-12532 troubleshooting

TNS connection errors are common problems for Oracle users. In practice, due to the complexity of the user terminal environment, various TNS connection problems often plague daily users. Operating system version problems, dual Client Server Installation, multi-version Client installation, and local environment variable configuration are common fault scenarios and causes.

This article records how to solve the problem caused by a TNS Bug and records it for friends who need it.

1. Problem Description

The problem is that a colleague always reports an error and cannot connect When configuring to connect to the database. I used tnsping to continue the test and found that the client could not parse the connection name correctly.

The most likely cause of this problem is that the configuration format in the tnsnames. ora file is incorrect. In the Oracle Net network protocol, listener. ora, tnsnames. ora, and sqlnet. ora are three core configuration files. The three files maintain the text specification configuration method, which is a simple but error-prone configuration file.

We found the configuration snippet in the tnsnames. ora file.

TestDB =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.xx.xx) (PORT = 1521 ))

)

(CONNECT_DATA =

(SERVICE_NAME = testdb)

)

)

This format is obviously pasted by colleagues from other places. In previous blog articles, we have discussed parsing rules in tnsnames. ora in the following formats:

Ü the local Net name must be written in the header and cannot contain spaces;

Ü in the configuration information brackets, only the outermost parenthesis can be written at the top of the line. Other parentheses are not allowed. Note: Although tnsping and connection can recognize connections when writing at the top of the outermost brackets, the netca Configuration tool cannot recognize the connections, and the hang of the Configuration tool may occur;

According to this idea, organize the format to form the following format:

TestDB =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.xx.xx) (PORT = 1521 ))

)

(CONNECT_DATA =

(SERVICE_NAME = testdb)

)

)

Then, use tnsping for testing.

C: \ Users \ Thinkpad> tnsping testdb

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0-Production on 01-6-

14:12:27 2015

Copyright (c) 1997,200 7, Oracle. All rights reserved.

Used parameter files:

F: \ app \ xxx \ product \ 11.1.0 \ db_1 \ network \ admin \ sqlnet. ora

Alias resolved using TNSNAMES Adapter

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 172.16.xx.xx) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = testdb )))

TNS-12532: TNS: Invalid Parameter

This is beyond my experience. From the tnsping situation, Oracle Net can correctly parse the link string. Configuration Parameter types are common and there is no error probability.

The most strange is the error message: Invalid parameters. People cannot touch their minds at the moment.

In desperation, I tried to delete the connection content and re-Execute netca to configure the same connection. However, the following error occurs during the final test:

Connecting to... ORA-12532: TNS: Invalid Parameter

Test failed.

Some information you provide may be incorrect.

Click back to check the information of the provided Net service name, or click Change login to change the user name.

This is a strange problem.

2. Problem Analysis and Solution

Database servers and listeners are certainly normal, and other users have no connection problems. The root cause of the problem is still on the client. Based on experience: First, check the configuration and software of the local machine of the colleague in detail.

First, I found that my colleague installed the Oracle 11gR1 server instead of a client program.

C: \ Users \ Thinkpad> tnsping sicsdb

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0-Production on 01-6-

14:12:27 2015

The specific version is 11.1.0.6, and the 32-bit database software is installed on the 64-bit server. Based on experience, there may be many potential bugs when release of any major version of Oracle is less than release 2. In addition, although the 64-bit operating system is compatible with 32-bit software programs in Windows, many underlying calls may cause problems, which may cause bugs.

According to this idea, the author found the corresponding article information on the official MOS Website: 11g: TNS-12532/ORA-12532 Reported When Firewall Is Enabled (Document ID 748466.1 ).

In the article, the Oracle Net Services in 11.1.0.6 may encounter the ora 12532 error. The standard error message is:

[Oracle @ SICS-MIGPC-DB ~] $ Oerr ora 1, 12532

12532,000 00, "TNS: invalid argument"

// * Cause: An internal function has ed an invalid parameter.

// * Action: Not normally visible to the user. For further details, turn

// On tracing and reexecute the operation. If error persists, contact

// Oracle Customer Support.

This is a very internal error and will not be seen by common users. The main reason is that when sending messages from the client, it is blocked by the firewall or other reasons.

This problem has been identified as a bug in Oracle with the serial number 6031201. The error 12532 message is obviously incorrect. It should correspond to the TNS: connection refused information.

Contact your colleagues to modify the problem, disable the local firewall, and retry the experiment. The connection is successful.

C: \ Users \ Thinkpad> tnsping testdb

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0-Production on 01-6-

14:39:54 2015

Copyright (c) 1997,200 7, Oracle. All rights reserved.

Used parameter files:

F: \ app \ xxxx \ product \ 11.1.0 \ db_1 \ network \ admin \ sqlnet. ora

Alias resolved using TNSNAMES Adapter

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 172.16.xx.xx) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = testdb )))

OK (10 ms)

The fault disappears. We recommend that you uninstall the earlier version of Oracle and install the 11.2.0.4 series clients.

3. Conclusion

Oracle Net is an official connection policy, and many friends have various problems in the configuration process. In practice, do not be confused by the problem representation. Further exploring and exploring can help us solve the problem correctly.

Related Article

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.