본문 바로가기

Database/Oracle

25 - [Oracle 19C] DB name and DB version and instance name.

 

 

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

SQL> select name, cdb, con_id, OPEN_MODE
from V$DATABASE;
  2
NAME		     CDB     CON_ID OPEN_MODE
-------------------- --- ---------- --------------------
ORCL		     YES	  0 READ WRITE

SQL>
SQL> show parameter db_name

NAME	   TYPE	       VALUE
---------- ----------- -------------
db_name    string	   orcl
SQL>

 

 

 

--query the oracle db  version

SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

SQL>

 

 

인스턴스가 하나이면 인스턴스 이름과 DB 이름은 같다.

 

--query the instance name

SQL> select instance_name, version_full, status, database_status from v$instance;

INSTANCE_NAME	 VERSION_FULL	   STATUS	DATABASE_STATUS
---------------- ----------------- ------------ -----------------
orcl		 19.3.0.0.0	   OPEN 	ACTIVE

SQL>
SQL>
SQL>
SQL> show parameter instance_name

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
instance_name			     string	 orcl
SQL>