Oracle Learning Notes Recycle Bin & user Rights & Import Export

Source: Internet
Author: User
Tags administrator password

Flash back deleted table:
To delete a table:
drop table AA;
drop table AA purge; Does not go through the Recycle Bin and cannot be flashed back

Flash back deleted table syntax:--the so-called flashback means to restore a table in the Recycle bin
FLASHBACK TABLE [schema.] <table_name>
To
{[Before DROP [RENAME to table]]
[enable| Disable]triggers}
View Recycle Bin
Show RecycleBin

Emptying the Recycle Bin
Purge RecycleBin;

Object with duplicate name:
will be deleted after the flash back.

Attention:
Administrator does not have Recycle Bin


=============================================================
1, create user
Create user identified by password;


2, modify user password
Alter user username identified by new password;
To modify the administrator password:
ALTER user SYS identified by new password;


3, user's lock and unlock
Alter user username account Unlock/lock;


4, give the user authorization
Grant permission to user;


5, recover the user's permissions
Revoke permissions from MyUser

6, delete user
Drop user myuser;


Assigning space quotas to MyTest:
Alter user mytest quota unlimited on users;
Meaning of the quota volume
Unlimited Unlimited
On users has no restrictions on the Users table space.

Role:
For example: There are managers, employees 1, Employees 2;
Manager:
Query, update, delete, insert
Employees:
Query, update
can have two characters
Hr_emp Two permissions
Hr_mgr inherit Hr_emp, and own two permissions, a total of 4.


Create role permissions are required before roles can be created and can be used by administrators.
Conn/as SYSDBA
Create role Role1; The role does not have any permissions at this point.


Grant permissions to the role
Grant create session to Role1;

Role Inheritance:
Create role Role2;
Grant create Table,role1 to Role2; The equivalent of using role1 as a combination of new permissions, as with normal permissions, which is the inherited role.

Grant roles to roles
Grant Role1 to AA;

The Oracle implementation is pre-provisioned with some roles:
CONNECT
RESOURCE
Dba
...
For ordinary users, it is generally necessary to have connect and resource.
Cases:
Create user mytest2 identified by password;
Grant Connect, resource to Mytest2;
This is generally the case, when the user is created, the permissions are specified.


Space quotas are included in the resource role

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Oracle Learning Notes Recycle Bin & user Rights & Import Export

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.