469,290 Members | 1,759 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Creating a new Database and New Schema

My Team Lead recently asked me to create a local schema but I this is my first time using Oracle Database so Im really really lost..

How do create a schema? Do I need to create a database first before creating a schema?

Many thanks..
Nov 3 '08 #1
17 22368
amitpatel66
2,367 Expert 2GB
You need to ask that question to your team lead. Check with him whether you want to create a schema in the existing database or in a new database?
Nov 3 '08 #2
tnx amitpatel66,

I asked her, she said create a schema for a new database.. A follow-up question how can I create a new database in Oracle?

Many thanks..
Nov 3 '08 #3
debasisdas
8,127 Expert 4TB
createing a database and a schema are two different things . Which one you want.
Nov 3 '08 #4
tnx debasisdas,

Creating a database first, pls teach me..

Many thanks..
Nov 3 '08 #5
debasisdas
8,127 Expert 4TB
you can use DBCA for the purpose.
Nov 3 '08 #6
Pilgrim333
127 100+
Hi,

Hope this helps you

Create database and manage users

Pilgrim
Nov 3 '08 #7
I have created a new database in Oracle 9i using DBCA, how do I create a schema for it?

Many thanks..
Nov 4 '08 #8
if you have existing dump files then import them into new database, or other wise create users and tables as per your requirement, don't forgot to observe the tablespace sizes...
Nov 4 '08 #9
if you have existing dump files then import them into new database, or other wise create users and tables as per your requirement, don't forgot to observe the tablespace sizes...
tnx daitaravi2002,

how do I create users and table?

Many thanks..
Nov 4 '08 #10
Pilgrim333
127 100+
Hi,

I posted a link in your previous topic with a link to how to create users in oracle. I'll post you a link to how to it here.

Create users in Oracle

I think your problem is with the schema part. The objects a user owns are collectively called a schema. So create a user, and then you have your schema.

Pilgrim.
Nov 4 '08 #11
Hi,

I posted a link in your previous topic with a link to how to create users in oracle. I'll post you a link to how to it here.

Create users in Oracle

I think your problem is with the schema part. The objects a user owns are collectively called a schema. So create a user, and then you have your schema.

Pilgrim.
tnx Pilgrim333,

Now Im getting it, follow-up question: Suppose I create a User with this code:

CREATE USER "TEST" PROFILE "DEFAULT" IDENTIFIED BY "test" ACCOUNT UNLOCK;

but now I want to use/access it using toad, what is the database for that user?
Nov 4 '08 #12
Pilgrim333
127 100+
Hi,

the database is the same database as the database you created it in.
If you connected with dba/dba@TEST and you create a user scott with password tiger then you should connect with scott/tiger@TEST.

The database connect string stays the same, just your user and pass change. You give the user space in your database.

Hope this is explained a bit understandable. If not, just let me know.

Pilgrim.
Nov 4 '08 #13
tnx Pilgrim333,

I got what you said last time, so I created the user using this code:

CREATE USER "TEST" PROFILE "DEFAULT" IDENTIFIED BY "test" ACCOUNT UNLOCK;

and when I tried to use/access it using toad, a prompt appeared saying that:

ORA-01045: user TEST lacks CREATE SESSION privilege

how can I remedy this?

Many thanks..
Nov 4 '08 #14
Pilgrim333
127 100+
Hi,

you have to assign some standard priviliges to the user. Login as dba and issue the following command:

grant create session, connect, resource to <user>

You will need more info on the grants for the user. More info on:

Oracle Grants security

Pilgrim.
Nov 4 '08 #15
Hi,

you have to assign some standard priviliges to the user. Login as dba and issue the following command:

grant create session, connect, resource to <user>

You will need more info on the grants for the user. More info on:

Oracle Grants security

Pilgrim.

tnx a lot Pilgrim, you've been very helpful..
Nov 4 '08 #16
Pilgrim333
127 100+
No problem.

Thanx for letting us know that your problem is solved.

Pilgrim.
Nov 4 '08 #17
amitpatel66
2,367 Expert 2GB
Duplicate Threads merged for better management of forum

Moderator
Nov 4 '08 #18

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Dimitris Katsikas | last post: by
2 posts views Thread by Steven (dotnet newbie) | last post: by
2 posts views Thread by jack | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.