Solution to ORA-12154 and TNS-03505 listening errors

Source: Internet
Author: User
Tags ultraedit
Solution to ORA-12154 and TNS-03505 listening errors

Solution to ORA-12154 and TNS-03505 listening errors

When I tried to perform an exp test in my notebook today, I suddenly reported an error:

Use tnspingBelow:
C: \> tnsping wwl;

TNS Ping Utilityfor 64-bit Windows: Version 10.2.0.4.0-Production on 21-APR-2012 18:27:52

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

Used parameterfiles:

C: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ sqlnet. ora

TNS-03505: failure to resolve name

C: \>

I googled the Internet and said there was a problem with the environment variable. The environment variables are a bit problematic.OracleOfPathIs placed in the middle, the official requirement isOracleOfPathPut it at the beginning. Note that if you modify the environment variables on the interface, you need to restart the computer. This is too troublesome. Directly inDosYou do not need to restart the instance.

1.Modify on the page

My computer->Attribute->Advanced->Environment variable. Find the PATH and change the sequence in it. Take a look.ORACLE_HOMEIf this variable does not exist, add it.

In this way, you need to restart the computer.

C: \> echo % path %

C: \ oracle \ Client; C: \ oracle \ product \ 10.2.0 \ db_1 \ bin; C: \ ProgramFiles \ Common Files \ Microsoft Shared \ Wi

Ndows Live; C: \ ProgramFiles (x86) \ Common Files \ Microsoft Shared \ Windows Live; C: \ Program Files (x86 )\

CommonFiles \ NetSarang; C: \ Windows \ system32; C: \ Windows \ System32 \ Wbem; C: \ Windows \ System32 \ W

IndowsPowerShell \ v1.0 \; C: \ ProgramFiles (x86) \ Windows Live \ Shared; C: \ Program Files (x86) \ Lenovo \ Acce

SsConnections \; C: \ Program Files (x86) \ UltraEdit \; C: \ Program Files (x86) \ DBank \ ClickUp; C: \ Program Fi

Les (x86) \ DBank \ ClickUp

C:/>Set PATH = C: \ oracle \ product \ 10.2.0 \ db_1 \ bin; C: \ oracle \ Client;C: \ ProgramFiles \ Common Files \ Microsoft Shared \ Wi

NdowsLive; C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ WindowsLive; C: \ Program Files (x86 )\

CommonFiles \ NetSarang; C: \ Windows \ system32; C: \ Windows \ System32 \ Wbem; C: \ Windows \ System32 \ W

IndowsPowerShell \ v1.0 \; C: \ ProgramFiles (x86) \ Windows Live \ Shared; C: \ Program Files (x86) \ Lenovo \ Acce

SsConnections \; C: \ Program Files (x86) \ UltraEdit \; C: \ Program Files (x86) \ DBank \ ClickUp; C: \ Program Fi

Les (x86) \ DBank \ ClickUp

C:/Documents andSettings/user. HQ-TEXT>Echo % PATH %

C: \ oracle \ product \ 10.2.0 \ db_1 \ bin; C: \ oracle \ Client; C: \ ProgramFiles \ Common Files \ Microsoft Shared \ Wi

NdowsLive; C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ WindowsLive; C: \ Program Files (x86 )\

CommonFiles \ NetSarang; C: \ Windows \ system32; C: \ Windows \ System32 \ Wbem; C: \ Windows \ System32 \ W

IndowsPowerShell \ v1.0 \; C: \ ProgramFiles (x86) \ Windows Live \ Shared; C: \ Program Files (x86) \ Lenovo \ Acce

SsConnections \; C: \ Program Files (x86) \ UltraEdit \; C: \ Program Files (x86) \ DBank \ ClickUp; C: \ Program Fi

Les (x86) \ DBank \ ClickUp

C: \> tnspingwwl

TNS Ping Utilityfor 64-bit Windows: Version 10.2.0.4.0-Production on 21-APR-2012 18:37:12

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

Used parameterfiles:

C: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ sqlnet. ora

Used TNSNAMES adapter to resolve the alias

Attemptingto contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = ThinkPad) (PO

RT = 1521) (CONNECT_DATA = (SERVICE_NAME = WWL )))

OK (30 msec)

C: \>InDOSAfter the window is modified, we can check"My computer"->"Attribute"->"Advanced"->"Environment Variable"Set inPATHValue, which is automatically modified. Don't worryDOSChanges in the window will affect the value of the environment variable,DOSThe environment variable in the window isWindowsA copy of the environment variable. However, modification to the copy will triggerWindowsRefresh the environment variables, so that we do not need to restart the computer.

For more information about Oracle, see the Oracle topic page? Tid = 12

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.