Create a tablespace user in Oracle (Code tutorial) and create a tablespace in oracle

Source: Internet
Author: User

Create a tablespace user in Oracle (Code tutorial) and create a tablespace in oracle
I. tablespace

Temporary tablespace

Example of creating a temporary tablespace

Create temporary tablespace duke_temp/* TEMPORARY tablespace name: duke_temp */tempfile 'C: \ oracle \ TABLESPACE \ duke_temp.dbf'/* tablespace path */size 50 m/* Initial space size: 50 M */autoextend ON/* enable auto scaling */NEXT 50 m/* space full expansion 50 M at a time */maxsize 6G/* space final size 6G, the unlimited size can be set to unlimited */extent management local;

Tablespace

Example of creating a tablespace

Create tablespace duke_data/* Temporary tablespace name: duke_temp */datafile 'C: \ oracle \ TABLESPACE \ duke_data.dbf'/* tablespace path */size 50 m/* Initial TABLESPACE size: 50 M */autoextend ON/* enable auto scaling */NEXT 50 m/* after the tablespace is full, the final size of the last extended 50 M */maxsize 10G/* space is 10 Gb, the unlimited size can be set to unlimited */logging extent management local;
Ii. Users

Create a user and specify a tablespace

Create user duke/* USER name */identified by duke/* password */default tablespace duke_data/* TABLESPACE */temporary tablespace duke_temp/* temporary tablespace */

Grant and revoke permissions to users

A new user cannot log on directly. You must grant the required permissions to the new user before logging on to oracle. Generally, we grant the user the built-in role permissions of two systems, connect and resource.

The connect role allows users to log on. The resource role allows users to develop programs, such as creating tables and triggers. The authorization command is as follows:

Grant connect, resource to duke/* User name */

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.