views:

61

answers:

2

In mysql i can create a new database so easily just by writing a command.

Mysql>create database database_name;

In oracle 10g the default database name is XE. Can anybody tell command to create a new database other than XE ? I am using Linux(fedora-12).

A: 

Oracle is not my area of expertise, so I may be wrong, but if I remember rightly, Oracle doesn't consider the word database to mean quite the same thing as other RDBMS products such as SQL Server or MySQL.

With respect to Oracle Database the term database is used to refer to an instance of the actual database engine, not to a group of related objects (tables etc) as the aforementioned other products do.

I believe the relationship between objects is called a schema in Oracle terms. In other words one single instance of the database (engine) can provide for many schemas (groups of related objects).

For example, imagine you have an instance of MySQL running that has two MySQL databases called Orders and Accounting, Under Oracle these would be represented as the "Orders" schema and the "Accounting" schema, both of which would be managed by a single database instance called "XE"

As stated above, Oracle is not my forte, so it would be wise to confirm what I have stated with the Oracle documentation which is also better placed than I am to advise on the specifics of using schemas

Crippledsmurf
You are very closer to my opinion... To get more clarity i posted this question. So there is no creation of new database in the case of oracle other than default one XE(i am thinking like so).
Jagan
A: 

In order to provide a proper answer, need to know whether your database is residing on the same machine that you are working on or you are connecting to a different database server using your Linux machine as a client.

I’m providing the below answer assuming that you have “Sytem” privileges account to log into the db. (I have omitted the steps for connecting to the database since it will be differed according the location where your DB resides on)

Step 01
Login as the “System” user (The default password would be “manager”)

sqlplus system@xe

Step 02

SQL> create user <schema_name>  identified by <password>;

Step 03

SQL> GRANT CONNECT, RESOURCE to <schema_name>  ;

(This step will help to provide the operational level permission to the newly created user)

Step 04
Login to the database using new user

Step 05
Create the tables that you want

SLM
SLM