To establish the tablespace and the user's steps:
User
Create: Create user username identified by "password";
Authorization: Grant create session to user name;
Grant CREATE table to user name;
Grant create tablespace to user name;
Grant CREATE view to user name;
Table Space
Create a tablespace (typically a table space with n stored data and an index space):
Create tablespace table space name
DataFile ' Path (to build the path first) \***.dbf ' size *m
Tempfile ' path \***.dbf ' size *m
Autoextend on-Automatic growth
--There are some commands to define the size, see the need
Default Storage (
Initial 100K,
Next 100k,
);
Example: creating a table space
Create Tablespace Demospace
DataFile ' e:/oracle_tablespaces/demospace_tbspace.dbf '
Size 1500M
Autoextend on next 5M maxsize 3000M;
Delete Table space
Drop tablespace demospace including contents and datafiles
User Rights
Grant users permission to use tablespace:
Alter user username quota unlimited on table space;
or alter user username quota *m on table space;
Full instance:
1, create tablespace
Create tablespace SDT
datafile ' F:\tablespace\demo ' size 800M
EXTENT MANAGEMENT LOCAL SEG ment SPACE MANAGEMENT AUTO;
Index tablespace
CREATE tablespace sdt_index
datafile ' F:\tablespace\demo ' size 512M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
2, create user
Create users demo identified by demo
Default Tablespace demo;
3, empowering
Grant Connect,resource to demo;
Grant Create any sequence to demo;
Grant Create any table to demo;
Grant Delete any table to demo;
Grant insert any table to demo;
Grant Select any table to demo;
Grant Unlimited tablespace to demo;
Grant execute any procedure to demo;
Grant update any table to demo;
Grant Create any view to demo;
4, Import Export command
IP export: Exp DEMO/[EMAIL PROTECTED]:1521/ORCL file=f:/f.dmp full=y
Exp demo/[email Protected] file=f:/f.dmp full=y
Imp demo/[email protected] file=f:/f.dmp full=y ignore=y