oracle11g to create a tablespace for a user

Source: Internet
Author: User

--Create a temporary table space
Create temporary tablespace sunbing_temp tempfile ' d: \oracle\data\ygz_temp.dbf' size 50m autoextend on
Next 50m maxsize 20480m extent management local;
--Create a data table space
Create tablespace ygz_data logging datafile ' d:\tablespace\ygz_data.dbf ' size 50m autoextend on next 50m maxsize 20480 m extent management local;
--Create a user and make a table space
Create user ygz identified by password default tablespace ygz_data
Temporary tablespace ygz_temp;
--Granting permissions to users
Grant CONNECT,RESOURCE,DBA to Ygz;

Grammar:

CREATE tablespace tablespace_name datafile filename size size [autoextend [on/off]] NEXT size

[MAXSIZE size] [PERMANENT | Temporary] [EXTENT MANAGEMENT [DICTIONARY | LOCAL [Autoallocate | UNIFORM. [SIZE integer[k| M]] []

Description

Tablespace: Specifies the name of the table space to create

DataFile: Specifies the file name of the data file to be stored in the table space, indicating the file's storage path

Size: Specify the data file sizes

Autoextend: Specifies how the data file is extended, on for auto-scaling, and off for non-automatic scaling. If you want to specify the data file as automatic extension, you should specify a specific size after next

MAXSIZE: Specifies the maximum value when the data file is automatically expanded

Permanent| Temporary: Specifies the type of tablespace, premanent refers to a permanent tablespace temporary refers to a temporary tablespace, which by default is a permanent table space

EXTENT MANAGEMENT DICTIONARY | Local: Specifies how the table space is managed, dictionary refers to the way the dictionary is managed, local is managed locally, and the default is local management


This article is from the "one dish can no longer dish of the Little rookie" blog, please be sure to keep this source http://liliming.blog.51cto.com/10925034/1794798

oracle11g to create a tablespace for a user

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.