Oracle DataPump 3 – Create and grant privileges to user

Login as DBA

To create directory object, first you need to login as DBA (DataBase Adminstrator). Open command prompt (CMD) in windows and type the following

H:\>sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 5 13:30:54 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: CONN / AS SYSDBA
Enter password:

Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 – Production

SQL>


Create user to default table space

SQL> CREATE USER scott IDENTIFIED BY tiger DEFAULT TABLESPACE SYSAUX TEMPORARY TABLESPACE "TEMP";

User created.

SQL>


Grant privileges to the user

SQL> GRANT connect, create procedure, create session, create table, create type, create view, create synonym,create sequence, create trigger, resource TO scott;

Grant succeeded.

SQL>


Grant directory privileges to the user

READ or WRITE permission to a directory object means only that the Oracle database will read or write that file on your behalf. You are not given direct access to those files outside of the Oracle database unless you have the appropriate operating system privileges. Similarly, the Oracle database requires permission from the operating system to read and write files in the directories

SQL> GRANT READ, WRITE ON DIRECTORY TEST_DIR TO scott;

Grant succeeded.

SQL>


 

You can leave a response, or trackback from your own site.

Leave a Reply