Oracle Foundation Learning 3--oracle Create users and authorize

Source: Internet
Author: User

Oracle server-side operations are generally as follows:

 1) Installing Oracle Server Software

2) Create database (automatically created at installation)

3) Configure monitoring (automatic configuration at installation)

4) Start Oracle Instance

5) Create user table space

6) Create a new user and authorize

Let 's start by creating a user table space, creating a new user, and authorizing two items:

 First use the system administrator to log in to Oracle (Sqlplus/as SYSDBA)

? Create user tablespace (d packing directory to create a tablespace named Ts_zhangsan)

Create tablespace ts_zhangsandatafile' D:\zhangsan.dbf 'size30mautoextend on ;

? Create user (user named Zhangsan password is pwd)

Create user Zhangsan identified by PWD;

? Grant Tablespace Ts_zhangsan to user Zhangsan

Alter user Zhangsan default Tablespace ts_zhangsan;

? Grant user Zhangsan permissions to connect to the database, create tables, views, manipulate space, and more

Grant Create Session,create table,create view,unlimited tablespace to Zhangsan;

? User Zhangsan Connect to Oracle

Conn Zhangsan/pwd

Note:

? you must authorize the create session before you can connect to Oracle

? Then you have to authorize tablespace to create the activity

? You then authorize CREATE table to create a table (view same)

? If authorized for all users, use to public, such as:

Grant Create session to public

? Reclaim permissions with revoke from, such as (reverse order and authorization)

Revoke CREATE table from Zhangsan;

Revoke create session from Zhangsan;

? If the user has a table below, it is not possible to delete (drop) directly, unless you add cascade after the DELETE statement to force the deletion so that all user-related things are deleted naturally:

  

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.