﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31153	"Fix ""common"" user creation on Oracle 12c+."	Moritz Schaffenroth	nobody	"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"	Bug	closed	Database layer (models, ORM)	dev	Normal	invalid			Unreviewed	1	0	0	0	1	0
