The PDB runs as a service in the CDB.
Below steps will guide to connect to the PDB,
Below steps will guide to connect to the PDB,
- Check if the service is up - lsnrctl status
lsnrctl status
LSNRCTL for
Linux: Version 12.1.0.1.0 - Production on 24-JUL-2013 02:49:59
Copyright (c)
1991, 2013, Oracle. All rights reserved.
.
.
.
Service
"pdb1" has 1 instance(s).
Instance "pdb1", status READY,
has 1 handler(s) for this service...
The command
completed successfully
- Check the if the TNS has the valid entry for the PDB.
pdb1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
Sri12c)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
- To set the PDB environment ,add the entry in oratab
pdb1:/app/oracle/12c:N
- Set the environment using oraenv and connect to the pdb,
sqlplus sys@pdb1 as sysdba
Connected to:
Oracle Database
12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the
Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> show
con_name
CON_NAME
----------
PDB1
SQL> show
con_id
CON_ID
-----------
3
- The other way to connect to the pdb is :
sqlplus pdbadmin/*****@Sri12c:1523/pdb1
==> Schema/Password@HOST:Port/Service_name
No comments:
Post a Comment