0

There are multiple databases installed in the server and i am trying list them

There is an Oracle Linux server where multiple oracle databases are installed, i connected through sqlplus as sysdba , and i found a container with 3 pluggable database.

then there are another 2 databases installed in the same server. how do connect to the other 2 databases to perform some queries,

there are multiple databases installed in the the server and i am trying list them

Adroop
  • 1
  • 1

2 Answers2

0

If you use a oracle container database, you can login to the database using the steps that are below:

  1. login db via sqlplus
  2. show pdbs;
  3. alter session set container=container_db_name;
carr
  • 11
  • 5
0

Re: "the two other databases" (ie, not the container and 2 pdbs previously mentioned). you can find out what they are at the OS command line:

[oracle@vbol83-01 ~]$ ps -ef | grep pmon | grep -v grep
oracle      1673       1  0 Feb14 ?        00:00:07 ora_pmon_orcl
[oracle@vbol83-01 ~]$

This shows that I have one pmon process, and the sid name is 'orcl'. I can then set my environment for that sid, and connect with sqlplus:

[oracle@vbol83-01 ~]$ source oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@vbol83-01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Feb 15 09:42:26 2022
Version 19.3.0.0.0

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


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

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
orcl

SQL>
EdStevens
  • 3,708
  • 2
  • 10
  • 18