Forum Stats

  • 3,826,580 Users
  • 2,260,667 Discussions
  • 7,897,010 Comments

Discussions

Receive ORA-12560 TNS:protocol adapter error with XE 18c / Windows

PhilMan2
PhilMan2 Member Posts: 380 Bronze Badge

Hello,

I receive an ORA-12560 error when I tried to install XE 18c for Windows on a Windows 10 platform.  Previously, I had XE 11 installed.  Here are the steps I took to install:

I removed XE 11 through Windows Control Panel / Applications Uninstaller.  It uninstalled successfully.

I removed system variables (Path, ORACLE_HOME, etc.) related to the prior installation

I extracted the zip file and ran setup.exe.  I overrode the default location to avoid the USERNAME in the string.  The resulting string was C:\app\product\18.0.0\

It installed without incident.  At the end it gave me a success screen indicating:

  • Multitenant container database: localhost:1521
  • Pluggable database: localhost:1521/XEPDB1
  • EM Express URL: https://localhost:5500/em

I edited Windows Environment variables to:

SYSTEM/ORACLE_HOME = C:\app\product\18.0.0\dbhomeXE

SYSTEM/TNS_ADMIN = C:\app\product\18.0.0\dbhomeXE\network\admin

SYSTEM/PATH = (in part) C:\app\product\18.0.0\dbhomeXE\bin; C:\app\product\18.0.0\dbhomeXE\network\admin

In the folder C:\app\product\a8.0.0\dbhomeXE\network\admin I placed the file tnsnames.ora from the prior installation.  It's contents are below:

localhost =

  (DESCRIPTION =

    (ADDRESS =

      (PROTOCOL = TCP)

      (HOST = localhost)

      (PORT = 1521)

    )

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = XE)

    )

  )

EXTPROC_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS =

        (PROTOCOL = IPC)

        (KEY = EXTPROC1)

      )

    )

    (CONNECT_DATA =

      (SID = PLSExtProc)

      (PRESENTATION = RO)

    )

  )

ORACLR_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS =

        (PROTOCOL = IPC)

        (KEY = EXTPROC1)

      )

    )

    (CONNECT_DATA =

      (SID = CLRExtProc)

      (PRESENTATION = RO)

    )

  )

After the installation, I attempted to run SQL plus from a privileged COMMAND prompt.  I input SQLPLUS SYS AS SYSDBA.  When I put in the password I used during the install process I receive the banner line SQL*Plus: Release 18.0.0.0 - Production and the error: ORA-12560: TNS:protocol adapter error

Should I make adjustments to my Windows environment variables or TNSNAMES?

Thanks for looking at this.

By the way, the results of LSNRCTL STATUS are:

LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 21-FEB-2019 18:14:25

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production

Start Date                21-FEB-2019 17:14:57

Uptime                    0 days 0 hr. 59 min. 28 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Default Service           XE

Listener Parameter File   C:\app\product\18.0.0\dbhomeXE\network\admin\listener.ora

Listener Log File         C:\app\product\18.0.0\diag\tnslsnr\DESKTOP-D199POQ\listener\alert\log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-D199POQ)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=C:\APP\PRODUCT\18.0.0\admin\XE\xdb_wallet))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "CLRExtProc" has 1 instance(s).

  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "XE" has 1 instance(s).

  Instance "xe", status READY, has 1 handler(s) for this service...

Service "XEXDB" has 1 instance(s).

  Instance "xe", status READY, has 1 handler(s) for this service...

Service "af67a4a928a84ced894fa5f25dd09f37" has 1 instance(s).

  Instance "xe", status READY, has 1 handler(s) for this service...

Service "xepdb1" has 1 instance(s).

  Instance "xe", status READY, has 1 handler(s) for this service...

The command completed successfully

Best Answer

  • PhilMan2
    PhilMan2 Member Posts: 380 Bronze Badge
    edited Feb 21, 2019 8:43PM Answer ✓

    Hello,

    On a whim, I deleted the installation, left the environmental variables intact, rebooted, and then reinstalled.  SQL Plus now works as expected.  I don't know what the problem was, but the reinstall seems to have fixed things.

Answers

  • PhilMan2
    PhilMan2 Member Posts: 380 Bronze Badge
    edited Feb 21, 2019 8:43PM Answer ✓

    Hello,

    On a whim, I deleted the installation, left the environmental variables intact, rebooted, and then reinstalled.  SQL Plus now works as expected.  I don't know what the problem was, but the reinstall seems to have fixed things.

  • cormaco
    cormaco Member Posts: 1,942 Silver Crown
    edited Feb 22, 2019 10:50AM
    In the folder C:\app\product\a8.0.0\dbhomeXE\network\admin I placed the file tnsnames.ora from the prior installation.

    Did you repeat this step in your second installation? If not then maybe that was the cause of the error.

  • PhilMan2
    PhilMan2 Member Posts: 380 Bronze Badge
    edited Feb 22, 2019 10:59AM

    Hello cormaco,

    After the first install when I was trying to diagnose the problem, I noticed that the system did not provide a TNSNAMES.ORA file in the NETWORK/ADMIN directory, so I copied one from the 11.G installation.  When things still wouldn't work, I uninstalled Oracle XE, deleted the entire directory structure, emptied the recycle bin and rebooted.  The reinstalled resolved the problem.

    Based on your comment, I looked in the NETWORK/ADMIN directory just now and noticed that a new TNSNAMES.ORA file was generated by the installation.  I don't know why it didn't generate one the first time.  Thanks for checking on this.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,153 Employee
    edited Feb 22, 2019 12:04PM

    It is hard to say what is happening as that is a very general error that means "things are FUBAR!", but usually on windows you should not set ORACLE_HOME environment variable. On Windows we use the registry for these values.