Create tablespace and user using SQLPLUS in Oracle XE 11g

Create TableSpace in Oracle XE 11g using SQLPLUS

To create a user first you need to create a tablespace to create a tablespace use the following query

create tablespace <tablespace_name> datafile '<path>' size 32m autoextend on next 32m maxsize 2048m extent management local;

<tablespace_name> : Your new tablespace name

<path> : Path to the dbf file (database file)

Example

create tablespace MYTABLESPACE datafile '/data/oracle/oradata/tpol/tools01.dbf' size 32m autoextend on next 32m maxsize 2048m extent management local;


Create User  in Oracle XE 11g using SQLPLUS

If you have no privilege for create .dbf (database) file then you can skip the above query and you can create the user using the system tablespace.

Create user

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

User created.

SQL>

Change Quota to the user

SQL> ALTER USER jijokjose QUOTA UNLIMITED ON SYSAUX;

User altered.

SQL>

Grant privilege to the user

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

Grant succeeded.

SQL>

or

SQL> GRANT DBA TO jijokjose;

Grant succeeded.

SQL>


Connect the user to the database using SQLPLUS

Open command prompt and type the following command and then enter your username and password

H:\>sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jul 23 10:31:52 2013

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

Enter user-name: jijokjose@xe
Enter password:

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

SQL>


 

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

8 Responses to “Create tablespace and user using SQLPLUS in Oracle XE 11g”

  1. Wonderful article! We are linking to this great post on our website.
    Keep up the good writing.

    Here is my webpage https://fburnketo.net/

  2. Hi everyone, it’s my first visit at this web page, and post is
    really fruitful for me, keep up posting these types of articles.

  3. a says:

    Thanks in favor of sharing such a good thinking, paragraph is good, thats why i have read it entirely

  4. Hurrah, that’s what I was seeking for, what a material!
    present here at this blog, thanks admin of this web site.

  5. Hello, the whole thing is going well here and ofcourse every one is sharing information, that’s actually fine, keep up writing.

  6. Helpful information. Lucky me I found your site by chance, and I’m shocked
    why this coincidence didn’t came about in advance!
    I bookmarked it.

  7. a says:

    Oh my goodness! Incredible article dude! Thank you so much, However I am going through
    problems with your RSS. I don’t know why I am unable to join it.
    Is there anybody having similar RSS issues? Anyone that knows
    the answer will you kindly respond? Thanx!!

  8. a says:

    I am regular reader, how are you everybody? This piece of writing posted at this site is in fact
    pleasant.

Leave a Reply