column pdb_name format a20 column status format a20 prompt prompt List of PDBs available on this server: prompt select p.pdb_name from dba_pdbs p join v$pdbs v on (p.pdb_id = v.con_id) where open_mode='READ WRITE' / accept pdb_name DEFAULT 'CDB$ROOT' prompt 'Select a PDB (default=root container): ' alter session set container=&&pdb_name; col con_name format a40 set lines 200 select 'You are connected to: ' || sys_context('USERENV','CON_NAME') "con_name" from dual; col name format a20 col global format a20 col pdb format a20 col con_name format a20 col network_name format a20 col creation_Date format a20 prompt V$SERVICES select name,global,pdb,network_name from v$services / prompt V$ACTIVE_SERVICES select name,global,con_name,network_name from v$active_services / prompt DBA_SERVICES select service_id,name,network_name,creation_date,pdb from dba_services / prompt CDB_SERVICES select service_id,name,network_name,creation_date,pdb from cdb_services / exit
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Thursday, August 3, 2023
Script to check the services in a multitenant container databaser
A simple script to check services running out of a specific PDB, or for all PDBs if the root container is selected:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment