-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql
More file actions
29 lines (29 loc) · 1.36 KB
/
db.sql
File metadata and controls
29 lines (29 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--
-- Some basic information about the database from v$database.
--
-- See -> os.sql for column PLATFORM_NAME
--
select
-- dbid,
name,
to_char(created, 'dd.mm.yyyy') created,
-- resetlogs_change#, -- System change number (SCN) at open resetlogs
-- resetlogs_time,
log_mode, -- NOARCHIVELOG, ARCHIVELOG, MANUAL
checkpoint_change#, -- Last SCN checkpointed
archive_change#, -- Database force archiving SCN. Any redo log with a start SCN below this will be forced to archive out.
controlfile_type, -- STANDBY: database is in standby mode
-- CLONE
-- BACKUP | CREATED : database is being recovered using a backup or created control file
-- CURRENT database available for general use
to_char(controlfile_created, 'dd.mm.yyyy') "Ctrl Cr.t", -- Creation date of the control file
controlfile_sequence# "Ctrl Seq",
controlfile_change# "Ctrl SCN",
controlfile_time "Ctrl Tim",
open_resetlogs,
open_mode,
database_role
-- switchover_status
-- version_time
from
v$database;