How to create a small and simple database using Oracle 11 g and SQL Developer

0 votes

How can I build a tiny, straightforward database with Oracle 11g and SQL Developer? I'm seeing entirely too many problems, and I can't figure out how to create a straightforward database. For instance:

create database company; 

Caused the following error:

Error starting at line 1 in command:
create database company
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.
Aug 20, 2022 in Database by Kithuzzz
• 38,000 points
1,055 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

First off, most other database products do not refer to a database in the same way that Oracle does. A "schema" in Oracle refers to the collection of objects owned by a specific user, although a "database" in MySQL or SQL Server is much more similar to that. In Oracle, a server would typically only have one database on it (but a big server might have several databases on it), and each database would have a variety of schemas. You may only have one database on each server if you are using Oracle's express edition. The Oracle database has already been built if you are able to connect to Oracle with SQL Developer.

Using Oracle terminology, assuming you actually want to establish a schema rather than a database, you would create the user.

CREATE USER company
  IDENTIFIED BY <<password>>
  DEFAULT TABLESPACE <<tablespace to use for objects by default>>
  TEMPORARY TABLESPACE <<temporary tablespace to use>>

You would then assign the user whatever privileges you wanted:

GRANT CREATE SESSION TO company;
GRANT CREATE TABLE TO company;
GRANT CREATE VIEW TO company;
...

Once that is done, you can connect to the (existing) database as COMPANY and create objects in the COMPANY schema.

answered Aug 21, 2022 by narikkadan
• 63,600 points

edited Mar 5

Related Questions In Database

0 votes
1 answer

How to rename a column in a database table using SQL?

For SQL Server, use sp_rename USE AdventureWorks; GO EXEC sp_rename 'Customers.CustomerTerritory.TerritoryID', ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
893 views
0 votes
0 answers

Creating a new database and new connection in Oracle SQL Developer

I've introduced SQL Developer to my framework. ...READ MORE

Aug 12, 2022 in Database by Kithuzzz
• 38,000 points
799 views
0 votes
1 answer

How can I confirm a database is Oracle & what version it is using SQL?

Run this SQL: select * from v$version; Output: BANNER ---------------------------------------------------------------- Oracle Database ...READ MORE

answered Sep 12, 2022 in Database by narikkadan
• 63,600 points
977 views
0 votes
2 answers
0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23, 2020 in Database by anand
• 140 points
27,058 views
0 votes
0 answers

how to create a SQL table?

Feb 1, 2022 in Database by Neha
• 9,020 points
554 views
0 votes
1 answer
0 votes
1 answer

ORA-01017 Invalid Username/Password when connecting to 11g database from 9i client

The user and password are DEFINITELY incorrect ...READ MORE

answered Feb 22, 2022 in Others by Aditya
• 7,680 points
1,734 views
0 votes
0 answers

How to handle very large data with Tableau?

For data analysis, I'm using Tableau 9.0. ...READ MORE

Apr 25, 2022 in Tableau by Neha
• 9,020 points
1,251 views
0 votes
0 answers

Scott account locked in SQL Plus

Scott is my username and tiger is ...READ MORE

Aug 9, 2022 in Database by Kithuzzz
• 38,000 points
775 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP