Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

creating a user in Oracle 19c

Murray SobolJun 11 2021 — edited Jun 11 2021

I am starting to use Oracle 19c for the first time; I am having difficulties creating a user.
Here is what I have done (so far):
I created a database with a global name of "Portal".
As part of that I created a Container database with the pluggable name as: PortalPDB.
I assigned the administrative password as: Oracle19c.
The database created as expected.
I then added the following entries to TNSNAMES.ora:
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.15)(PORT = 1621))
)
(CONNECT_DATA =
(SID = PORTAL)
(SERVER = DEDICATED)
)
)
PORTALPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.15)(PORT = 1621))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PORTALPDB)
)
)
PORTAL =
I then restarted the listener service; it shows the following output:
Microsoft Windows [Version 10.0.21390.1010]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd\
C:\>lsnrctl status

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 11-JUN-2021 12:25:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=HP)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date 11-JUN-2021 12:24:56
Uptime 0 days 0 hr. 0 min. 33 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Owner\Product\19.0.0\network\admin\listener.ora
Listener Log File C:\app\Owner\diag\tnslsnr\HP\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HP)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "6d424f1421d04ff19b2311a57017951a" has 1 instance(s).
Instance "portal", status READY, has 1 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PortalXDB" has 1 instance(s).
Instance "portal", status READY, has 1 handler(s) for this service...
Service "portal" has 2 instance(s).
Instance "portal", status UNKNOWN, has 1 handler(s) for this service...
Instance "portal", status READY, has 1 handler(s) for this service...
Service "portalpdb" has 1 instance(s).
Instance "portal", status READY, has 1 handler(s) for this service...
The command completed successfully

C:\>
I believe that I should not create a user in the container database; instead, I should create it in the pluggable database.
I then launched SQLPlus and ran these SQLs:

C:\>sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 11 12:44:12 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select pdb_name, status from dba_pdbs;

PDB_NAME
--------------------------------------------------------------------------------
STATUS
----------
PORTALPDB
NORMAL

PDB$SEED
NORMAL

SQL> connect system/Manager@portalpdb;
ERROR:
ORA-12541: TNS:no listener

Warning: You are no longer connected to ORACLE.
SQL>

I don't understand what I did wrong.
Any assistance would be appreciated.

This post has been answered by User_GSQTY on Jul 27 2021
Jump to Answer

Comments

Post Details

Added on Jun 11 2021
8 comments
5,933 views