?
Solved

How to create schema?

Posted on 2012-09-05
2
Medium Priority
?
693 Views
Last Modified: 2012-09-19
How do I create schema on Oracle database? How do I define tablespace, index space after I create schema? I am assuming all users would have to access to database objects on this schema as long as it is granted to them. Besides tablespace, index space, anything else that I need to define while I create this schema. Please asvise.
0
Comment
Question by:IT_ETL
2 Comments
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 38369302
>>How do I create schema on Oracle database?

A 'schema' is basically a user that owns database objects.

create user someusername identified by somepassword default tablespace sometablespace temporary tablespace temp;



>>How do I define tablespace, index space after I create schema?

Are you asking how to create it or assign it to the user?

>>I am assuming all users would have to access to database objects on this schema as long as it is granted to them.

They will have what you grant to them.

>>Besides tablespace, index space, anything else that I need to define while I create this schema. Please asvise.

We don't know the requirements you have.
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 1000 total points
ID: 38370053
Oracle does not make a distinction between a schema and a user.

Oracle does support a CREATE SCHEMA statement:

http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_6014.htm#i2154127

However, it is basically a wrapper for create statements.  Read the note at the top of the link and it explains what Oracles means by user and schema.

Tablespaces are not part of a schema.  Default tablespaces can be assigned to users, but that is part of the user definition, not the "schema".  Many users can use the same tablespace.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

839 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