Oracle create user, authorization, import, Export command summary

Source: Internet
Author: User

1. Create user

You need to log on to the database with the system user first because the system user has permissions to create other users.

syntax [Create users]: Create user username identified by password [i.e. password];

Example: Create user dhjw identified by 123456;

syntax [change users]: Alter user username identified by password [change password];

Example: Alter user DHJW identified by DHJW;

2. Delete users

Syntax: Drop user username;

Example: Drop user dhjw;

If the user owns the object, it cannot be deleted directly, otherwise an error value will be returned. Specifies the keyword cascade, which removes all objects from the user and then deletes the user.

Syntax: Drop user username cascade;

Example: Drop user DHJW cascade;

3. Authorized users have certain roles

Oracle provides the default three standard roles of Connect (connection role), resource (Resource role), DBA (Database Administrator role), and of course users can create their own roles, which are no longer in detail.

Authorization command:

Syntax: Grant connect, resource to user name;

Example: Grant connect, resource to DHJW;

Revoke permission Command

Syntax: Revoke connect, resource from user name;

The following: Revoke connect, resource from DHJW;

4. Import and Export commands

Import: Imp username/password @ instance name file= the absolute path to the DMP file to import log= log storage path Full=y ignore=y

Example: Imp dhjw/[email protected] file=c:\users\dell\desktop\ziyue_dh_20180308120000.dmp log=c:\data\dh_jw.log full=y Ignore=y

Export:

Full export of database test, user Name System Password Manager exported to D:\daochu.dmp
Exp system/[email protected] rows=y indexes=y compress=n buffer=65536 feedback=100000full=y File=d:\daochu. DMP Log=d:\daochulog.txt owner= (Ecc_biz,ecc_customer)

Oracle create user, authorization, import, Export command summary

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.