[Django] #31153: Fix user creation on Oracle 12c

8 views
Skip to first unread message

Django

unread,
Jan 9, 2020, 10:06:52 AM1/9/20
to django-...@googlegroups.com
#31153: Fix user creation on Oracle 12c
-----------------------------------------+------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
Hi,

when running the tests on django 3.0 against a Oracle 12c database i get
the following errors:

> python manage.py test
> Creating test database for alias 'default'...
> Failed (ORA-01543: tablespace 'TEST_A_GUI' already exists)
> It appears the test database, test_A_GUI, already exists. Type 'yes' to
delete it, or 'no' to cancel: yes
> Destroying old test database for alias 'default'...
> Creating test user...
> Failed (ORA-65096: invalid common user or role name)
> Got an error creating the test user: ORA-65096: invalid common user or
role name

This seems to be the following problem:
https://stackoverflow.com/questions/57952435/django-tutorial-testcase-
failed-to-create-testuser-on-oracle-express-database
The solution can be found here:
https://stackoverflow.com/questions/33330968/error-ora-65096-invalid-
common-user-or-role-name-in-oracle
It is to execute the following sql before creating the user:
alter session set "_ORACLE_SCRIPT"=true;
I created a pull request for this issue:
https://github.com/django/django/pull/12301

BR,
Moritz

--
Ticket URL: <https://code.djangoproject.com/ticket/31153>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 9, 2020, 12:49:42 PM1/9/20
to django-...@googlegroups.com
#31153: Fix "common" user creation on Oracle 12c+.
-------------------------------------+-------------------------------------
Reporter: Moritz Schaffenroth | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* type: Uncategorized => Bug
* component: Uncategorized => Database layer (models, ORM)
* version: 3.0 => master
* resolution: => invalid


Comment:

You don't need to use this undocumented parameter when you create a local
users at the PDB level, what you should do. IMO we shouldn't support
creating test "common" users, see [http://www.dba-
oracle.com/t_ora_65096_create_user_12c_without_c_prefix.htm article] for
details.

--
Ticket URL: <https://code.djangoproject.com/ticket/31153#comment:1>

Reply all
Reply to author
Forward
0 new messages