First login to the administrator account, or a user with DBA authority, followed by:
--Query All users
SELECT * from Dba_users;
--Create new users
Create user gpmgt identified by GPMGT;
--View all user tablespace
Select username,default_tablespace from Dba_users;
--Query all table space paths
Select * from Dba_data_files;
--Create a tablespace
Create tablespace gpmgt_data datafile ' D:\APP\ADMINISTRATOR\ORADATA\ORCL\GPMGT_DATA_1.DBF '
size 200m
Autoextend on
Next 32m maxsize 2048m
Extent management local;
--Create a temporary tablespace
--a tablespace is a logical division of a database, and a table space can belong to only one database. All database objects are stored in the specified table space. But the main storage is the table, so called table space. The Oracle temp table space is used primarily for querying and storing some buffer data. Temporary table space, which can be freed automatically, while table space stores table data, functions, procedures, sequences, and so on. is persisted with the database.
Create temporary tablespace gpmgt_temp tempfile ' D:\APP\ADMINISTRATOR\ORADATA\ORCL\GPMGT_TEMP.dbf ' size 50M Autoextend on next 10M maxsize 100M;
--allocating tablespace and temporal tablespace
Alter user GPMGT default tablespace gpmgt_data temporary tablespace gpmgt_temp;
--Assigning permissions to users
Grant create session,create table,create view,create sequence,unlimited tablespace to Gpmgt;
--Table Space renaming
Alter tablespace gpspace rename to Gpmgt_data;
Tablespace altered
Finally, the table data is imported.
Oracle Create USER, tablespace, temp tablespace, assign permissions steps