-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Author       : Sameer S Choudhari
-- Description  : Display database instance details
-- Call Syntax  : @db_info.sql
-- Last Modified: 20/03/2015
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SET LINES 220 PAGES 49999
COLUMN open_mode FORMAT a15
COLUMN db_unique_name FORMAT a20
COLUMN host_name FORMAT a25
COLUMN status FORMAT a8
SELECT d.dbid,
       i.instance_number,
       d.db_unique_name,
       i.instance_name,
       d.created,
       i.host_name,
       d.log_mode,
       d.open_mode,
       i.version,
       i.startup_time,
       i.status,
       i.database_status,
       i.instance_role
FROM gv$database d,
     gv$instance i
WHERE d.inst_id=i.instance_number;