Steps
- Connect to database server (such as calchas or ennomus)
- 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 in a SYSDBA role:
$ 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 Jul 3, 2024
5 revisions
Viewed 5119 times
Supersedes KB-00012
Revision History
snw on Jul 3, 2024
snw on Jul 3, 2024
snw on Jun 30, 2024
snw on Jun 30, 2024
snw on Jun 30, 2024
BBcode for Embedding
|