Oracle creates table spaces, creates users, authorizes, seizes power, deletes users, deletes table spaces

Source: Internet
Author: User

Table Space Definition

Table spaces are specifically built to unify the physical and logical structure of Oracle, and physically,
A tablespace is made up of data files on one or more disks (at least 1 to 1, which can be 1 pairs
more), logically a table space is made up of specific one or more user-mode tables, indexes, etc.
The data inside.

Create tablespace: Connect to a user with DBA authority, such as system

[SQL]View Plaincopy
    1. sql> Create tablespace baicheng datafile ' f:\baicheng.dbf ' size 25M;
    2. Tablespace created


Create User: User name yuge, user password yuge, table space Baicheng

[SQL]View Plaincopy
    1. sql> Create user Yuge
    2. 2 identified by Yuge
    3. 3 default tablespace Baicheng;

Authorized to User (grant RESOURCE,CONNECT,DBA,SYSDBA to test)

[SQL]View Plaincopy
    1. Sql> Grant connect to Yuge;
    2. Grant succeeded
    3. Sql> grant resource to Yuge;
    4. Grant succeeded


Revoke permissions

[SQL]View Plaincopy
    1. Sql> revoke connect from Yuge;
    2. Revoke succeeded
    3. Sql> revoke resource from Yuge;
    4. Revoke succeeded


Delete the user (add cascade, so that even the user's own created tables are deleted, if not add just delete the current user)

[SQL]View Plaincopy
    1. sql> drop user Yuge cascade;
    2. User dropped

Delete Table space (drop tablespace Baicheng including contents and datafiles; Delete with baicheng.dbf file)

[SQL]View Plaincopy
      1. sql> drop tablespace Baicheng;
      2. Tablespace dropped

Oracle creates table spaces, creates users, authorizes, seizes power, deletes users, deletes table spaces

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.