Thanks for the question, John.
Asked: March 15, 2022 - 2:19 pm UTC
Last updated: March 18, 2022 - 5:25 am UTC
Version: 19c
Viewed 10K+ times! This question is
You Asked
Good Morning,
I noticed that when I create a PDB, Oracle doesn't create it a service for it; however, I am still able to log in using the following tns alias with SERVICE_NAME=<new PDB>:
[oracle@localhost bin]$ tnsping orcl
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 15-MAR-2022 09:12:12
Copyright (c) 1997, 2019, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/version/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
Here is the list of services:
09:15:30 SQL> select name from all_services;
NAME
----------------------------------------------------------------
SYS$BACKGROUND
SYS$USERS
orclcdbXDB
orclcdb
09:10:40 SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string orclcdb
Here are the PDBs:
09:10:43 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCL READ WRITE NO
09:11:27 SQL>
Thank you
and Connor said...
There is a "hard coded" or "built in" service for every database ()pluggable or otherwise).
Because its built-in, the ideal configuration is *not* to use that service but create your own, so that you have more control over it. This comes into play especially for RAC where you might want to control service availability across nodes etc. But I acknowledge that most people just use the ones that come with each database.
Rating
(2 ratings)
Is this answer out of date? If it is, please let us know via a Comment