The Internet, as it was meant to be

Article KB-00012 - Create Oracle Database

Applies to: Databases - Oracle

Created by Serena (she/her) on Jun 26, 2024

This article is out of date! Please see KB-00041 - Creating an Oracle Database
-   Connect to database server (i.e. calchas.coherent-logic.com)
-   Log in as SYSDBA:

    $ sqlplus sys/<your_admin_pws>@localhost as sysdba

-   Create the database/admin user:

    SQL> CREATE PLUGGABLE DATABASE MYDATABASE ADMIN USER MYUSER IDENTIFIED BY MYPASSWORD;
    SQL> ALTER PLUGGABLE DATABASE MYDATABASE OPEN;

-   Log out of SQL*Plus
-   Log into the new database as a SYSDBA:

    $ sqlplus sys/<your_admin_pws>@localhost/MYDATABASE as sysdba

-   Create a tablespace:

    SQL> CREATE TABLESPACE TABLESPACENAME DATAFILE 'tablespace_datafile.dat' SIZE 10M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 200M;

-   Grant MYUSER unlimited space in the new tablespace:

    SQL> ALTER USER MYUSER QUOTA UNLIMITED ON TABLESPACENAME;

-   Grant MYUSER unlimited space in the SYSTEM tablespace:

    SQL> ALTER USER MYUSER QUOTA UNLIMITED ON SYSTEM;

-   Make TABLESPACENAME the default tablespace for MYUSER:

    SQL> ALTER USER MYUSER DEFAULT TABLESPACE TABLESPACENAME;

-   Grant MYUSER other permissions:

    SQL> GRANT CREATE SESSION TO MYUSER;
    SQL> GRANT CONNECT TO MYUSER;
    SQL> GRANT RESOURCE TO MYUSER;

Note that RESOURCE is actually a role (not a permission) and will give
MYUSER the ability to create tables, views, indexes, procedures, etc.
Article Info

Last modified Jun 26, 2024
2 revisions
Viewed 3260 times
Superseded by KB-00041

Revision History

snw on Jun 26, 2024
snw on Jun 26, 2024


BBcode for Embedding


Copyright © 2017, 2024 ChivaNet Internet Services
A division of Coherent Logic Development LLC
Las Cruces, NM 88001

Our backhaul is provided by GTT Communications.

Usage of our services is governed by our Terms of Service.


Visitor Counter
There are 72 users registered on ChivaNet.