Oracle Create USER, tablespace, temp tablespace, assign permissions steps

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.