ERROR:ORA-12560 Occurs When Attempting to Log In with sqlplus After Installing Oracle Database 19c

Asked 2 years ago, Updated 2 years ago, 111 views

When I installed Oracle Database 19c in a Windows environment, launched a command prompt, and tried to log in with SQL*Plus through a "SYS" or "SYSTEM" account, I received the following error:

ERROR:
ORA-12560: TNS: Protocol Adapter Error Occurred

I received the above error whether I specified the username and password in SQL*Plus at the same time or separately.
I'm at a loss because I don't know the exact cause.

This may be a rudimentary question, but could you advise me on a solution to enable me to log in?

When I checked the status of the service, the only one named Oracle is OracleRemExecServiceV2 and the status is Running.
Oracle services and Oracle listeners were not found.

windows oracle

2022-09-30 19:22

1 Answers

This error also appears when OracleDB itself is not started.

ORA-12560:TNS:A protocol adapter error has occurred|Oracle Error FAQ

1:Verifying Installation

For example, if you installed Oracle 19c on Windows 10, the following services should exist:
(Control Panel > Administrative Tools > Services)

Enter a description of the image here

Of these, the following services are important and must be started:
If it does not exist, you may have installed only OracleClient instead of OracleDB.

OracleService○○:Oracle DBMS itself
Oracle○○ TNSListener: TNSListener (required point of contact)

Note that TNSListener is not initially configured depending on the installation method, so
If not, it should have been installed with Oracle.
installed with Oracle. Add in the Net Configuration Assistant > listener configuration.

2: For PDB, check PDB launch

The Windows service is configured in the initial configuration installation until the instance starts automatically.
If you are in a legacy mode that does not use PDBs prior to Oracle 11g, this is fine.
However, if you install Oracle as a PDB-enabled mode after Oracle 12c,
OracleService○○ or Oracle○○ TNSListener is up, but
The PDB is not open.

SUPPLEMENT: What is PDB? (Vocabulary contains some inaccuracies, but ease of understanding is a priority)
Unlike SQL Server and mariadb, traditional Oracle was 1:1 because DBMS and DB were virtually separate.
DBMS and DB parts can be separated into 1:N relationships in PDB mode
Consequently, a plurality of DBs can be prepared in one Oracle server (DBMS).
A DBMS part is called a CDB and a DB part is called a PDB.
For the various SQLPlus commands in the past, you can command CDB for DBMS equivalent and PDB for DB equivalent.

Therefore, you will need to start up the PDB after restarting your PC.

Typical methods are as follows:

sqlplus system/manager as sysdba
show pdbs
alter session set container=<PDB name you want to launch>
STARTUP


2022-09-30 19:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.