Oracle establishes tablespaces and users

Source: Internet
Author: User

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

 
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.