How to create schema?

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.
IT_ETLAsked:
Who is Participating?
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
>>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
 
johnsoneConnect With a Mentor Senior Oracle DBACommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.