Changes between Version 10 and Version 11 of OracleTestSetup


Ignore:
Timestamp:
Nov 15, 2010, 10:47:20 PM (14 years ago)
Author:
Ramiro Morales
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OracleTestSetup

    v10 v11  
    243243    Destroying test database tables...
    244244
     245Understanding
     246=============
     247
     248An Oracle instance allows the existence of only one database. This is somewhat different from what we could be accustomed from working with other RDBMS. For more details see the Oracle documentation.
     249
     250When the Django ORM testing code needs to test multi-DB functionality added in version 1.2 it uses the services of the Django Oracle backend and it implements the by creating tablespaces. The overall  of things is like this:
     251
     252* The ``NAME`` variable values specifies the name of the DB ('xe' in the case of Oracle XE). This can be further controlled by using the ``tnsnames`` infrastructure.
     253* Both a data tablespace and a temporary data tablespace are created.
     254* The names of such tablespaces are derived from the value f the ``NAME`` var (or from the ``TEST_NAME`` var that overrides ``NAME`` for these purposes).
     255* But their names can also be overridden by the ``TEST_TBLSPACE`` and ``TEST_TBLSPACE_TMP`` vars, respectively.
     256* For these tablespaces, an user is created beforehand, that has full ownership and control over them.
     257* The username of such user isn't the same as the ``USER`` var, is based on it with a prefix added. Can be overridden with the value of the ``TEST_USER`` var.
     258* The password assigned to that user is hardcoded, but can be overridden by the value of the ``TEST_PASSWD`` var.
     259* The tablespaces and the user are removed afterwards.
     260* Some variables are provided to control parts of this process:
     261  * ``TEST_CREATE``
     262  * ``TEST_USER_CREATE``
     263
     264In summary, Oracle has the following extra vars when compard with other Django DB backends: ``TEST_TBLSPACE``, ``TEST_TBLSPACE_TMP``, ``TEST_USER``, ``TEST_PASSWD``, `TEST_CREATE`` and ``TEST_USER_CREATE``
     265
    245266Notes
    246267=====
     
    249270(host system is a workstation running Debian unstable *Sid*). The VM got:
    250271
    251 * one CPU (Oralce XE won't use any additional CPU).
     272* One CPU (Oracle XE won't use any additional CPU).
    252273* 512 MiB of RAM (initially it was 1GiB but the Django test suite execution doesn't push memory usage above that at all).
    253274* 30 GiB hard disk.
     
    259280
    260281* How much does the Oracle installation pollutes the system?. If it result to be confined and easy to undo/cleanup, maybe this setup doesn't need to be done inside a VM.
    261 
    262 To do
    263 =====
    264 
    265 * Add basic note about Oracle database structure (databases, tablespaces, ...) and how the Django Oracle backend uses it to implement multiple DB support.
    266 * Add description about Oracle backend specific ``DATABASES['alias_name']['TEST_*']`` config vars.
    267282}}}
Back to Top