Solved

create schema on oracle

Posted on 2010-11-29
8
396 Views
Last Modified: 2012-05-10
Hi,
I am confuse, I want to create a new schema = create a new user on the same database?

Thank you!
Francis SZE
0
Comment
Question by:fsze88
  • 3
  • 3
  • 2
8 Comments
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34235870
create user francis identified by francispassword;
0
 
LVL 15

Author Comment

by:fsze88
ID: 34235959
my question is create a new user is equal to create a new schema, is it?
Thank you!
Francis SZE
0
 
LVL 17

Assisted Solution

by:sweetfa2
sweetfa2 earned 150 total points
ID: 34236081
Yes, that is correct.  However your schema will be empty.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 350 total points
ID: 34236252
In oracle, both user and schema mean the same in the sense that when you create a user it means that you are setting up a schema in which database objects ( tables, view, etc ) reside and they are accessed by using the userid/password.

Technically speaking with respect to oracle, you can create an user with the above command. But if you want to setup the schema in one go by creating multiple objects,  you can optionally use a create schema command to do that.

http://ss64.com/ora/schema_c.html

But normally what is being done is, first an user is setup with the create user command and then required database objects are setup. So it is not mandatory that you need to use "create schema" command to setup your schema.

Thanks
0
 
LVL 15

Author Comment

by:fsze88
ID: 34236357
But if you want to setup the schema in one go by creating multiple objects

multiple objects means multi users in one schema?
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236372
no.. a schema means it is for one user only.

multiple objects means multi users in one schema? ---> this means that if you want to setup n tables, x views, y sequences etc...

In this context, user is not a database object here.
0
 
LVL 15

Author Comment

by:fsze88
ID: 34236432
so, create schema is not a must, just create a user on one database
right?
Thank you
Francis SZE
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236438
Yes, that is what i said that it is not mandatory. But create user is mandatory if at all you need to setup a schema with objects.

Thanks,
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question