--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