Class: MintPress::OracleDatabase::Database
- Inherits:
-
DatabaseCommon
- Object
- DatabaseCommon
- MintPress::OracleDatabase::Database
- Includes:
- MintLogger, Mixins::Properties
- Defined in:
- src/oracle-database/lib/oracle-database/model/database/database.rb
Overview
Properties (Read/Write)
-
#name ⇒ String
"Name of the database"
Property Attributes- required ⇒ true
29
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 29 property :name, required: true, type: String, description: "Name of the database"
-
#template ⇒ String (Default Value: 'FMW_MetadataRepository.dbc')
'DBCA template file to use to create the database'
Property Attributes- default ⇒ 'FMW_MetadataRepository.dbc'
30
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 30 property :template, type: String, default: 'FMW_MetadataRepository.dbc', description: 'DBCA template file to use to create the database'
-
#extra_dbca_options ⇒ Hash of ⇒ String
'extra options to pass to the DBCA commandline'
Property Attributes31
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 31 property :extra_dbca_options, type: String, hash: true, description: 'extra options to pass to the DBCA commandline'
-
#db_unique_name ⇒ String (Default Value: '#{name}')
"Unique database name"
Property Attributes- required ⇒ true
- default ⇒ '#{name}'
32
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 32 property :db_unique_name, required: true, type: String, default: '#{name}', description: "Unique database name"
-
#dbid ⇒ Integer
"Database identifier calculated when the database is created and stored in all file headers"
Property Attributes- from ⇒ BigDecimal
34
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 34 property :dbid, type: Integer, from: BigDecimal, description: "Database identifier calculated when the database is created and stored in all file headers"
-
#created ⇒ Time
"Creation date of the database. If the control file was re-created using the CREATE CONTROLFILE statement, then this column displays the date that the control file was re-created."
Property Attributes- from ⇒ String
35
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 35 property :created, type: Time, from: String, description: "Creation date of the database. If the control file was re-created using the CREATE CONTROLFILE statement, then this column displays the date that the control file was re-created."
-
#resetlogs_change ⇒ Integer
"System change number (SCN) at open resetlogs"
Property Attributes- from ⇒ BigDecimal
37
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 37 property :resetlogs_change, type: Integer, from: BigDecimal, description: "System change number (SCN) at open resetlogs"
-
#resetlogs_time ⇒ Time
"Timestamp of open resetlogs"
Property Attributes- from ⇒ String
38
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 38 property :resetlogs_time, type: Time, from: String, description: "Timestamp of open resetlogs"
-
#prior_resetlogs_change ⇒ Integer
"SCN at prior resetlogs"
Property Attributes- from ⇒ BigDecimal
39
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 39 property :prior_resetlogs_change, type: Integer, from: BigDecimal, description: "SCN at prior resetlogs"
-
#prior_resetlogs_time ⇒ Time
"Timestamp of prior resetlogs"
Property Attributes- from ⇒ String
40
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 40 property :prior_resetlogs_time, type: Time, from: String, description: "Timestamp of prior resetlogs"
-
#checkpoint_change ⇒ Integer
"Last SCN checkpointed"
Property Attributes- from ⇒ BigDecimal
42
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 42 property :checkpoint_change, type: Integer, from: BigDecimal, description: "Last SCN checkpointed"
-
#archive_change ⇒ Integer
"Database force archiving SCN. Any redo log with a start SCN below this will be forced to archive out."
Property Attributes- from ⇒ BigDecimal
43
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 43 property :archive_change, type: Integer, from: BigDecimal, description: "Database force archiving SCN. Any redo log with a start SCN below this will be forced to archive out."
-
#controlfile_type ⇒ String
"Type of control file: STANDBY - Indicates that the database is in standby mode, CLONE - Indicates a clone database, BACKUP | CREATED - Indicates the database is being recovered using a backup or created control file, CURRENT - database is available for general use"
Property Attributes- allowed_values ⇒ %w{STANDBY CLONE BACKUP CREATED CURRENT},
45
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 45 property :controlfile_type, type: String, allowed_values: %w{STANDBY CLONE BACKUP CREATED CURRENT}, description: "Type of control file: STANDBY - Indicates that the database is in standby mode, CLONE - Indicates a clone database, BACKUP | CREATED - Indicates the database is being recovered using a backup or created control file, CURRENT - database is available for general use"
-
#controlfile_created ⇒ Time
"Creation date of the control file"
Property Attributes- from ⇒ String
46
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 46 property :controlfile_created, type: Time, from: String, description: "Creation date of the control file"
-
#controlfile_change ⇒ Integer
"Control file sequence number incremented by control file transactions"
Property Attributes- from ⇒ BigDecimal
47
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 47 property :controlfile_change, type: Integer, from: BigDecimal, description: "Control file sequence number incremented by control file transactions"
-
#controlfile_sequence ⇒ Integer
"Last SCN in backup control file; null if the control file is not a backup"
Property Attributes- from ⇒ BigDecimal
48
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 48 property :controlfile_sequence, type: Integer, from: BigDecimal, description: "Last SCN in backup control file; null if the control file is not a backup"
-
#controlfile_time ⇒ Time
"Last timestamp in backup control file; null if the control file is not a backup"
Property Attributes- from ⇒ String
49
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 49 property :controlfile_time, type: Time, from: String, description: "Last timestamp in backup control file; null if the control file is not a backup"
-
#open_resetlogs ⇒ String
"(NOT ALLOWED | ALLOWED | REQUIRED) Indicates whether the next database open allows or requires the resetlogs option"
Property Attributes- allowed_values ⇒ [ "NOT ALLOWED", "ALLOWED", "REQUIRED"]
51
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 51 property :open_resetlogs, type: String, allowed_values: [ "NOT ALLOWED", "ALLOWED", "REQUIRED"], description: "(NOT ALLOWED | ALLOWED | REQUIRED) Indicates whether the next database open allows or requires the resetlogs option"
-
#open_mode ⇒ String
"Open mode information: MOUNTED, READ WRITE, READ ONLY, READ ONLY WITH APPLY - A physical standby database is open in real-time query mode"
Property Attributes- allowed_values ⇒ [ "MOUNTED", "READ WRITE", "READ ONLY", "READ ONLY WITH APPLY" ]
52
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 52 property :open_mode, type: String, allowed_values: [ "MOUNTED", "READ WRITE", "READ ONLY", "READ ONLY WITH APPLY" ], description: "Open mode information: MOUNTED, READ WRITE, READ ONLY, READ ONLY WITH APPLY - A physical standby database is open in real-time query mode"
-
#log_mode ⇒ String (Default Value: 'NOARCHIVELOG')
"Archive log mode: NOARCHIVELOG, ARCHIVELOG, MANUAL"
Property Attributes- required ⇒ true
- allowed_values ⇒ %w{NOARCHIVELOG ARCHIVELOG},
- default ⇒ 'NOARCHIVELOG'
54
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 54 property :log_mode, required: true, type: String, allowed_values: %w{NOARCHIVELOG ARCHIVELOG}, default: 'NOARCHIVELOG', description: "Archive log mode: NOARCHIVELOG, ARCHIVELOG, MANUAL"
-
#protection_mode ⇒ String (Default Value: 'UNPROTECTED')
"Protection mode currently in effect for the database: MAXIMUM PROTECTION - Database is running in maximized protection mode, MAXIMUM AVAILABILITY - Database is running in maximized availability mode, RESYNCHRONIZATION - Database is running in resynchronization mode, MAXIMUM PERFORMANCE - Database is running in maximized performance mode, UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open)"
Property Attributes- required ⇒ true
- allowed_values ⇒ [ "MAXIMUM PROTECTION", "MAXIMUM AVAILABILITY", "RESYNCHRONIZATION", "MAXIMUM PERFORMANCE", "UNPROTECTED" ]
- default ⇒ 'UNPROTECTED'
56
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 56 property :protection_mode, required: true, type: String, allowed_values: [ "MAXIMUM PROTECTION", "MAXIMUM AVAILABILITY", "RESYNCHRONIZATION", "MAXIMUM PERFORMANCE", "UNPROTECTED" ], default: 'UNPROTECTED', description: "Protection mode currently in effect for the database: MAXIMUM PROTECTION - Database is running in maximized protection mode, MAXIMUM AVAILABILITY - Database is running in maximized availability mode, RESYNCHRONIZATION - Database is running in resynchronization mode, MAXIMUM PERFORMANCE - Database is running in maximized performance mode, UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open)"
-
#protection_level ⇒ String
"Aggregated protection mode currently in effect for the database: MAXIMUM PROTECTION - Database is running in maximized protection mode, MAXIMUM AVAILABILITY - Database is running in maximized availability mode, RESYNCHRONIZATION - Database is running in resynchronization mode, MAXIMUM PERFORMANCE - Database is running in maximized performance mode, UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open). Note: This column is an aggregation of the PROTECTION_MODE of all standby archive log destinations."
Property Attributes- allowed_values ⇒ [ "MAXIMUM PROTECTION", "MAXIMUM AVAILABILITY", "RESYNCHRONIZATION", "MAXIMUM PERFORMANCE", "UNPROTECTED" ]
57
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 57 property :protection_level, type: String, allowed_values: [ "MAXIMUM PROTECTION", "MAXIMUM AVAILABILITY", "RESYNCHRONIZATION", "MAXIMUM PERFORMANCE", "UNPROTECTED" ], description: "Aggregated protection mode currently in effect for the database: MAXIMUM PROTECTION - Database is running in maximized protection mode, MAXIMUM AVAILABILITY - Database is running in maximized availability mode, RESYNCHRONIZATION - Database is running in resynchronization mode, MAXIMUM PERFORMANCE - Database is running in maximized performance mode, UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open). Note: This column is an aggregation of the PROTECTION_MODE of all standby archive log destinations."
-
#remove_archive ⇒ String
"Value of the REMOTE_ARCHIVE_ENABLE initialization parameter"
Property Attributes59
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 59 property :remove_archive, type: String, description: "Value of the REMOTE_ARCHIVE_ENABLE initialization parameter"
-
#activation ⇒ Integer
"Number assigned to the database instantiation"
Property Attributes- from ⇒ BigDecimal
61
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 61 property :activation, type: Integer, from: BigDecimal, description: "Number assigned to the database instantiation"
-
#switchover ⇒ Integer
"Number assigned to the database switchover"
Property Attributes- from ⇒ BigDecimal
62
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 62 property :switchover, type: Integer, from: BigDecimal, description: "Number assigned to the database switchover"
-
#database_role ⇒ String (Default Value: 'PRIMARY')
"Current role of the database: SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC"
Property Attributes- required ⇒ true
- allowed_values ⇒ [ "SNAPSHOT STANDBY", "LOGICAL STANDBY", "PHYSICAL STANDBY", "PRIMARY", "FAR SYNC"]
- default ⇒ 'PRIMARY'
64
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 64 property :database_role, required: true, type: String, allowed_values: [ "SNAPSHOT STANDBY", "LOGICAL STANDBY", "PHYSICAL STANDBY", "PRIMARY", "FAR SYNC"], default: 'PRIMARY', description: "Current role of the database: SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC"
-
#archivelog_change ⇒ Integer
"Highest NEXT_CHANGE# (from the V$ARCHIVED_LOG view) for an archive log"
Property Attributes- from ⇒ BigDecimal
66
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 66 property :archivelog_change, type: Integer, from: BigDecimal, description: "Highest NEXT_CHANGE# (from the V$ARCHIVED_LOG view) for an archive log"
-
#archivelog_compression ⇒ String
"Status of the archive log compression (ENABLED) or (DISABLED)"
Property Attributes67
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 67 property :archivelog_compression, type: String, description: "Status of the archive log compression (ENABLED) or (DISABLED)"
-
#switchover_status ⇒ String
"Indicates whether switchover is allowed: NOT ALLOWED - On a primary database, this status indicates that there are no valid and enabled standby databases. On a standby database, this status indicates that a switchover request has not been received from the primary database. SESSIONS ACTIVE - The database has active sessions. On a physical standby database, the WITH SESSION SHUTDOWN SQL clause must be specified to perform a role transition while in this state. On a logical standby database, a role transition can be performed while in this state, but the role transition will not complete until all current transactions have committed. SWITCHOVER PENDING - On a physical standby database, this status indicates that a switchover request has been received from the primary database and is being processed. A physical standby database cannot switch to the primary role while in this transient state. SWITCHOVER LATENT - On a physical standby database, this status indicates that a switchover request was pending, but the original primary database has been switched back to the primary role. TO PRIMARY - The database is ready to switch to the primary role. TO STANDBY - The database is ready to switch to either the physical or logical standby role. TO LOGICAL STANDBY - The database has received a data dictionary from a logical standby database and is ready to switch to the logical standby role. RECOVERY NEEDED - On a physical standby database, this status indicates that additional redo must be applied before the database can switch to the primary role. PREPARING SWITCHOVER - On a primary database, this status indicates that a data dictionary is being received from a logical standby database in preparation for switching to the logical standby role. On a logical standby database, this status indicates that the data dictionary has been sent to the primary database and other standby databases. PREPARING DICTIONARY - On a logical standby database, this status indicates that the data dictionary is being sent to the primary database and other standby databases in preparation for switching to the primary role. FAILED DESTINATION - On a primary database, this status indicates that one or more standby destinations are in an error state. RESOLVABLE GAP - On a primary database, this status indicates that one or more standby databases have a redo gap that can be automatically resolved by fetching the missing redo from the primary database or from another standby database. UNRESOLVABLE GAP - On a primary database, this status indicates that one or more standby databases have a redo gap that cannot be automatically resolved by fetching the missing redo from the primary database or from another standby database. LOG SWITCH GAP - On a primary database, this status indicates that one or more standby databases are missing redo due to a recent log switch."
Property Attributes- allowed_values ⇒ [ "NOT ALLOWED", "SESSIONS ACTIVE", "SWITCHOVER PENDING", "SWITCHOVER LATENT", "TO PRIMARY", "TO STANDBY", "TO LOGICAL STANDBY", "RECOVERY NEEDED", "PREPARING SWITCHOVER", "PREPARING DICTIONARY", "FAILED DESTINATION", "RESOLVABLE GAP", "UNRESOLVABLE GAP", "LOG SWITCH GAP" ]
69
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 69 property :switchover_status, type: String, allowed_values: [ "NOT ALLOWED", "SESSIONS ACTIVE", "SWITCHOVER PENDING", "SWITCHOVER LATENT", "TO PRIMARY", "TO STANDBY", "TO LOGICAL STANDBY", "RECOVERY NEEDED", "PREPARING SWITCHOVER", "PREPARING DICTIONARY", "FAILED DESTINATION", "RESOLVABLE GAP", "UNRESOLVABLE GAP", "LOG SWITCH GAP" ], description: "Indicates whether switchover is allowed: NOT ALLOWED - On a primary database, this status indicates that there are no valid and enabled standby databases. On a standby database, this status indicates that a switchover request has not been received from the primary database. SESSIONS ACTIVE - The database has active sessions. On a physical standby database, the WITH SESSION SHUTDOWN SQL clause must be specified to perform a role transition while in this state. On a logical standby database, a role transition can be performed while in this state, but the role transition will not complete until all current transactions have committed. SWITCHOVER PENDING - On a physical standby database, this status indicates that a switchover request has been received from the primary database and is being processed. A physical standby database cannot switch to the primary role while in this transient state. SWITCHOVER LATENT - On a physical standby database, this status indicates that a switchover request was pending, but the original primary database has been switched back to the primary role. TO PRIMARY - The database is ready to switch to the primary role. TO STANDBY - The database is ready to switch to either the physical or logical standby role. TO LOGICAL STANDBY - The database has received a data dictionary from a logical standby database and is ready to switch to the logical standby role. RECOVERY NEEDED - On a physical standby database, this status indicates that additional redo must be applied before the database can switch to the primary role. PREPARING SWITCHOVER - On a primary database, this status indicates that a data dictionary is being received from a logical standby database in preparation for switching to the logical standby role. On a logical standby database, this status indicates that the data dictionary has been sent to the primary database and other standby databases. PREPARING DICTIONARY - On a logical standby database, this status indicates that the data dictionary is being sent to the primary database and other standby databases in preparation for switching to the primary role. FAILED DESTINATION - On a primary database, this status indicates that one or more standby destinations are in an error state. RESOLVABLE GAP - On a primary database, this status indicates that one or more standby databases have a redo gap that can be automatically resolved by fetching the missing redo from the primary database or from another standby database. UNRESOLVABLE GAP - On a primary database, this status indicates that one or more standby databases have a redo gap that cannot be automatically resolved by fetching the missing redo from the primary database or from another standby database. LOG SWITCH GAP - On a primary database, this status indicates that one or more standby databases are missing redo due to a recent log switch."
-
#dataguard_broker ⇒ String
"Data Guard broker information: ENABLED - Database is part of a broker configuration and broker management of the database is enabled. DISABLED - Database is part of a broker configuration and broker management of the database is disabled. This value is displayed if the user disabled broker management of the database or configuration, or if broker management was disabled due to a role change (for example, the old primary was disabled after a failover operation)."
Property Attributes- allowed_values ⇒ [ "ENABLED", "DISABLED" ]
71
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 71 property :dataguard_broker, type: String, allowed_values: [ "ENABLED", "DISABLED" ], description: "Data Guard broker information: ENABLED - Database is part of a broker configuration and broker management of the database is enabled. DISABLED - Database is part of a broker configuration and broker management of the database is disabled. This value is displayed if the user disabled broker management of the database or configuration, or if broker management was disabled due to a role change (for example, the old primary was disabled after a failover operation)."
-
#guard_status ⇒ String
"Protects data from being changed: ALL - Indicates all users other than SYS are prevented from making changes to any data in the database. STANDBY - Indicates all users other than SYS are prevented from making changes to any database object being maintained by logical standby. NONE - Indicates normal security for all data in the database."
Property Attributes- allowed_values ⇒ %w{ALL STANDBY NONE},
72
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 72 property :guard_status, type: String, allowed_values: %w{ALL STANDBY NONE}, description: "Protects data from being changed: ALL - Indicates all users other than SYS are prevented from making changes to any data in the database. STANDBY - Indicates all users other than SYS are prevented from making changes to any database object being maintained by logical standby. NONE - Indicates normal security for all data in the database."
-
#force_logging ⇒ [ TrueClass, FalseClass ] (Default Value: false)
"Indicates whether the database is under force logging mode (YES/true) or not (NO/false)"
Property Attributes- required ⇒ true
- default ⇒ false
- from ⇒ Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
74
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 74 property :force_logging, required: true, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }, description: "Indicates whether the database is under force logging mode (YES/true) or not (NO/false)"
-
#current_scn ⇒ Integer
"Current SCN; null if the database is not currently open. For a standby database, it is the checkpoint SCN of the mounted physical standby database during media recovery and is always less than the last applied SCN tracked in V$RECOVERY_PROGRESS."
Property Attributes- from ⇒ BigDecimal
76
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 76 property :current_scn, type: Integer, from: BigDecimal, description: "Current SCN; null if the database is not currently open. For a standby database, it is the checkpoint SCN of the mounted physical standby database during media recovery and is always less than the last applied SCN tracked in V$RECOVERY_PROGRESS."
-
#flashback_on ⇒ String (Default Value: "NO")
"Possible values are as follows: YES - Flashback is on. NO - Flashback is off. RESTORE POINT ONLY - Flashback is on but one can only flashback to guaranteed restore points"
Property Attributes- required ⇒ true
- allowed_values ⇒ [ "YES", "NO", "RESTORE POINT ONLY" ]
- default ⇒ "NO"
78
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 78 property :flashback_on, required: true, type: String, allowed_values: [ "YES", "NO", "RESTORE POINT ONLY" ], default: "NO", description: "Possible values are as follows: YES - Flashback is on. NO - Flashback is off. RESTORE POINT ONLY - Flashback is on but one can only flashback to guaranteed restore points"
-
#platform_id ⇒ Integer
"Platform identification number of the database"
Property Attributes- from ⇒ BigDecimal
80
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 80 property :platform_id, type: Integer, from: BigDecimal, description: "Platform identification number of the database"
-
#platform_name ⇒ String
"Platform name of the database"
Property Attributes81
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 81 property :platform_name, type: String, description: "Platform name of the database"
-
#cdb ⇒ [ TrueClass, FalseClass ] (Default Value: false)
"Possible values are: YES (true) if the database is a CDB. NO (false) if the database is not a CDB"
Property Attributes- required ⇒ true
- default ⇒ false
- from ⇒ Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
83
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 83 property :cdb, required: true, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }, description: "Possible values are: YES (true) if the database is a CDB. NO (false) if the database is not a CDB"
-
#con_id ⇒ Integer
"The ID of the container to which the data pertains. Possible values include: 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs. 1: This value is used for rows containing data that pertain to only the root. n: Where n is the applicable container ID for the rows containing data"
Property Attributes- from ⇒ BigDecimal
84
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 84 property :con_id, type: Integer, from: BigDecimal, description: "The ID of the container to which the data pertains. Possible values include: 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs. 1: This value is used for rows containing data that pertain to only the root. n: Where n is the applicable container ID for the rows containing data"
-
#con_dbid ⇒ Integer
"The database ID of the PDB"
Property Attributes- from ⇒ BigDecimal
85
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 85 property :con_dbid, type: Integer, from: BigDecimal, description: "The database ID of the PDB"
-
#nodes ⇒ Hash of ⇒ MintPress::OracleDatabase::Node (Default Value: Proc.new {
r = nil
if get_property(:installation, disable_proc: true)
r = { default: installation.node }
end
r
})
All of the nodes which contain this database
Property Attributes- default ⇒ Proc.new { r = nil if get_property(:installation, disable_proc: true) r = { default: installation.node } end r }
- canonical ⇒ true
88 89 90 91 92 93 94
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 88 property :nodes, type: MintPress::OracleDatabase::Node, default: Proc.new { r = nil if get_property(:installation, disable_proc: true) r = { default: installation.node } end r }, hash: true, canonical: true
-
#listeners ⇒ Hash of ⇒ MintPress::OracleDatabase::Listener (Default Value: {})
All of the listeners for this database
Property Attributes- default ⇒ {}
- canonical ⇒ true
- alias ⇒ :listener
96
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 96 property :listeners, type: MintPress::OracleDatabase::Listener, default: {}, hash: true, canonical: true, alias: :listener
-
#instances ⇒ Hash of ⇒ MintPress::OracleDatabase::Instance (Default Value: {})
All of the instances of this database, if configured in a grid configuration
Property Attributes- default ⇒ {}
- canonical ⇒ true
98
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 98 property :instances, type: MintPress::OracleDatabase::Instance, default: {}, hash: true, canonical: true
-
#parameters ⇒ Hash of ⇒ MintPress::OracleDatabase::Parameter (Default Value: {})
All of the parameters to apply to this database
Property Attributes- default ⇒ {}
- canonical ⇒ true
100
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 100 property :parameters, type: MintPress::OracleDatabase::Parameter, default: {}, hash: true, canonical: true
-
#tablespaces ⇒ Hash of ⇒ MintPress::OracleDatabase::Tablespace (Default Value: {})
All of the tablespaces to which exist within this database. Note this is currently only used by the harvest action, and does not create the tablespaces if they do not exist
Property Attributes- default ⇒ {}
- canonical ⇒ true
103
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 103 property :tablespaces, type: MintPress::OracleDatabase::Tablespace, default: {}, hash: true, canonical: true
-
#datafiles ⇒ Hash of ⇒ MintPress::OracleDatabase::Datafile (Default Value: {})
All of the datafiles used by this database. Note that this is currently only used by the harvest action, and does not cause new datafiles to be created
Property Attributes- default ⇒ {}
- canonical ⇒ true
106
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 106 property :datafiles, type: MintPress::OracleDatabase::Datafile, default: {}, hash: true, canonical: true
-
#users ⇒ Hash of ⇒ MintPress::OracleDatabase::User (Default Value: {})
All of the users within this database. Note that this is currnetly only used by the harvest action, and does not cause new database users to be created
Property Attributes- default ⇒ {}
- canonical ⇒ true
109
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 109 property :users, type: MintPress::OracleDatabase::User, default: {}, hash: true, canonical: true
-
#installation ⇒ MintPress::OracleDatabase::Installation (Default Value: Proc.new { self.nodes.values[0].installation })
The installation which this database uses - if this is specified, items like ORACLE_HOME will be derived from it
Property Attributes- default ⇒ Proc.new { self.nodes.values[0].installation }
112
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 112 property :installation, type: MintPress::OracleDatabase::Installation, default: Proc.new { self.nodes.values[0].installation }
-
#host (Default Value: Proc.new { r = nil
if self.nodes.values[0] and self.nodes.values[0].host
r = self.nodes.values[0].host
elsif self.default_localhost
r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user)
end
r })
This is a hack to make some other things work... there absolutely needs to be some more finesse around these!
Property Attributes- default ⇒ Proc.new { r = nil if self.nodes.values[0] and self.nodes.values[0].host r = self.nodes.values[0].host elsif self.default_localhost r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r }
114 115 116 117 118 119 120
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 114 property :host, default: Proc.new { r = nil if self.nodes.values[0] and self.nodes.values[0].host r = self.nodes.values[0].host elsif self.default_localhost r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r }
-
#db_connect_address ⇒ String (Default Value: Proc.new { nodes.values[0].host.fqdn })
Address on which to connect to the database for harvest actions - this defaults to the hostname of the primary node. Note that non-harvest actions will instead either connect directly on the local socket, or they will use the listener, and this will be ignored.
Property Attributes- default ⇒ Proc.new { nodes.values[0].host.fqdn }
131
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 131 property :db_connect_address, type: String, default: Proc.new { nodes.values[0].host.fqdn }
-
#db_connect_port ⇒ Integer (Default Value: 1521)
Database connect port - this defaults to 1521. Note that non-harvest actions will instead either connect directly on the local socket, or they will use the listener, and this will be ignored.
Property Attributes- default ⇒ 1521
134
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 134 property :db_connect_port, type: Integer, default: 1521
-
#db_service_name ⇒ String (Default Value: Proc.new { self.name })
Note that non-harvest actions will instead either connect directly on the local socket, or they will use the listener, and this will be ignored.
Property Attributes- default ⇒ Proc.new { self.name }
136
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 136 property :db_service_name, type: String, default: Proc.new { self.name }
-
#alternate_service_names ⇒ Array of ⇒ String
Any alternate service names this database is accessable as. It will always be accessable as the default service.
Property Attributes138
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 138 property :alternate_service_names, type: String, array: true
-
#pluggables ⇒ Hash of ⇒ MintPress::OracleDatabase::PluggableDatabase (Default Value: {})
Pluggable databases associated with this Container DB
Property Attributes- default ⇒ {}
- canonical ⇒ true
143
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 143 property :pluggables, type: MintPress::OracleDatabase::PluggableDatabase, default: {}, hash: true, canonical: true
-
#db_username (Default Value: 'sys')
Username for the sys user Leaving alias: :sysdba_username for backward compatibility
Property Attributes- default ⇒ 'sys'
- required ⇒ true
- alias ⇒ :sysdba_username
147
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 147 property :db_username, default: 'sys', required: true, alias: :sysdba_username
-
#db_password ⇒ Mint::Secret
Password for the sys user Leaving alias: :sysdba_password for backward compatibility
Property Attributes- from ⇒ String
- required ⇒ true
- alias ⇒ :sysdba_password
151
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 151 property :db_password, type: Mint::Secret, from: String, required: true, alias: :sysdba_password
-
#db_role ⇒ String (Default Value: 'SYSDBA')
Role for the above user
Property Attributes- default ⇒ 'SYSDBA'
154
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 154 property :db_role, type: String, default: 'SYSDBA'
-
#storage_type ⇒ String (Default Value: 'FS')
Storage type for datafiles. Options are 'FS' and 'ASM'
Property Attributes- allowed_values ⇒ %w(FS ASM),
- default ⇒ 'FS'
157
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 157 property :storage_type, type: String, allowed_values: %w(FS ASM), default: 'FS'
-
#datafile_top ⇒ Pathname (Default Value: '/oracle/app/oradata')
If storage_type is 'FS', where to place the datafiles
Property Attributes- from ⇒ String
- default ⇒ '/oracle/app/oradata'
160
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 160 property :datafile_top, type: Pathname, from: String, default: '/oracle/app/oradata'
-
#archivelog_top ⇒ Pathname (Default Value: '/oracle/app/archive')
If storage_type is 'FS', where to place the archive log files
Property Attributes- from ⇒ String
- default ⇒ '/oracle/app/archive'
162
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 162 property :archivelog_top, type: Pathname, from: String, default: '/oracle/app/archive'
-
#flashback_top ⇒ Pathname (Default Value: '/oracle/app/flashback')
If storage_type is 'FS', where to place the flashback files
Property Attributes- from ⇒ String
- default ⇒ '/oracle/app/flashback'
164
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 164 property :flashback_top, type: Pathname, from: String, default: '/oracle/app/flashback'
-
#character_set ⇒ String (Default Value: 'AL32UTF8')
Default character set
Property Attributes- required ⇒ true
- default ⇒ 'AL32UTF8'
167
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 167 property :character_set, required: true, type: String, default: 'AL32UTF8'
-
#national_character_set ⇒ String (Default Value: 'AL16UTF16')
Default national character set
Property Attributes- required ⇒ true
- default ⇒ 'AL16UTF16'
169
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 169 property :national_character_set, required: true, type: String, default: 'AL16UTF16'
-
#max_datafiles ⇒ Integer (Default Value: 100)
Maximum number of allowed datafiles
Property Attributes- required ⇒ true
- default ⇒ 100
172
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 172 property :max_datafiles, required: true, type: Integer, default: 100
-
#max_logfiles ⇒ Integer (Default Value: 16)
Maximum number of allower logfiles
Property Attributes- required ⇒ true
- default ⇒ 16
174
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 174 property :max_logfiles, required: true, type: Integer, default: 16
-
#max_log_members ⇒ Integer (Default Value: 3)
Maximum number of log members
Property Attributes- required ⇒ true
- default ⇒ 3
176
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 176 property :max_log_members, required: true, type: Integer, default: 3
-
#max_log_history ⇒ Integer (Default Value: 1)
Maximum log history to keep
Property Attributes- required ⇒ true
- default ⇒ 1
178
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 178 property :max_log_history, required: true, type: Integer, default: 1
-
#max_instances ⇒ Integer (Default Value: 8)
Maximum number of allowed instances of this database
Property Attributes- required ⇒ true
- default ⇒ 8
180
# File 'src/oracle-database/lib/oracle-database/model/database/database.rb', line 180 property :max_instances, required: true, type: Integer, default: 8
Properties (Read Only)
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary
Attributes included from Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
-
#create ⇒ void
Create an Oracle database.
-
#delete ⇒ void
Delete/Remove an Oracle database.
- #exist? ⇒ Boolean
-
#exists? ⇒ TrueClass | FalseClass
Does the database exist?.
-
#get_instance_variables ⇒ Hash
Return all properties and class instance variables in Hash format.
-
#harvest ⇒ MintPress::OracleDatabase::Database
Harvest Database configuration from running system Required Properties: name: The DB unique name db_username: The SYSDBA username.
-
#initialize(opts = {}) ⇒ Database
constructor
A new instance of Database.
-
#recompile_invalid_objects ⇒ void
Recompile all invalid objects in a database METHOD NOT YET IMPLEMENTED.
- #run_admin_sql(sql) ⇒ Object
-
#running? ⇒ TrueClass | FalseClass
Does the database have a running instance?.
-
#sql_session(sid: nil) ⇒ MintPress::OracleUtils::SQLSession
Create a SQL Session using MintPress::OracleUtils::SQLSession for the Oracle Database.
-
#start ⇒ void
Start the database.
-
#stop ⇒ void
Shutdown/Stop the database.
-
#strip_hash(x) ⇒ Hash
When harvesting Database configuration, strip all properties that are prefixed with `#` due to conflicts with Ruby.
- #usage ⇒ Object
Methods included from Mixins::Properties
#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Constructor Details
#initialize(opts = {}) ⇒ Database
Instance Method Details
#create ⇒ void
This method returns an undefined value.
Create an Oracle database. This method uses Oracle Database Creation Assistant (DBCA) to create an Oracle database based on the following properties. Required Properties: name: The DB unique name template: The DBCA template name to use db_password: The SYSDBA password. This will also set the SYSTEM password to the same value storage_type: The storage type for the database (FS = filsystem, ASM = Oracle Automatic Storage Management) datafile_top: The location to create the database datafiles log_mode: Whether the database is to be created with ARCHIVELOG mode or not#delete ⇒ void
This method returns an undefined value.
Delete/Remove an Oracle database. This method uses Oracle Database Creation Assistant (DBCA) to delete an Oracle database based on the following properties. Required Properties: name: The DB unique name db_username: The SYSDBA username. Default 'sys' db_password: The SYSDBA password. This will also set the SYSTEM password to the same value#exist? ⇒ Boolean
#exists? ⇒ TrueClass | FalseClass
#get_instance_variables ⇒ Hash
#harvest ⇒ MintPress::OracleDatabase::Database
#recompile_invalid_objects ⇒ void
This method returns an undefined value.
Recompile all invalid objects in a database METHOD NOT YET IMPLEMENTED#run_admin_sql(sql) ⇒ Object
#running? ⇒ TrueClass | FalseClass
#sql_session(sid: nil) ⇒ MintPress::OracleUtils::SQLSession
#start ⇒ void
This method returns an undefined value.
Start the database. Ensure the database is running and in OPEN state#stop ⇒ void
This method returns an undefined value.
Shutdown/Stop the database. Ensure the database is shutdown.