Oracle basics 3-create and authorize users in Oracle

Source: Internet
Author: User

The operations on the Oracle server are generally as follows:
1) install Oracle Server Software

2) create a database (automatically created during installation)

3) configuration listening (automatically configured during installation)

4) Start an Oracle instance

5) create a user tablespace

6) Create and authorize a new user

The following describes how to create user tablespaces and create and authorize new users:
First, log on to Oracle (sqlplus/as sysdba) as a system administrator)

Create a user tablespace (create a tablespace named ts_zhangsan in the root directory of disk D)

Create tablespace ts_zhangsandatafile 'd: \ zhangsan. dbf' size 30 m autoextend on;

Create a user (the user name is zhangsan and the password is pwd)

Create user zhangsan identified by pwd;

Authorize the table space ts_zhangsan to the user zhangsan

Alter user zhangsan default tablespace ts_zhangsan;

Grant the database connection, table creation, view, and operation space permissions to zhangsan.

Grant create session, create table, create view, unlimited tablespace to zhangsan;

User zhangsan connects to Oracle

Conn zhangsan/pwd

Note:

First, you must authorize create session before connecting to Oracle

Then you need to authorize tablespace to create the activity.

Then you must authorize create table to create a table (view is the same)

If you authorize all users, use to public, for example:

Grant create session to public

Revoke permissions using revoke from, for example (the order is opposite to the authorization)

Revoke create table from zhangsan;

Revoke create session from zhangsan;

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.