ORACLE Pl/sql Management Command

Source: Internet
Author: User

One login Sqlplus

Sqlplus username/Password @ database instance as login role;

such as: User sys (password 123) to SYSDBA role Login Database Oracl, we can enter: Sqlplus sys/123@oracl as SYSDBA;

This type of login will directly expose the password, if you want to hide the password, you can omit the input of the password, such as: Sqlplus sys@oracl as sysdba; after carriage return, Oracle gives the prompt to enter the password.

After login if you want to switch other users, you can directly use the Connect command, such as: Connect user2/password@oracl as SYSDBA, as above, you can enter the password separately.

two exit Sqlplus

Quit

Three Create users

Create user username identified by password;

Such as: Create user Cksp, password is 123:create user Cksp identified by 123;

Four assign roles or permissions to a user

Grant * * * * * *;

For example, assign a role to just the user dba:grant dba to CKSP;

Assign CREATE TABLE permission: Grant

Five Delete users

Drop user User [cascade];

Where cascade is optional and, if entered, deletes the user and all data.

For example: Delete the user Cksp and all of his data created above: Drop user CKSP cascade;

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.