user5381300
user5381300

Reputation:

How to create Database in Oracle SQL Developer

My Background is MySQL/PhpMyAdmin and there I can create easily new database by entering the name in Phpmyadmin, But I'm facing problem to creating database in Oracle SQL Developer... I already connected HR_ORACLE default database and test the connection. But I don't know how to create new database?

Upvotes: 1

Views: 5501

Answers (1)

user330315
user330315

Reputation:

You usually only have one database (=instance) in Oracle. A database in Oracle is something completely different than a database in MySQL. Actually MySQL calls databases "schemas" and that's what they are best mapped to in Oracle.

To create a new schema in Oracle, you create a new user. Those two things are more or less the same (there are some subtle differences, but as you are a beginner just assume that it's the same for now).

To create a new user, you need to connect as a privileged user (typically SYSTEM or SYS) and run the CREATE USER command.

I don't use SQL Developer but I think it has some DBA tools built-in that can probably help you with that. Just seach for "user management" or something similar. You do not want to create a new database if you have Oracle up and running.

Further reading:

Edit (as you seem to be confused about the new user):

Each user can (by default) only access the tables that were created under that user (the ones that user owns). So if you create a second user NEWBIE and log in with that user, you won't be able to access the tables of the user (schema) HR_ORACLE. If you create a new table as NEWBIE that table is created in the schema NEWBIE and is owned by the user NEWBIE. The user HR_ORACLE can not access the tables owned by NEWBIE (unless given the necessary grants)

Upvotes: 3

Related Questions