Opened 4 years ago

Closed 4 years ago

#29788 closed New feature (fixed)

Add support for Oracle Managed File (OMF) Tablespaces

Reported by: Vackar Afzal Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 2.1
Severity: Normal Keywords: oracle, OMF
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Vackar Afzal)

Oracle has 2 means of creating tablespaces:

  • Oracle managed files (OMF)
  • User managed files (UMF)

Currently Django only supports UMF, and not OMF.
To add support for OMF just need to omit the 'name' of the datafile - very simple changed.

Could add a flag to the 'OPTIONS' key in the database settings to specify which should be used:

    "default": {
      "ENGINE": "django.db.backends.oracle",
      "OPTIONS": {
        "threaded": True,
        "oracle_managed_files": True # <--------------- This is the new addition: default=False
      },
      "NAME": "my_sid",
      "USER": "my_user",
      "PASSWORD": "my_pass",
      "HOST": "localhost",
      "PORT": "1521"
    },

This is required if you are working with an Oracle instance that only supports OMF i.e.AmazonRDS

Change History (8)

comment:1 Changed 4 years ago by Vackar Afzal

Component: UncategorizedMigrations
Description: modified (diff)
Easy pickings: set
Keywords: oracle OMF added

comment:2 Changed 4 years ago by Vackar Afzal

Description: modified (diff)

comment:3 Changed 4 years ago by Jani Tiainen

Seems to be related to #29485.

Django does create datafiles only on testing.

Django in normal operation doesn't create datafiles nor tablespaces.

Last edited 4 years ago by Jani Tiainen (previous) (diff)

comment:4 Changed 4 years ago by Vackar Afzal

Yes should have been clearer, yes this relates to testing, and now that you have mentioned it, would make more sense to add the special Key to the 'TEST' key in the DB config. i.e.

    "default": {
      "ENGINE": "django.db.backends.oracle",
      "OPTIONS": {
        "threaded": True,
      },
      "TEST": {
          "oracle_managed_files": True # <--------------- This is the new addition: default=False
      }
      "NAME": "my_sid",
      "USER": "my_user",
      "PASSWORD": "my_pass",
      "HOST": "localhost",
      "PORT": "1521"
    },

comment:5 Changed 4 years ago by Tim Graham

Component: MigrationsDatabase layer (models, ORM)
Easy pickings: unset
Summary: Support for Oracle Managed File (OMF) TablespacesAdd support for Oracle Managed File (OMF) Tablespaces
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

comment:6 Changed 4 years ago by Mariusz Felisiak

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:7 Changed 4 years ago by Mariusz Felisiak

Has patch: set

comment:8 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In ff8020e:

Fixed #29788 -- Added support for Oracle Managed File (OMF) tablespaces.

Note: See TracTickets for help on using tickets.
Back to Top