Class: MintPress::OracleDatabase::Instance
- Inherits:
-
Object
- Object
- MintPress::OracleDatabase::Instance
- Includes:
- MintLogger, Mixins::Properties
- Defined in:
- src/oracle-database/lib/oracle-database/model/database/instance.rb
Overview
Properties (Read/Write)
-
#instance_name ⇒ String
"Name of the instance"
Property Attributes- required ⇒ true
- alias ⇒ :name
19
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 19 property :instance_name, required: true, type: String, alias: :name, description: "Name of the instance"
-
#instance_id ⇒ Integer
'Numeric ID of this instance'
Property Attributes- from ⇒ BigDecimal
20
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 20 property :instance_id, type: Integer, from: BigDecimal, description: 'Numeric ID of this instance'
-
#instance_number ⇒ Integer
"Instance number used for instance registration (corresponds to the INSTANCE_NUMBER initialization parameter)"
Property Attributes- from ⇒ BigDecimal
21
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 21 property :instance_number, type: Integer, from: BigDecimal, description: "Instance number used for instance registration (corresponds to the INSTANCE_NUMBER initialization parameter)"
-
#host_name ⇒ String
"Name of the host machine"
Property Attributes22
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 22 property :host_name, type: String, description: "Name of the host machine"
-
#version ⇒ String
"Database version"
Property Attributes23
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 23 property :version, type: String, description: "Database version"
-
#startup_time ⇒ Time
"Time when the instance was started"
Property Attributes- from ⇒ String
24
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 24 property :startup_time, type: Time, from: String, description: "Time when the instance was started"
-
#status ⇒ String
"Status of the instance: STARTED - After STARTUP NOMOUNT. MOUNTED - After STARTUP MOUNT or ALTER DATABASE CLOSE. OPEN - After STARTUP or ALTER DATABASE OPEN. OPEN MIGRATE - After ALTER DATABASE OPEN { UPGRADE | DOWNGRADE }"
Property Attributes25
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 25 property :status, type: String, description: "Status of the instance: STARTED - After STARTUP NOMOUNT. MOUNTED - After STARTUP MOUNT or ALTER DATABASE CLOSE. OPEN - After STARTUP or ALTER DATABASE OPEN. OPEN MIGRATE - After ALTER DATABASE OPEN { UPGRADE | DOWNGRADE }"
-
#parallel ⇒ [ TrueClass, FalseClass ] (Default Value: false)
"Indicates whether the instance is mounted in cluster database mode (YES) or not (NO)"
Property Attributes- default ⇒ false
- from ⇒ Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
26
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 26 property :parallel, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }, description: "Indicates whether the instance is mounted in cluster database mode (YES) or not (NO)"
-
#thread ⇒ Integer
"Redo thread opened by the instance"
Property Attributes- from ⇒ BigDecimal
27
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 27 property :thread, type: Integer, from: BigDecimal, description: "Redo thread opened by the instance"
-
#archiver ⇒ String
"Automatic archiving status: STOPPED. STARTED. FAILED - Archiver failed to archive a log last time but will try again within 5 minutes"
Property Attributes- allowed_values ⇒ %w{STOPPED STARTED FAILED},
28
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 28 property :archiver, type: String, allowed_values: %w{STOPPED STARTED FAILED}, description: "Automatic archiving status: STOPPED. STARTED. FAILED - Archiver failed to archive a log last time but will try again within 5 minutes"
-
#log_switch_wait ⇒ String
"Event that log switching is waiting for: ARCHIVE LOG. CLEAR LOG. CHECKPOINT. NULL - ALTER SYSTEM SWITCH LOGFILE is hung but there is room in the current online redo log"
Property Attributes- allowed_values ⇒ [ "ARCHIVE LOG", "CLEAR LOG", "CHECKPOINT", "NULL" ]
29
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 29 property :log_switch_wait, type: String, allowed_values: [ "ARCHIVE LOG", "CLEAR LOG", "CHECKPOINT", "NULL" ], description: "Event that log switching is waiting for: ARCHIVE LOG. CLEAR LOG. CHECKPOINT. NULL - ALTER SYSTEM SWITCH LOGFILE is hung but there is room in the current online redo log"
-
#logins ⇒ String
"Indicates whether the instance is in unrestricted mode, allowing logins by all users (ALLOWED, or in restricted mode, allowing logins by database administrators only (RESTRICTED)"
Property Attributes30
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 30 property :logins, type: String, description: "Indicates whether the instance is in unrestricted mode, allowing logins by all users (ALLOWED, or in restricted mode, allowing logins by database administrators only (RESTRICTED)"
-
#shutdown_pending ⇒ [ TrueClass, FalseClass ] (Default Value: false)
"Indicates whether a shutdown is pending (YES) or not (NO)"
Property Attributes- default ⇒ false
- from ⇒ Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
31
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 31 property :shutdown_pending, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }, description: "Indicates whether a shutdown is pending (YES) or not (NO)"
-
#database_status ⇒ String
"Status of the database: ACTIVE. SUSPENDED. INSTANCE RECOVERY"
Property Attributes- allowed_values ⇒ [ "ACTIVE", "SUSPENDED", "INSTANCE RECOVERY" ]
32
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 32 property :database_status, type: String, allowed_values: [ "ACTIVE", "SUSPENDED", "INSTANCE RECOVERY" ], description: "Status of the database: ACTIVE. SUSPENDED. INSTANCE RECOVERY"
-
#instance_role ⇒ String
"Indicates whether the instance is an active instance (PRIMARY_INSTANCE) or an inactive secondary instance (SECONDARY_INSTANCE), or UNKNOWN if the instance has been started but not mounted"
Property Attributes- allowed_values ⇒ %w{PRIMARY_INSTANCE SECONDARY_INSTANCE},
33
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 33 property :instance_role, type: String, allowed_values: %w{PRIMARY_INSTANCE SECONDARY_INSTANCE}, description: "Indicates whether the instance is an active instance (PRIMARY_INSTANCE) or an inactive secondary instance (SECONDARY_INSTANCE), or UNKNOWN if the instance has been started but not mounted"
-
#active_state ⇒ String
"Quiesce state of the instance: NORMAL - Database is in a normal state. QUIESCING - ALTER SYSTEM QUIESCE RESTRICTED has been issued: no new user transactions, queries, or PL/SQL statements are processed in this instance. User transactions, queries, or PL/SQL statements issued before the ALTER SYSTEM QUIESCE RESTRICTED statement are unaffected. DBA transactions, queries, or PL/SQL statements are also unaffected. QUIESCED - ALTER SYSTEM QUIESCE RESTRICTED has been issued: no user transactions, queries, or PL/SQL statements are processed. DBA transactions, queries, or PL/SQL statements are unaffected. User transactions, queries, or PL/ SQL statements issued after the ALTER SYSTEM QUIESCE RESTRICTED statement are not processed. A single ALTER SYSTEM QUIESCE RESTRICTED statement quiesces all instances in an Oracle RAC environment. After this statement has been issued, some instances may enter into a quiesced state before other instances; the system is quiesced when all instances enter the quiesced state."
Property Attributes- allowed_values ⇒ %w{NORMAL QUIESCING QUIESCED},
34
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 34 property :active_state, type: String, allowed_values: %w{NORMAL QUIESCING QUIESCED}, description: "Quiesce state of the instance: NORMAL - Database is in a normal state. QUIESCING - ALTER SYSTEM QUIESCE RESTRICTED has been issued: no new user transactions, queries, or PL/SQL statements are processed in this instance. User transactions, queries, or PL/SQL statements issued before the ALTER SYSTEM QUIESCE RESTRICTED statement are unaffected. DBA transactions, queries, or PL/SQL statements are also unaffected. QUIESCED - ALTER SYSTEM QUIESCE RESTRICTED has been issued: no user transactions, queries, or PL/SQL statements are processed. DBA transactions, queries, or PL/SQL statements are unaffected. User transactions, queries, or PL/ SQL statements issued after the ALTER SYSTEM QUIESCE RESTRICTED statement are not processed. A single ALTER SYSTEM QUIESCE RESTRICTED statement quiesces all instances in an Oracle RAC environment. After this statement has been issued, some instances may enter into a quiesced state before other instances; the system is quiesced when all instances enter the quiesced state."
-
#blocked ⇒ [ TrueClass, FalseClass ] (Default Value: false)
"Indicates whether all services are blocked (YES) or not (NO)"
Property Attributes- default ⇒ false
- from ⇒ Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
35
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 35 property :blocked, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }, description: "Indicates whether all services are blocked (YES) or not (NO)"
-
#con_id ⇒ Integer
Property Attributes- from ⇒ BigDecimal
36
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 36 property :con_id, type: Integer, from: BigDecimal
-
#instance_mode ⇒ String
Property Attributes37
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 37 property :instance_mode, type: String
-
#edition ⇒ String
Property Attributes38
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 38 property :edition, type: String
-
#family ⇒ String
Property Attributes39
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 39 property :family, type: String
-
#database_type ⇒ String
Property Attributes40
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 40 property :database_type, type: String
-
#parent ⇒ MintPress::OracleDatabase::Database
Property Attributes- prop_name ⇒ :instances
43
# File 'src/oracle-database/lib/oracle-database/model/database/instance.rb', line 43 property :parent, type: MintPress::OracleDatabase::Database, prop_name: :instances
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
-
#abort ⇒ Object
Shutdown Abort the database instance and ensure it is in SHUTDOWN state.
-
#initialize(opts = {}) ⇒ Instance
constructor
A new instance of Instance.
-
#mount ⇒ Object
Startup MOUNT the database instance and ensure it is in MOUNT state.
-
#nomount ⇒ Object
Startup NOMOUNT the database instance and ensure it is in NOMOUNT state.
-
#open ⇒ Object
Startup the database instance and ensure it is in OPEN state.
-
#running? ⇒ TrueClass | FalseClass
Is the database instance running and open?.
-
#shutdown(immediate: true) ⇒ Object
Shutdown immediate the database instance and ensure it is in SHUTDOWN state.
-
#start ⇒ Object
Startup the database instance and ensure it is in OPEN state.
-
#state? ⇒ String
What is the database instance state (OPEN | STARTED | MOUNTED | etc... ).
-
#stop ⇒ Object
Stop/Shutdown the database instance and ensure it is in SHUTDOWN state.
-
#to_hash ⇒ Hash
Return a Hash representation for the class and all its sub-classes.
-
#usage ⇒ String
Example usage of the class.
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