GV$DATABASE
select di.inst_id, -- INST_ID NUMBER di.didbi, -- DBID NUMBER di.didbn, -- NAME VARCHAR2(9) to_date -- CREATED DATE (di.dicts, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), to_number (di.dirls), -- RESETLOGS_CHANGE# NUMBER to_date -- RESETLOGS_TIME DATE (di.dirlc, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), to_number (di.diprs), -- PRIOR_RESETLOGS_CHANGE# NUMBER to_date -- PRIOR_RESETLOGS_TIME DATE (di.diprc, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), decode -- LOG_MODE VARCHAR2(12) (di.dimla, 0, 'NOARCHIVELOG', 1, 'ARCHIVELOG', 'MANUAL'), to_number (di.discn), -- CHECKPOINT_CHANGE# NUMBER to_number (di.difas), -- ARCHIVE_CHANGE# NUMBER decode -- CONTROLFILE_TYPE VARCHAR2(7) (bitand (di.diflg, 256), 256, 'CREATED', decode (bitand (di.diflg, 1024), 1024, 'STANDBY', decode (bitand (di.diflg, 32768), 32768, 'CLONE', decode (bitand (di.diflg, 4096), 4096, 'BACKUP', 'CURRENT')))), to_date -- CONTROLFILE_CREATED DATE (di.dicct, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), di.dicsq, -- CONTROLFILE_SEQUENCE# NUMBER to_number -- CONTROLFILE_CHANGE# NUMBER (di.dickp_scn), to_date -- CONTROLFILE_TIME DATE (di.dickp_tim, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), decode -- OPEN_RESETLOGS VARCHAR2(11) (bitand (di.diflg, 4), 4, 'REQUIRED', decode (di.diirs, 0, 'NOT ALLOWED', 'ALLOWED')), to_date -- VERSION_TIME DATE (di.divts, 'MM/DD/RR HH24:MI:SS', 'NLS_CALENDAR=Gregorian'), decode -- OPEN_MODE VARCHAR2(10) (di.didor, 0, 'MOUNTED', decode (di.didor, 1, 'READ WRITE', 'READ ONLY')), decode -- PROTECTION_MODE VARCHAR2(20) (bitand (di.diflg, 65536), 65536, 'MAXIMUM PROTECTION', decode (bitand (di.diflg, 128), 128, 'MAXIMUM AVAILABILITY', decode (bitand (di.diflg, 134217728), 134217728, 'RESYNCHRONIZATION', decode (bitand (di.diflg, 8), 8, 'UNPROTECTED', 'MAXIMUM PERFORMANCE')))), decode -- PROTECTION_LEVEL VARCHAR2(20) (di.diprt, 1, 'MAXIMUM PROTECTION', 2, 'MAXIMUM AVAILABILITY', 3, 'RESYNCHRONIZATION', 4, 'MAXIMUM PERFORMANCE', 5, 'UNPROTECTED', 'UNKNOWN'), decode -- REMOTE_ARCHIVE VARCHAR2(8) (di.dirae, 0, 'DISABLED', 1, 'SEND', 2, 'RECEIVE', 3, 'ENABLED', 'UNKNOWN'), to_number (di.diacid), -- ACTIVATION# NUMBER to_number (di.diacid), -- SWITCHOVER# NUMBER decode -- DATABASE_ROLE VARCHAR2(16) (bitand (di.diflg, 33554432), 33554432, 'LOGICAL STANDBY', decode (bitand (di.diflg, 1024), 1024, 'PHYSICAL STANDBY', 'PRIMARY')), to_number (di.diars), -- ARCHIVELOG_CHANGE# NUMBER decode -- ARCHIVELOG_COMPRESSION VARCHAR2(8) (bitand (difl2, 1), 1, 'ENABLED', 'DISABLED'), decode -- SWITCHOVER_STATUS VARCHAR2(20) (di.disos, 0, 'IMPOSSIBLE', 1, 'NOT ALLOWED', 2, 'SWITCHOVER LATENT', 3, 'SWITCHOVER PENDING', 4, 'TO PRIMARY', 5, 'TO STANDBY', 6, 'RECOVERY NEEDED', 7, 'SESSIONS ACTIVE', 8, 'PREPARING SWITCHOVER', 9, 'PREPARING DICTIONARY', 10, 'TO LOGICAL STANDBY', 'UNKNOWN'), decode -- DATAGUARD_BROKER VARCHAR2(8) (di.didgd, 0, 'DISABLED', 'ENABLED'), decode -- GUARD_STATUS VARCHAR2(7) (bitand (di.diflg, 1048576), 1048576, 'ALL', decode (bitand (di.diflg, 2097152), 2097152, 'STANDBY', 'NONE')), decode -- SUPPLEMENTAL_LOG_DATA_MIN VARCHAR2(8) (bitand (diflg, 1073741824), 1073741824, 'YES', decode (bitand (diflg, 131072 + 262144 + 524288), 0, decode (bitand (difl2, 2), 0, 'NO', 'IMPLICIT'), 'IMPLICIT')), decode -- SUPPLEMENTAL_LOG_DATA_PK VARCHAR2(3) (bitand (di.diflg, 131072), 131072, 'YES', 'NO'), decode -- SUPPLEMENTAL_LOG_DATA_UI VARCHAR2(3) (bitand (di.diflg, 262144), 262144, 'YES', 'NO'), decode -- FORCE_LOGGING VARCHAR2(3) (bitand (di.diflg, 268435456), 268435456, 'YES', 'NO'), di.diplid, -- PLATFORM_ID NUMBER di.dipln, -- PLATFORM_NAME VARCHAR2(101) di2.di2rdi, -- RECOVERY_TARGET_INCARNATION# NUMBER di2.di2inc, -- LAST_OPEN_INCARNATION# NUMBER to_number -- CURRENT_SCN NUMBER (di.dicur_scn), decode -- FLASHBACK_ON VARCHAR2(18) (bitand (di2.di2flag, 1), 1, 'YES', decode (di2.di2rsp_oldest, 0, 'NO', 'RESTORE POINT ONLY')), decode -- SUPPLEMENTAL_LOG_DATA_FK VARCHAR2(3) (bitand (diflg, 524288), 524288, 'YES', 'NO'), decode -- SUPPLEMENTAL_LOG_DATA_ALL VARCHAR2(3) (bitand (difl2, 2), 2, 'YES', 'NO'), di.didbun, -- DB_UNIQUE_NAME VARCHAR2(30) to_number -- STANDBY_BECAME_PRIMARY_SCN NUMBER (di2.di2actiscn), decode -- FS_FAILOVER_STATUS VARCHAR2(21) (di.difsts, 0, 'DISABLED', 1, 'BYSTANDER', 2, 'SYNCHRONIZED', 3, 'UNSYNCHRONIZED', 4, 'SUSPENDED', 5, 'STALLED', 6, 'LOADING DICTIONARY', 7, 'PRIMARY UNOBSERVED', 8, 'REINSTATE REQUIRED', 9, 'REINSTATE IN PROGRESS', 10, 'REINSTATE FAILED', ''), di.diftgt, -- FS_FAILOVER_CURRENT_TARGET VARCHAR2(30) di.difths, -- FS_FAILOVER_THRESHOLD NUMBER decode -- FS_FAILOVER_OBSERVER_PRESENT VARCHAR2(7) (di.difopr, 1, 'YES', 2, 'NO', 3, 'UNKNOWN', ''), di.difobs -- FS_FAILOVER_OBSERVER_HOST VARCHAR2(512) from x$kccdi di, x$kccdi2 di2

home |  up  |  mailbox