Oracle create tablespace and user code tutorial, oracle build code tutorial

Source: Internet
Author: User

Oracle create tablespace and user code tutorial, oracle build code tutorial

Oracle creates tablespaces and users

Step for creating a tablespace and a user: create user username identified by "password"; Authorize: grant create session to username; grant create table to username; grant create tablespace to username; grant create view to user name;
Create a tablespace (generally, create N tablespaces for storing data and an index space): create tablespace name datafile path (you must first create a path )\***. dbf 'size * M tempfile' path \***. dbf 'size * M autoextend on -- Automatic growth -- there are also some commands that define the size. You need to use default storage (initial 100 K, next 100 k ,);
Example: create a tablespace create tablespace DEMOSPACE datafile 'e:/oracle_tablespaces/demospace_tbspace.dbf' size 1500 M autoextend on next 5 M maxsize 3000 M; delete a tablespace drop tablespace DEMOSPACE including contents and datafiles
User permission: alter user Username quota unlimited on tablespace; or alter user Username quota * M on tablespace;

Complete example:

-- Create tablespace sdt DATAFILE 'f: \ tablespace \ demo' size 800 m extent management local segment space management auto; -- index tablespace create tablespace sdt_Index DATAFILE 'f: \ tablespace \ demo' size 512 m extent management local segment space management auto; -- 2. create user demo identified by demo default tablespace std; -- 3. 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;
-- Import Export command ip export method: exp demo/demo@127.0.0.1: 1521/orcl file = f:/f. dmp full = y exp demo/demo @ orcl file = f:/f. dmp full = y imp demo/demo @ orcl file = f:/f. dmp full = y ignore = y

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.