Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've just installed Oracle 11g and linked it to SQL Developer.

I want to create a database for my django install.

CREATE database 'django';

Error starting at line 1 in command:
create database 'django'
Error at Command Line:1 Column:0
Error report:
SQL Error: ORA-01501: CREATE DATABASE failed
ORA-01100: database already mounted
01501. 00000 -  "CREATE DATABASE failed"
*Cause:    An error occurred during create database
*Action:   See accompanying errors.

(I have also tried without the '')

Why isn't this working?

Is there another way I'm meant to create databases?

share|improve this question
add comment

3 Answers

One of the key differences between these platforms is that a database in MySQL is a schema in Oracle. Since a schema in Oracle is also a user, the command you are looking for is CREATE USER. I highly recommend that you read the Oracle Concepts Guide before continuing. You may also find this documentation on MySQL>>Oracle migrations using SQL Developer useful. Here is the part relevant to your situation:

When migrating MySQL databases to Oracle, SQL Developer maps each MySQL database to a tablespace in Oracle. Database objects, such as tables, indexes and views are stored in the respective tablespaces and are referenced from the Oracle schema for the user that owns them.

From the error message perspective, the salient part to pull out is "ORA-01100: database already mounted". This indicates that a database has already been created and mounted. It may also be open. Here is an example reproducing your issue, opening the database (which may not be necessary if it is already open) and creating a django user.

SQL> create database django;
create database django
*
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-01100: database already mounted


SQL> SELECT status FROM v$instance;

STATUS
------------
MOUNTED

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> SELECT status FROM v$instance;

STATUS
------------
OPEN

SQL> create database django;
create database django
*
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-01100: database already mounted


SQL> CREATE USER django IDENTIFIED BY "No More ORA-001100.";

User created.

You should also assign permissions and create a django tablespace setting it as the default tablespace for django.

share|improve this answer
    
Unfortunately this didn't work. Output: pastebin.com/B1umZZYZ Please tell me how to make it work. –  A T Sep 21 '11 at 16:48
1  
I think my answer makes it clear that you should not be creating a new database and should instead be creating a new user. Your output doesn't match my suggestion; please re-read the answer. –  Leigh Riffel Sep 21 '11 at 17:40
add comment

It is not so easy to create the database on the command line. Look here for the description: http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/create003.htm#CIAEJDBE

For beginners, it is much easier to create the Database with the DBCA (Database Configuration Assistant).

share|improve this answer
    
Thanks, but I can't find DBCA on Oracle 11g Express (Windows). Any ideas where I can download it? –  A T Sep 21 '11 at 14:15
    
You should always mention your Database edition & version. I have rarely encountered an Express Edition, but I think there is no DBCA available. Your Database gets created during the Software Installation already there. –  Uwe Hesse Sep 21 '11 at 15:24
2  
Hi @Uwe we would encourage you to not include such a signature in your questions, but instead we encourage you to use your site profile to place a link to your website. The fact that every post here is signed with your "usercard" (lower right hand corner of every post) should be sufficient for people to know who you are when you answer. This is not a policy of myself or a few people here on this site, but is actually fairly rigorously enforced on the entire StackExchange network. Thanks! –  jcolebrand Sep 21 '11 at 15:26
    
If you say so. May I attach 'Kind regards' to my answers or is that also against 'our' policy? –  Uwe Hesse Sep 21 '11 at 15:39
1  
Thanks @LeighRiffel .. We understand that you consider it a measure of politeness Uwe but it's just clutter in the long run. Maybe that makes us too coldhearted, but we're about questions and answers on the stacks, and so ... yeah. However, you're more than welcome to pop into chat and extend your heartfelt thanks often ;) –  jcolebrand Sep 21 '11 at 18:04
show 1 more comment

As of my personal expereince, i think you should have instanlled Oracle Express Edition and not the Oracle Entrpise Edition. In the case of Oracle Express Edition we cannot create new database since we have default database XE is already in place.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.