Commands to view Oracle database name and instance name

Source: Internet
Author: User

View database name

Sql> select name from V$database;

NAME

---------

ORCL

sql> desc v$database;

is the name empty? Type

----------------------------------------- -------- ----------------------------

DBID number

NAME VARCHAR2 (9)

CREATED DATE

resetlogs_change# number

Resetlogs_time DATE

prior_resetlogs_change# number

Prior_resetlogs_time DATE

Log_mode VARCHAR2 (12)

checkpoint_change# number

archive_change# number

Controlfile_type VARCHAR2 (7)

Controlfile_created DATE

controlfile_sequence# number

controlfile_change# number

Controlfile_time DATE

Open_resetlogs VARCHAR2 (11)

Version_time DATE

Open_mode VARCHAR2 (10)

Protection_mode VARCHAR2 (20)

Protection_level VARCHAR2 (20)

Remote_archive VARCHAR2 (8)

activation# number

switchover# number

Database_role VARCHAR2 (16)

archivelog_change# number

Archivelog_compression VARCHAR2 (8)

Switchover_status VARCHAR2 (20)

Dataguard_broker VARCHAR2 (8)

Guard_status VARCHAR2 (7)

Supplemental_log_data_min VARCHAR2 (8)

SUPPLEMENTAL_LOG_DATA_PK VARCHAR2 (3)

SUPPLEMENTAL_LOG_DATA_UI VARCHAR2 (3)

Force_logging VARCHAR2 (3)

PLATFORM_ID number

Platform_name VARCHAR2 (101)

recovery_target_incarnation# number

last_open_incarnation# number

CURRENT_SCN number

flashback_on VARCHAR2 (18)

SUPPLEMENTAL_LOG_DATA_FK VARCHAR2 (3)

Supplemental_log_data_all VARCHAR2 (3)

Db_unique_name VARCHAR2 (30)

STANDBY_BECAME_PRIMARY_SCN number

Fs_failover_status VARCHAR2 (21)

Fs_failover_current_target VARCHAR2 (30)

Fs_failover_threshold number

Fs_failover_observer_present VARCHAR2 (7)

Fs_failover_observer_host VARCHAR2 (512)

---------------------------------------

View instance Name

Sql> select instance_name from V$instance;

Instance_name

----------------

Orcl

sql> desc v$instance;

is the name empty? Type

----------------------------------------- -------- --------------

Instance_number number

instance_name VARCHAR2 (16)

HOST_NAME VARCHAR2 (64)

VERSION VARCHAR2 (17)

Startup_time DATE

STATUS VARCHAR2 (12)

PARALLEL VARCHAR2 (3)

thread# number

Archiver VARCHAR2 (7)

Log_switch_wait VARCHAR2 (15)

LOGINS VARCHAR2 (10)

Shutdown_pending VARCHAR2 (3)

Database_status VARCHAR2 (17)

Instance_role VARCHAR2 (18)

Active_state VARCHAR2 (9)

BLOCKED VARCHAR2 (3)

Commands to view Oracle database name and instance name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.