Class: MintPress::OracleDatabase::Tablespace

Inherits:
Object
  • Object
show all
Includes:
MintLogger, Mixins::Properties, Utils
Defined in:
src/oracle-database/lib/oracle-database/model/database/tablespace.rb

Overview

An Oracle tablespace object that represents an Oracle tablespace of an Oracle Database Database This class provides a set of methods to manage an Oracle tablespaces in an Oracle Database. The attributes of this class closely resemble the DBA_TABLESPACES data dictionary view

Since:

  • 0.1.0

Properties (Read/Write)

  • #tablespace_name ⇒ String
    The name of the tablespace

    Property Attributes
    • requiredtrue
    • alias:name
    
    
    24
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 24
    
    property :tablespace_name, required: true, type: String, alias: :name
  • #block_size ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    26
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 26
    
    property :block_size, type: Integer, from: BigDecimal
  • #initial_extent ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    27
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 27
    
    property :initial_extent, type: Integer, from: BigDecimal
  • #next_extent ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    28
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 28
    
    property :next_extent, type: Integer, from: BigDecimal
  • #min_extents ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    29
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 29
    
    property :min_extents, type: Integer, from: BigDecimal
  • #max_extents ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    30
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 30
    
    property :max_extents, type: Integer, from: BigDecimal
  • #max_size ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    31
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 31
    
    property :max_size, type: Integer, from: BigDecimal
  • #pct_increase ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    32
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 32
    
    property :pct_increase, type: Integer, from: BigDecimal
  • #min_extlen ⇒ Integer

    Property Attributes
    • fromBigDecimal
    
    
    33
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 33
    
    property :min_extlen, type: Integer, from: BigDecimal
  • #status ⇒ String

    Property Attributes
    • allowed_values[ "ONLINE", "OFFLINE", "READ ONLY" ]
    
    
    34
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 34
    
    property :status, type: String, allowed_values: [ "ONLINE", "OFFLINE", "READ ONLY" ]
  • #contents ⇒ String

    Property Attributes
    • allowed_values%w{UNDO PERMANENT TEMPORARY}
    
    
    35
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 35
    
    property :contents, type: String, allowed_values: %w{UNDO PERMANENT TEMPORARY}
  • #logging ⇒ String

    Property Attributes
    • allowed_values%w{NOLOGGING LOGGING}
    
    
    36
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 36
    
    property :logging, type: String, allowed_values: %w{NOLOGGING LOGGING}
  • #force_logging ⇒ [ TrueClass, FalseClass ] (Default Value: false)

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'yes' ? true : false }
    
    
    37
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 37
    
    property :force_logging, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
  • #extent_management ⇒ String

    Property Attributes
    • allowed_values%w{LOCAL DICTIONARY}
    
    
    38
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 38
    
    property :extent_management, type: String, allowed_values: %w{LOCAL DICTIONARY}
  • #allocation_type ⇒ String

    Property Attributes
    • allowed_values%w{SYSTEM UNIFORM USER}
    
    
    39
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 39
    
    property :allocation_type, type: String, allowed_values: %w{SYSTEM UNIFORM USER}
  • #plugged_in ⇒ [ TrueClass, FalseClass ] (Default Value: false)

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'yes' ? true : false }
    
    
    40
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 40
    
    property :plugged_in, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
  • #segment_space_management ⇒ String

    Property Attributes
    • allowed_values%w{AUTO MANUAL}
    
    
    41
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 41
    
    property :segment_space_management, type: String, allowed_values: %w{AUTO MANUAL}
  • #def_tab_compression ⇒ String

    Property Attributes
    • allowed_values%w{ENABLED DISABLED}
    
    
    42
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 42
    
    property :def_tab_compression, type: String, allowed_values: %w{ENABLED DISABLED}
  • #retention ⇒ String

    Property Attributes
    • allowed_values[ "GUARANTEE", "NOGUARANTEE", "NOT APPLY" ]
    
    
    43
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 43
    
    property :retention, type: String, allowed_values: [ "GUARANTEE", "NOGUARANTEE", "NOT APPLY" ]
  • #bigfile ⇒ [ TrueClass, FalseClass ] (Default Value: false)

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'yes' ? true : false }
    
    
    44
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 44
    
    property :bigfile, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
  • #predicated_evaluation ⇒ String

    Property Attributes
    • allowed_values%w{HOST STORAGE}
    
    
    45
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 45
    
    property :predicated_evaluation, type: String, allowed_values: %w{HOST STORAGE}
  • #encrypted ⇒ [ TrueClass, FalseClass ] (Default Value: false)

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'yes' ? true : false }
    
    
    46
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 46
    
    property :encrypted, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
  • #compress_for ⇒ String

    Property Attributes
    • allowed_values[ "BASIC", "ADVANCED", "QUERY LOW", "QUERY HIGH", "ARCHIVE LOW", "ARCHIVE HIGH", "NULL" ]
    
    
    47
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 47
    
    property :compress_for, type: String, allowed_values: [ "BASIC", "ADVANCED", "QUERY LOW", "QUERY HIGH", "ARCHIVE LOW", "ARCHIVE HIGH", "NULL" ]
  • #def_inmemory ⇒ String

    Property Attributes
    • allowed_values%w{ENABLED DISABLED}
    
    
    48
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 48
    
    property :def_inmemory, type: String, allowed_values: %w{ENABLED DISABLED}
  • #def_inmemory_priority ⇒ String

    Property Attributes
    • allowed_values%w{LOW MEDIUM HIGH CRITICAL NONE NULL}
    
    
    49
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 49
    
    property :def_inmemory_priority, type: String, allowed_values: %w{LOW MEDIUM HIGH CRITICAL NONE NULL}
  • #def_inmemory_distribute ⇒ String

    Property Attributes
    • allowed_values[ "AUTO", "BY ROWID RANGE", "BY PARTITION", "BY SUBPARTITION" ]
    
    
    50
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 50
    
    property :def_inmemory_distribute, type: String, allowed_values: [ "AUTO", "BY ROWID RANGE", "BY PARTITION", "BY SUBPARTITION" ]
  • #def_inmemory_compression ⇒ String

    Property Attributes
    • allowed_values[ "NO MEMCOMPRESS", "FOR DML", "FOR QUERY", "FOR QUERY LOW", "FOR QUERY HIGH", "FOR CAPACITY", "FOR CAPACITY LOW", "FOR CAPACITY HIGH", "NULL" ]
    
    
    51
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 51
    
    property :def_inmemory_compression, type: String, allowed_values: [ "NO MEMCOMPRESS", "FOR DML", "FOR QUERY", "FOR QUERY LOW", "FOR QUERY HIGH", "FOR CAPACITY", "FOR CAPACITY LOW", "FOR CAPACITY HIGH", "NULL" ]
  • #def_inmemory_duplicate ⇒ String

    Property Attributes
    • allowed_values[ "NO DUPLICATE", "DUPLICATE", "DUPLICATE ALL" ]
    
    
    52
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 52
    
    property :def_inmemory_duplicate, type: String, allowed_values: [ "NO DUPLICATE", "DUPLICATE", "DUPLICATE ALL" ]
  • #shared ⇒ String

    Property Attributes
    • allowed_values[ "SHARED", "LOCAL_ON_LEAF", "LOCAL_ON_ALL" ]
    
    
    53
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 53
    
    property :shared, type: String, allowed_values: [ "SHARED", "LOCAL_ON_LEAF", "LOCAL_ON_ALL" ]
  • #def_index_compression ⇒ String

    Property Attributes
    • allowed_values%w{ENABLED DISABLED}
    
    
    54
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 54
    
    property :def_index_compression, type: String, allowed_values: %w{ENABLED DISABLED}
  • #index_compress_for ⇒ String

    Property Attributes
    • allowed_values[ "ADVANCED LOW", "ADVANCED HIGH", "NULL" ]
    
    
    55
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 55
    
    property :index_compress_for, type: String, allowed_values: [ "ADVANCED LOW", "ADVANCED HIGH", "NULL" ]
  • #def_cellmemory ⇒ String

    Property Attributes
    
    
    56
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 56
    
    property :def_cellmemory, type: String
  • #def_inmemory_service ⇒ String

    Property Attributes
    • allowed_values%w{DEFAULT NONE ALL USER_DEFINED}
    
    
    57
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 57
    
    property :def_inmemory_service, type: String, allowed_values: %w{DEFAULT NONE ALL USER_DEFINED}
  • #def_inmemory_service_name ⇒ String

    Property Attributes
    
    
    58
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 58
    
    property :def_inmemory_service_name, type: String
  • #lost_write_protect ⇒ String

    Property Attributes
    
    
    59
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 59
    
    property :lost_write_protect, type: String
  • #chunk_tablespace ⇒ [ TrueClass, FalseClass ] (Default Value: false)

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'y' ? true : false }
    
    
    60
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 60
    
    property :chunk_tablespace, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'y' ? true : false }
  • #temporary ⇒ [ TrueClass, FalseClass ] (Default Value: false)
    Used for tablespace creation only

    Property Attributes
    • defaultfalse
    • fromProc.new { |v| v.to_s.downcase == 'yes' ? true : false }
    
    
    63
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 63
    
    property :temporary, type: [ TrueClass, FalseClass ], default: false, from: Proc.new { |v| v.to_s.downcase == 'yes' ? true : false }
  • #parent ⇒ MintPress::OracleDatabase::Database

    Property Attributes
    • prop_name:tablespaces
    
    
    65
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 65
    
    property :parent, type: MintPress::OracleDatabase::Database, prop_name: :tablespaces
  • #database ⇒ MintPress::OracleDatabase::Database (Default Value: Proc.new { r = nil if self.get_property(:parent, disable_proc: true).is_a?(MintPress::OracleDatabase::Database) r = self.get_property(:parent, disable_proc: true) end r })

    Property Attributes
    • defaultProc.new { r = nil if self.get_property(:parent, disable_proc: true).is_a?(MintPress::OracleDatabase::Database) r = self.get_property(:parent, disable_proc: true) end r }
    
    
    66
    67
    68
    69
    70
    71
    72
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 66
    
    property :database, type: MintPress::OracleDatabase::Database, default: Proc.new { 
      r = nil
      if self.get_property(:parent, disable_proc: true).is_a?(MintPress::OracleDatabase::Database)
        r = self.get_property(:parent, disable_proc: true)
      end
      r
    }
  • #datafiles ⇒ Hash of ⇒ MintPress::OracleDatabase::Datafile (Default Value: {})

    Property Attributes
    • default{}
    • canonicaltrue
    
    
    74
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 74
    
    property :datafiles, type: MintPress::OracleDatabase::Datafile, default: {}, hash: true, canonical: true
  • #db_username (Default Value: 'sys')
    Username with sys privilege. Defaults to 'sys'

    Property Attributes
    • default'sys'
    • alias:dba_username
    
    
    77
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 77
    
    property :db_username, default: 'sys', alias: :dba_username
  • #db_password ⇒ Mint::Secret
    Password for the above user

    Property Attributes
    • fromString
    • alias:dba_password
    
    
    80
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 80
    
    property :db_password, type: Mint::Secret, from: String, alias: :dba_password
  • #db_role ⇒ String
    Role for the above user

    Property Attributes
    
    
    83
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 83
    
    property :db_role, type: String
  • #db_connect_descriptor ⇒ String
    'Database connect descriptor that will override with advanced DB connect string such as failover and other advanced settings'

    Property Attributes
    
    
    85
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 85
    
    property :db_connect_descriptor, type: String, description: 'Database connect descriptor that will override with advanced DB connect string such as failover and other advanced settings'
  • #host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { MintPress::Infrastructure::LocalHost.new })
    Host used to acquire the OCI8 gem

    Property Attributes
    • requiredtrue
    • defaultProc.new { MintPress::Infrastructure::LocalHost.new }
    
    
    88
    89
    90
    # File 'src/oracle-database/lib/oracle-database/model/database/tablespace.rb', line 88
    
    property :host, type: MintPress::Infrastructure::Host, required: true, default: Proc.new {
      MintPress::Infrastructure::LocalHost.new
    }

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

Methods included from Utils

#session, #sql_ruby_session, #to_hash

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 = {}) ⇒ Tablespace

Returns a new instance of Tablespace.

Since:

  • 0.1.0

Instance Method Details

#add_datafile(opts = {}) ⇒ void

This method returns an undefined value.

Add a datafile to a tablespace in an Oracle database

Since:

  • 0.1.0

#createvoid

This method returns an undefined value.

Create a tablespace

Since:

  • 0.1.0

#dropvoid

This method returns an undefined value.

Drop a tablespace

Since:

  • 0.1.0

#exist?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#exists?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#extendvoid

This method returns an undefined value.

Extend the size of a tablespace in an Oracle database

Since:

  • 0.1.0

#freespaceBigDecimal

Determine the amount of available freespace of a tablespace in an Oracle database

Returns:

  • (BigDecimal)

Since:

  • 0.1.0

#harvestMintPress::OracleDatabase::Tablespace

Harvest the configuration of a tablespace in an Oracle database

Returns:

Since:

  • 0.1.0

#usageString

Example usage of the class

Returns:

Since:

  • 0.1.0