How to create a new schema/new user in Oracle Database 11g?

前端 未结 5 830
终归单人心
终归单人心 2021-01-29 17:03

I have applied for an internship in a company and as a question they have asked me to create a schema for their company with certain requirements and mail them the DDL

5条回答
  •  余生分开走
    2021-01-29 17:59

    Let's get you started. Do you have any knowledge in Oracle?

    First you need to understand what a SCHEMA is. A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL.

    1. CREATE USER acoder; -- whenever you create a new user in Oracle, a schema with the same name as the username is created where all his objects are stored.
    2. GRANT CREATE SESSION TO acoder; -- Failure to do this you cannot do anything.

    To access another user's schema, you need to be granted privileges on specific object on that schema or optionally have SYSDBA role assigned.

    That should get you started.

提交回复
热议问题