View Issue Details

IDProjectCategoryView StatusLast Update
0016351mantisbtdb oraclepublic2015-03-16 19:18
ReporterCarstenGrohmannAssigned Todregad 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0016351: DB creation failed with ORA-01031

I've tested the current version of Oracle branch (2013-08-30 - 07264bd8398c36f2866a736076ce54faadc1e309) today. Our DBA created the schema and provided a admin user and an application user.

The database creation failed because with ORA-01031. The root cause is the statement "CREATE USER <database name> IDENTIFIED by xxx".

Please add an check to create the schema/database only, if it doesn't exists.

BTW: The option "Print SQL Queries instead of Writing to the Database" print all necessary database objects, but the output doesn't contains the "CREATE USER" statement. Thereby we need some time to identify the missing database permissions.

TagsNo tags attached.


child of 0013227 closeddregad Oracle DB support multiple issues 




2013-09-02 18:22

developer   ~0037978

Hello Carsten,

I did not have time to actually test if it actually works as designed, but the installer does check for DB existence, prior to attempting its creation [1].

Could you provide more information as to exactly how you entered the setup param (hostname, db name), how your user accounts are setup, and more detailed info on the ORA-01031 you got, specifically on which line it occured. Then I can try to reproduce the problem.




2013-09-04 09:27

reporter   ~0037988

Hello Damien,

We use: Oracle Database 11g Enterprise Edition Release - 64bit Production

Steps to reproduce:
1) Create a new schema:
==== start schema creation ====
create bigfile tablespace MANTIS_DATA;
create bigfile tablespace MANTIS_INDX;

create user MANTIS_ADMIN identified by xxx
default tablespace MANTIS_DATA;

grant connect, resource to MANTIS_ADMIN;
revoke unlimited tablespace from MANTIS_ADMIN;

alter user MANTIS_ADMIN quota unlimited on MANTIS_DATA;
alter user MANTIS_ADMIN quota unlimited on MANTIS_INDX;

create user MANTIS_APP identified by xxx;
grant create session to mantis_app;
==== end schema creation ====

2) add the TNS description to your tnsnames.ora
==== start TNS description ====
cg.mydbsrv =
(PROTOCOL = TCP)(HOST = mydbsrv-vip)(PORT = 1521)
==== end TNS description ====

3) start the web service and open http://mymantis/admin/install.php

4) Fill the form:
Type of Database -> Oracle
Hostname (for Database Server) -> cg.mydbsrv (TNS description)
Username (for Database) -> MANTIS_APP
Password (for Database) -> <PW MANTIS_AP>
Database name (for Database) -> MANTIS_ADMIN
Admin Username (to create Database if required) -> MANTIS_ADMIN
Admin Password (to create Database if required) -> <PW MANTIS_ADMIN>
Print SQL Queries instead of Writing to the Database -> no selected

5) Press "Install/Upgrade database"
Create database if it does not exist: BAD - Does administrative user have access to create the database? ( ORA-01031: insufficient privileges )

Attempting to connect to database as user: POSSIBLE PROBLEM - Database user doesn't have access to the database ( ORA-12545: Connect failed because target host or object does not exist )




2013-09-04 09:51

reporter   ~0037989

Hello Damien,

I've discussed this topic with our DBA shortly. In our setup the admin user don't have the permissions to create users nor grant permissions. Thereby the automatic setup is failing in such case. Normally you'll get ORA-01920 if the user wants to create an existing user twice. Now I got ORA-01031 due lack of permissions.

From my perspective are there three different approaches to "solve" this bug:
1) Skip creating users and granting permissions if admin user == database name
2) Ignore ORA-01031 and ORA-01920 and try to create the database objects
3) Print a warning message and extend the documentation to create the database objects outside the install script.


Issue History

Date Modified Username Field Change
2013-09-02 18:16 dregad New Issue
2013-09-02 18:16 dregad Reporter dregad => CarstenGrohmann
2013-09-02 18:22 dregad Note Added: 0037978
2013-09-02 18:22 dregad Assigned To => dregad
2013-09-02 18:22 dregad Status new => feedback
2013-09-02 18:22 dregad Relationship added related to 0013227
2013-09-04 09:27 CarstenGrohmann Note Added: 0037988
2013-09-04 09:27 CarstenGrohmann Status feedback => assigned
2013-09-04 09:51 CarstenGrohmann Note Added: 0037989
2013-10-17 12:52 dregad Target Version => 1.3.0-beta.1
2013-10-17 12:52 dregad Status assigned => resolved
2013-10-17 12:52 dregad Fixed in Version => 1.3.0-beta.1
2013-10-17 12:52 dregad Resolution open => fixed
2014-04-12 19:39 grangeway Issue cloned: 0017193
2014-12-08 00:34 vboctor Status resolved => closed
2015-03-16 19:18 dregad Relationship replaced child of 0013227