Oracle Database Creation Table Space

Source: Internet
Author: User

--oracle Database Creation Table space

Create Tablespace New_taspace

--Table space name

DataFile ' D:\NEWTABLESPACE. DBF ' -the data file and location associated with the tablespace

Size 200M --File Initial size

Autoextend on next 20MB MAXSIZE 400MB; --File size can be expanded automatically, 20MB per expansion, Max 400MB

-- CREATE TABLE Space Create  - - table space associated data file and location  'D:\NEWTABLESPACE1. DBF'-- file Initial size 200M

--Log file
Logging
Extent Management Local
Segment Space management auto; --End with a semicolon

--Delete the table space Delete the physical files
Drop tablespace new_taspace including contents and datafiles

--Create User
Create User Orders
Identified by 123456
Default Tablespace new_taspace; --Create default tablespace for user

--Give the user a role
Grant Connect,resource to Orders
Grant DBA from Orders

--Revoke the user Administrator role

Revoke DBA from Orders

--Add permission to access a table

Grant SELECT on Tep to Orders

--Create a book table
CREATE TABLE book (
ID number (one) primary key,
BookName varchar2 () NOT NULL,
Price Number (11,2) is not NULL,
Storage number (one) NOT NULL
)

Oracle Database Creation Table Space

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.