Changes between Version 31 and Version 32 of OracleTestSetup


Ignore:
Timestamp:
Feb 25, 2019, 5:35:54 AM (5 years ago)
Author:
Johannes Maron
Comment:

Add Docker image instructions

Legend:

Unmodified
Added
Removed
Modified
  • OracleTestSetup

    v31 v32  
    9393    Destroying test user...
    9494    Destroying test database tables...
     95
     96Using the Oracle Docker image
     97===============================================
     98
     99Oracle provides a `Docker image`_ for its Database via Docker Hub. Once you "purchased" (it's free of charge) the Docker image, you can start the server as followed::
     100
     101    docker run -d -it -p 1521:1521 store/oracle/database-enterprise:12.2.0.1
     102
     103Next you will need to create the django database user. This requires you to have ``sqlplus``. You simply follow the instructions above to install it.
     104
     105Connect to the database and execute the following SQL commands::
     106
     107    sqlplus sys/Oradoc_db1@localhost/ORCLCDB.localdomain as sysdba
     108    SQL> ALTER SESSION SET CONTAINER=ORCLPDB1;
     109    SQL> CREATE USER django IDENTIFIED BY django;
     110    SQL> GRANT DBA TO django;
     111    SQL> QUIT
     112
     113Next update your ``DATABASE`` setting as followed::
     114
     115    DATABASES = {
     116        'default': {
     117            'ENGINE': 'django.db.backends.oracle',
     118            'NAME': 'localhost/ORCLPDB1.localdomain',
     119            'USER': 'django',
     120            'PASSWORD': 'django',
     121            'TEST': {
     122                'USER': 'default_test',
     123                'TBLSPACE': 'default_test_tbls',
     124                'TBLSPACE_TMP': 'default_test_tbls_tmp',
     125            },
     126        },
     127        'other': {
     128            'ENGINE': 'django.db.backends.oracle',
     129            'NAME': 'localhost/ORCLPDB1.localdomain',
     130            'USER': 'django',
     131            'PASSWORD': 'django',
     132            'TEST': {
     133                'USER': 'other_test',
     134                'TBLSPACE': 'other_test_tbls',
     135                'TBLSPACE_TMP': 'other_test_tbls_tmp',
     136            },
     137        },
     138    }
     139
     140.. _`Docker image`: https://hub.docker.com/_/oracle-database-enterprise-edition
     141
    95142}}}
Back to Top